Well I found the problem with Jody's help. Turns out my rcp product was
not including the shapefile feature renderer, and so it was using the
basicfeaturerenderer. Apparently this renderer uses a different set of
code from the geotools feature streamer, and this code isn't properly
releasing locks. So, adding the shapefile renderer to my project means
I'm using the non-buggy code from geotools and it works.
I will be filing a bug report in Geotools for the feature streamer.
Graham.
Graham Davis wrote:
Jesse and others,
I'm working on getting a basic rcp app without all the udig
views/menus working with a mapview (something like a mapeditor minus
all the mapeditor stuff... so basically a view that renders a map
without the extras). You can run what I have now from the rcp.product
in net.refractions.udig.tutorials.rcp.
If you run this and then click the "+" button on the view it will open
a MapView from net.refractions.udig.project.widget.view. Next click
the "down arrow" to load a shapefile onto the map. You will notice
that clicking to refresh the map or zoom to map work fine at this
point. But as soon as you resize the map viewport (which triggers a
layer.getBounds) it does not refresh properly (sometimes you will need
2 shapefiles loaded to see this problem). At this point, looking in
the debugger and pausing the threads to see what they are doing, I can
see there is a reentrant lock on the shapefile (in
ShpFiles.acquireRead in geotools) that never gains access. From this
point on, any refreshes or anything will never redraw that layer
because the file is stuck locked.
This problem doesn't seem to occur in uDig with a regular MapEditor.
I'm unsure why the RCP app has the problem (I'm wondering if there is
some timing/rendering issue that may cause this lock problem). Jesse,
since you are the maintainer of shapefile stuff, and the render guru,
I'm wondering if you have any ideas? If you have any tips I would
greatly appreciate it, thanks!
--
Graham Davis
Refractions Research Inc.
[EMAIL PROTECTED]
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel