Are you disposing the geotiff readers you are using in your code? Besides, is that the whole stacktrace you see or is there some more? It is not so easy to understand what is going on form this code.
Ciao, Simone. ------------------------------------------------------- Ing. Simone Giannecchini GeoSolutions S.A.S. Founder - Software Engineer Via Carignoni 51 55041 Camaiore (LU) Italy phone: +39 0584983027 fax: +39 0584983027 mob: +39 333 8128928 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.linkedin.com/in/simonegiannecchini http://twitter.com/simogeo ------------------------------------------------------- On Tue, Mar 16, 2010 at 4:03 PM, Michael geotools <geoto...@ukr.net> wrote: > > Hi! > Very often Ive got exceptions after closing my application, which trying to > open geotiff files: > > Exception while removing reference: java.lang.InterruptedException > java.lang.InterruptedException > at java.lang.Object.wait(Native Method) > at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118) > at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134) > at sun.java2d.Disposer.run(Disposer.java:125) > at java.lang.Thread.run(Thread.java:619) > > Its happen when my application already closed, probably when JVM trying to > cleanup memory. > > Im cut off all unnecessary code from my application, and found that its > happen only when I use JFileChooser. > And this situation depends on geotif file - after some files this never > happens. > > Here are my code, which stable got this exception: > > import org.geotools.coverage.grid.io.AbstractGridCoverage2DReader; > import org.geotools.data.DataSourceException; > import org.geotools.gce.geotiff.GeoTiffReader; > import javax.swing.*; > import java.io.File; > > public class GTTest { > > public static void main(final String[] argv) { > > // just create JFileChooser, even dont use: > JFileChooser chooser = new JFileChooser(); > > File file = new File("d:\\maps\\italy.tif"); > try { > AbstractGridCoverage2DReader rdr = new GeoTiffReader(file); > } catch (DataSourceException e) { > e.printStackTrace(); > } > } > } > > This error not affect on my application (because happen only when > application already closed), but I think that something wrong in geotools > library. And I cannot release my application with this exception, its not a > good practice... > > Could someone pls tell me, is there a way to stop this exceptions? Maybe > something wrong in my code? I can send my geotif files (actually I took > files from ftp://ftp.remotesensing.org/pub/geotiff/samples) > > Thank you! > > PS: Windows XP SP3, Java version 1.6.0_16, 1.6.0_18. > -- > View this message in context: > http://n2.nabble.com/GeoTiff-and-JFileChooser-tp4744153p4744153.html > Sent from the geotools-gt2-users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Geotools-gt2-users mailing list > Geotools-gt2-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users