[vtkusers] Re: problems with VTK and Java / is vtk thread safe

Peter J. Carr pjc at hootenanny.org
Wed Jan 30 14:03:27 EST 2002


I am having problems running vtk code from a java application on my 
linux machine.
I am still trying to identify the cause of the problem.
The symptom is the java program crashes with the following message:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x4ac5f197
Function name=Azimuth__9vtkCamerad
Library=/home/pcarr/Projects/vtk/VTK/lib/libvtkRendering.so

Current Java thread:
   at vtk.vtkCamera.Azimuth_23(Native Method)
   at vtk.vtkCamera.Azimuth(vtkCamera.java:104)
   at vtkPanel.mouseDragged(vtkPanel.java:178)
   at java.awt.Component.processMouseMotionEvent(Component.java:3759)
   at java.awt.Component.processEvent(Component.java:3548)
   at java.awt.Component.dispatchEventImpl(Component.java:2593)
   at java.awt.Component.dispatchEvent(Component.java:2497)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
   at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131) 

   at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98) 

   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)

I suspect it has something to do with X/Motif - Java - VTK threads. But 
I am not sure how to narrow it down.

Questions:
   1. Has anyone else seen this type of error? How did you get around it?
   2. How do I find out more about threads in X libraries, specifically 
how do I make sure that threads are enabled when I start x.
   3. Is vtk thread safe by default. I have noticed on some marginally 
related news groups mention of the -D_REENTRANT flag being used during 
compilation of C and C++ libraries. Is this something that is needed to 
build the VTK Java shared libraries?
   4. Is there something I need to do from my java application to 
prevent this kind of bug?

Thanks,
Peter Carr








More information about the vtkusers mailing list