I have two threads which both read data from files and use JTS geometries. When I run the code sometimes the whole application freezes before it starts processing.

I managed a few times to run it in the debugger and sometimes it was freezing while creating a Point instance. It is hanging on loading the class CentroidPoint. As it is intermittent I can't create a concrete test case.

This is JTS 1.9 and Java 1.6.0_03 on Windows and 1.6.0_05 on linux

As a quick hack fix I added the following code to the thread to force the class to be loaded in only one thread at a time.

synchronized (getClass()) {
           try {
               Class.forName(Point.class.getName());
           } catch (ClassNotFoundException e1) {
               // TODO Auto-generated catch block
               e1.printStackTrace();
           }
       }

Has anyone else experienced anything like this. I think it must be a JVM bug as opposed to a JTS bug.

Paul
_______________________________________________
jts-devel mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jts-devel

Reply via email to