Hi Andrea,

thanks for the fast reply!
I've checked everything, but really every iterator in the code is closed after 
usage.

But, I've seen now that at the end of error lines stated in my last mail, there 
are further errors:

Okt 01, 2013 4:04:34 PM org.geotools.map.Layer finalize
SEVERE: Layer dispose not called; possible memory leak
Okt 01, 2013 4:04:34 PM org.geotools.map.Layer dispose
SEVERE: Layer preDispose was not called prior to calling dispose

(I didn't notice them before because the huge amount of error lines flush the 
console..)
Why does this error occur, respectively, how can I dispose layers?

Thanks,
Philipp


Von: [email protected] [mailto:[email protected]] Im Auftrag von Andrea 
Aime
Gesendet: Dienstag, 1. Oktober 2013 15:48
An: Oehler, Philipp
Cc: [email protected]
Betreff: Re: [Geotools-gt2-users] Lock on shapefile?!

On Tue, Oct 1, 2013 at 3:41 PM, Oehler, Philipp 
<[email protected]<mailto:[email protected]>> 
wrote:
Hi everyone,

my Geotools app to plot country-related data to pngs  is working quite well 
now, but when I create many instances of its base class one after another for 
batch plotting, I'm getting this error after a while (10-20 instances of ca. 
300 to come):

Okt 01, 2013 3:02:54 PM org.geotools.data.shapefile.ShpFiles logCurrentLockers
SEVERE: The following locker still has a lock: read on 
file:/D:/workspace_lokal_LAP1328/PowerVisualiser_local/PowerVisualiser_maps/Europa_Mena_Basemap2.shx
 by org.geotools.data.shapefile.shp.IndexFile
Okt 01, 2013 3:02:54 PM org.geotools.data.shapefile.ShpFiles logCurrentLockers
SEVERE: The following locker still has a lock: read on 
file:/D:/workspace_lokal_LAP1328/PowerVisualiser_local/PowerVisualiser_maps/Europa_Mena_Basemap2.dbf
 by org.geotools.data.shapefile.dbf.IndexedDbaseFileReader
Okt 01, 2013 3:02:54 PM org.geotools.data.shapefile.ShpFiles logCurrentLockers
SEVERE: The following locker still has a lock: read on 
file:/D:/workspace_lokal_LAP1328/PowerVisualiser_local/PowerVisualiser_maps/Europa_Mena_Basemap2.shp
 by org.geotools.data.shapefile.shp.ShapefileReader

over and over. And the rendered pngs contain only some of the countries, many 
are missing.
Might it be some kind of memory leak?
I already googled this, and found that it's necessary to call close(); on all 
opened features; I did this, but the error still remains.

Close on all opened feature iterators. By looking at the above, you still have 
some that are left open

Cheers
Andrea


--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more 
information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to