[vtkusers] Java Problem

R K Shyamprakash ramakrishna.prakash at quest-global.com
Tue Apr 15 06:43:18 EDT 2003


Jeff,
         It works. Great show. Can you please tell me where all it is
mandatory to put a Lock/Unlock block so that I can get over this problem
permanently.

Thanks
Shyam

-----Original Message-----
From: Jeff Lee [mailto:jeff at cdnorthamerica.com]
Sent: Saturday, April 12, 2003 5:41 PM
To: R K Shyamprakash
Subject: Re: [vtkusers] Java Problem


Hi Shyam,
Could you try to put a Lock()/UnLock() around wherever you call pick in
NewDemoCanvas.java.  Picking does a MakeCurrent which accesses the
drawing surface - this is one of those methods which needs to be
locked.  Let me know if this helps,
-Jeff

R K Shyamprakash wrote:

>Jeff,
>	No, TestVTKCanvas works fine for me. Even in my example the behavior is
>highly unpredictable as some time it works perfectly fine. I am attaching a
>zipped file.
>
>Thanks
>Shyam
>
>
>-----Original Message-----
>From: Jeff Lee [mailto:jeff at cdnorthamerica.com]
>Sent: Saturday, April 12, 2003 4:57 PM
>To: R K Shyamprakash
>Subject: Re: [vtkusers] Java Problem
>
>
>can you send me some code which demonstrates the problem?  does
>TestVTKCanvas give you the same problems?
>-Jeff
>
>R K Shyamprakash wrote:
>
>
>
>>Hello Jeff,
>>
>>     nvoglnt.dll is version 4.0(NVIDIA display driver). I am not sure if
>>
>>
>it
>
>
>>is the latest available, i will cross check with that. This is what I do.
>>When I click on the actor, I pick the cell, retrieve the data array of
that
>>cell and set different value to the data array by calling
>>vtkFloatArray.SetValue(int index,double value);
>>It works fine on some actors but fails on some. I don't get exception
every
>>time at
>>iren.TimerEvent(). Most of the time it happens when vtkPanel calls
>>vtkRenderWindow.Render() saying the canvas is locked. below is the most
>>common error message. NewDemoCanvas(which you will find in the error
>>message) is my class which extends vtkCanvas. I tried to use vtkPanel
>>instead of vtkCanvas but without success.
>>
>>An unexpected exception has been detected in native code outside the VM.
>>Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x69592AF0
>>Function=[Unknown.]
>>Library=C:\WINNT\System32\nvoglnt.dll
>>
>>NOTE: We are unable to locate the function name symbol for the error
>>     just occurred. Please refer to release documentation for possible
>>     reason and solutions.
>>
>>
>>Current Java thread:
>>	at vtk.vtkRenderWindow.Render_6(Native Method)
>>	at vtk.vtkRenderWindow.Render(vtkRenderWindow.java:36)
>>	at vtk.vtkPanel.Render(vtkPanel.java:141)
>>	- locked <02C53E50> (a NewDemoCanvas)
>>	at vtk.vtkPanel.mouseDragged(vtkPanel.java:332)
>>	at java.awt.Component.processMouseMotionEvent(Component.java:5141)
>>	at java.awt.Component.processEvent(Component.java:4894)
>>	at java.awt.Container.processEvent(Container.java:1566)
>>	at java.awt.Component.dispatchEventImpl(Component.java:3598)
>>	at java.awt.Container.dispatchEventImpl(Container.java:1623)
>>	at java.awt.Component.dispatchEvent(Component.java:3439)
>>	at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
>>	at
>>java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.
j
>>
>>
>a
>
>
>>va:197)
>>	at
>>java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.ja
v
>>
>>
>a
>
>
>>:150)
>>	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
>>	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
>>	at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
>>
>>Dynamic libraries:
>>0x00400000 - 0x00406000 	d:\apps\jdk1.4\bin\javaw.exe
>>0x77F60000 - 0x77FBE000 	C:\WINNT\System32\ntdll.dll
>>0x77DC0000 - 0x77DFF000 	C:\WINNT\system32\ADVAPI32.dll
>>0x77F00000 - 0x77F5E000 	C:\WINNT\system32\KERNEL32.dll
>>0x77E70000 - 0x77EC5000 	C:\WINNT\system32\USER32.dll
>>0x77ED0000 - 0x77EFC000 	C:\WINNT\system32\GDI32.dll
>>0x77E10000 - 0x77E67000 	C:\WINNT\system32\RPCRT4.dll
>>0x78000000 - 0x78046000 	C:\WINNT\system32\MSVCRT.dll
>>0x10000000 - 0x10018000 	C:\WINNT\System32\NVDESK32.DLL
>>0x6D330000 - 0x6D45C000 	d:\apps\jdk1.4\jre\bin\client\jvm.dll
>>0x77FD0000 - 0x77FFA000 	C:\WINNT\System32\WINMM.dll
>>0x6D1D0000 - 0x6D1D7000 	d:\apps\jdk1.4\jre\bin\hpi.dll
>>0x6D300000 - 0x6D30D000 	d:\apps\jdk1.4\jre\bin\verify.dll
>>0x6D210000 - 0x6D229000 	d:\apps\jdk1.4\jre\bin\java.dll
>>0x6D320000 - 0x6D32D000 	d:\apps\jdk1.4\jre\bin\zip.dll
>>0x6D000000 - 0x6D0FA000 	D:\Apps\jdk1.4\jre\bin\awt.dll
>>0x77C00000 - 0x77C18000 	C:\WINNT\System32\WINSPOOL.DRV
>>0x76AB0000 - 0x76AB5000 	C:\WINNT\System32\IMM32.dll
>>0x77B20000 - 0x77BD7000 	C:\WINNT\system32\ole32.dll
>>0x0B0A0000 - 0x0B138000 	D:\Apps\vtk42\bin\vtkCommonJava.dll
>>0x0B140000 - 0x0B30E000 	D:\Apps\vtk42\bin\vtkCommon.dll
>>0x780A0000 - 0x780B2000 	C:\WINNT\System32\MSVCIRT.dll
>>0x780C0000 - 0x78121000 	C:\WINNT\System32\MSVCP60.dll
>>0x0B310000 - 0x0B332000 	D:\Apps\vtk42\bin\vtkFilteringJava.dll
>>0x0B340000 - 0x0B3B1000 	D:\Apps\vtk42\bin\vtkFiltering.dll
>>0x0B3C0000 - 0x0B3FF000 	D:\Apps\vtk42\bin\vtkIOJava.dll
>>0x0B400000 - 0x0B5DD000 	D:\Apps\vtk42\bin\vtkIO.dll
>>0x0B5E0000 - 0x0B602000 	D:\Apps\vtk42\bin\vtkpng.dll
>>0x0B610000 - 0x0B623000 	D:\Apps\vtk42\bin\vtkzlib.dll
>>0x0B630000 - 0x0B652000 	D:\Apps\vtk42\bin\vtkjpeg.dll
>>0x0B660000 - 0x0B6AE000 	D:\Apps\vtk42\bin\vtktiff.dll
>>0x0B6B0000 - 0x0B6D3000 	D:\Apps\vtk42\bin\vtkexpat.dll
>>0x0B6E0000 - 0x0B72A000 	D:\Apps\vtk42\bin\vtkImagingJava.dll
>>0x0B730000 - 0x0B990000 	D:\Apps\vtk42\bin\vtkImaging.dll
>>0x0B990000 - 0x0BA1F000 	D:\Apps\vtk42\bin\vtkGraphicsJava.dll
>>0x0BA20000 - 0x0BC9B000 	D:\Apps\vtk42\bin\vtkGraphics.dll
>>0x0BCA0000 - 0x0BD11000 	D:\Apps\vtk42\bin\vtkRenderingJava.dll
>>0x0BD20000 - 0x0BF5E000 	D:\Apps\vtk42\bin\vtkRendering.dll
>>0x755B0000 - 0x75678000 	C:\WINNT\System32\OPENGL32.dll
>>0x76C80000 - 0x76CA2000 	C:\WINNT\System32\GLU32.dll
>>0x77160000 - 0x77167000 	C:\WINNT\System32\DCIMAN32.dll
>>0x0BF60000 - 0x0BF71000 	D:\Apps\vtk42\bin\vtkftgl.dll
>>0x0BF80000 - 0x0BFCD000 	D:\Apps\vtk42\bin\vtkfreetype.dll
>>0x6D230000 - 0x6D235000 	D:\Apps\jdk1.4\jre\bin\jawt.dll
>>0x0DFA0000 - 0x0DFE6000 	D:\Apps\vtk42\bin\vtkHybridJava.dll
>>0x0DFF0000 - 0x0E15F000 	D:\Apps\vtk42\bin\vtkHybrid.dll
>>0x0E160000 - 0x0E17F000 	D:\Apps\vtk42\bin\vtkParallelJava.dll
>>0x0E180000 - 0x0E20F000 	D:\Apps\vtk42\bin\vtkParallel.dll
>>0x776D0000 - 0x776D8000 	C:\WINNT\system32\WSOCK32.dll
>>0x776B0000 - 0x776C4000 	C:\WINNT\system32\WS2_32.dll
>>0x776A0000 - 0x776A7000 	C:\WINNT\system32\WS2HELP.dll
>>0x6D180000 - 0x6D1D0000 	D:\Apps\jdk1.4\jre\bin\fontmanager.dll
>>0x77130000 - 0x77156000 	C:\WINNT\System32\ddraw.dll
>>0x69500000 - 0x6968A000 	C:\WINNT\System32\nvoglnt.dll
>>0x71300000 - 0x71306000 	C:\WINNT\system32\MSIDLE.DLL
>>0x76AC0000 - 0x76ADD000 	C:\WINNT\System32\imagehlp.dll
>>0x71DC0000 - 0x71DCA000 	C:\WINNT\System32\PSAPI.DLL
>>
>>Local Time = Sat Apr 12 16:48:06 2003
>>Elapsed Time = 12
>>#
>># The exception above was detected in native code outside the VM
>>#
>># Java VM: Java HotSpot(TM) Client VM (1.4.1-b21 mixed mode)
>>#
>># An error report file has been saved as hs_err_pid159.log.
>># Please refer to the file for further information.
>>#
>>
>>Thanks
>>Shyam
>>
>>-----Original Message-----
>>From: Jeff Lee [mailto:jeff at cdnorthamerica.com]
>>Sent: Saturday, April 12, 2003 4:08 PM
>>To: R K Shyamprakash
>>Cc: Vtkusers (E-mail)
>>Subject: Re: [vtkusers] Java Problem
>>
>>
>>Is your nvoglnt.dll the latest/greatest?  Perhaps upgrading opengl might
>>help?  I don't think any extra mutex locking will work here.  Does the
>>straight vtkPanel cause the same exception anywhere?  If you disable the
>>code inside the DelayAction to not call iren.TimerEvent(), do you get
>>the same problems?  I don't have an nt4.0 box here, so I can't really
test.
>>-Jeff
>>
>>R K Shyamprakash wrote:
>>
>>
>>
>>
>>
>>>Hi,
>>>      Thanks for the reply. I am using Windows NT4.0. If there is no fix
>>>for this problem in Windows NT, then this is of great concern to me as
the
>>>application I am developing has to run all windows and Unix platforms. Is
>>>there any way I can come over this problem? Can somebody tell me the best
>>>way to use the vtkMutexLock. A small code snippet will be of great help.
>>>
>>>Thanks
>>>Shyam
>>>
>>>-----Original Message-----
>>>From: Jeff Lee [mailto:jeff at cdnorthamerica.com]
>>>Sent: Friday, April 11, 2003 7:52 PM
>>>To: R K Shyamprakash
>>>Subject: Re: [vtkusers] Java Problem
>>>
>>>
>>>Hi,
>>>I looked at that line in vtkCanvas and all it is doing is calling the
>>>interactor's timer event.  Are you using winnt4.0?  I have heard of many
>>>problems on nt4.0 with java (see archives), however this works fine on
>>>later windows(win98, win2k, winxp).  I have heard of no other fixes
>>>except to upgrade your os.  You could also try upgrading your ogl libs.
>>>-Jeff
>>>
>>>R K Shyamprakash wrote:
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>>Hello,
>>>>        I am using vtk 4.2 with JDK 1.4 in Win NT environment. Often my
>>>>application crashes with following error eventhough.  I use proper mutex
>>>>locking. As answered in mailing list earlier, I never use
>>>>vtkRenderWindow.Render() directly, but still the problem persists. Can
>>>>
>>>>
>>>>
>>>>
>>some
>>
>>
>>
>>
>>>>body help.
>>>>
>>>>An unexpected exception has been detected in native code outside the VM.
>>>>Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x69592AF0
>>>>Function=[Unknown.]
>>>>Library=C:\WINNT\System32\nvoglnt.dll
>>>>
>>>>NOTE: We are unable to locate the function name symbol for the error
>>>>   just occurred. Please refer to release documentation for possible
>>>>   reason and solutions.
>>>>
>>>>
>>>>Current Java thread:
>>>>	at vtk.vtkGenericRenderWindowInteractor.TimerEvent_13(Native Method)
>>>>	at
>>>>vtk.vtkGenericRenderWindowInteractor.TimerEvent(C:/martink/vtk42/vtkdist
/
>>>>
>>>>
>j
>
>
>>>>
>>>>
>>a
>>
>>
>>
>>
>>>>
>>>>
>>>v
>>>
>>>
>>>
>>>
>>>
>>>
>>>>a/vtk/vtkGenericRenderWindowInteractor.java:64)
>>>>	at vtk.vtkCanvas$DelayAction.actionPerformed(vtkCanvas.java:250)
>>>>	at javax.swing.Timer.fireActionPerformed(Timer.java:271)
>>>>	at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
>>>>	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
>>>>	at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
>>>>	at
>>>>java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThrea
d
>>>>
>>>>
>.
>
>
>>>>
>>>>
>>j
>>
>>
>>
>>
>>>>
>>>>
>>>a
>>>
>>>
>>>
>>>
>>>
>>>
>>>>va:197)
>>>>	at
>>>>java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.
j
>>>>
>>>>
>a
>
>
>>>>
>>>>
>>v
>>
>>
>>
>>
>>>>
>>>>
>>>a
>>>
>>>
>>>
>>>
>>>
>>>
>>>>:150)
>>>>	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
>>>>	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
>>>>	at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
>>>>
>>>>Dynamic libraries:
>>>>0x00400000 - 0x00406000 	d:\apps\jdk1.4\bin\javaw.exe
>>>>0x77F60000 - 0x77FBE000 	C:\WINNT\System32\ntdll.dll
>>>>0x77DC0000 - 0x77DFF000 	C:\WINNT\system32\ADVAPI32.dll
>>>>0x77F00000 - 0x77F5E000 	C:\WINNT\system32\KERNEL32.dll
>>>>0x77E70000 - 0x77EC5000 	C:\WINNT\system32\USER32.dll
>>>>0x77ED0000 - 0x77EFC000 	C:\WINNT\system32\GDI32.dll
>>>>0x77E10000 - 0x77E67000 	C:\WINNT\system32\RPCRT4.dll
>>>>0x78000000 - 0x78046000 	C:\WINNT\system32\MSVCRT.dll
>>>>0x10000000 - 0x10018000 	C:\WINNT\System32\NVDESK32.DLL
>>>>0x6D330000 - 0x6D45C000 	d:\apps\jdk1.4\jre\bin\client\jvm.dll
>>>>0x77FD0000 - 0x77FFA000 	C:\WINNT\System32\WINMM.dll
>>>>0x6D1D0000 - 0x6D1D7000 	d:\apps\jdk1.4\jre\bin\hpi.dll
>>>>0x6D300000 - 0x6D30D000 	d:\apps\jdk1.4\jre\bin\verify.dll
>>>>0x6D210000 - 0x6D229000 	d:\apps\jdk1.4\jre\bin\java.dll
>>>>0x6D320000 - 0x6D32D000 	d:\apps\jdk1.4\jre\bin\zip.dll
>>>>0x6D000000 - 0x6D0FA000 	D:\Apps\jdk1.4\jre\bin\awt.dll
>>>>0x77C00000 - 0x77C18000 	C:\WINNT\System32\WINSPOOL.DRV
>>>>0x76AB0000 - 0x76AB5000 	C:\WINNT\System32\IMM32.dll
>>>>0x77B20000 - 0x77BD7000 	C:\WINNT\system32\ole32.dll
>>>>0x0B0A0000 - 0x0B138000 	D:\Apps\vtk42\bin\vtkCommonJava.dll
>>>>0x0B140000 - 0x0B30E000 	D:\Apps\vtk42\bin\vtkCommon.dll
>>>>0x780A0000 - 0x780B2000 	C:\WINNT\System32\MSVCIRT.dll
>>>>0x780C0000 - 0x78121000 	C:\WINNT\System32\MSVCP60.dll
>>>>0x0B310000 - 0x0B332000 	D:\Apps\vtk42\bin\vtkFilteringJava.dll
>>>>0x0B340000 - 0x0B3B1000 	D:\Apps\vtk42\bin\vtkFiltering.dll
>>>>0x0B3C0000 - 0x0B3FF000 	D:\Apps\vtk42\bin\vtkIOJava.dll
>>>>0x0B400000 - 0x0B5DD000 	D:\Apps\vtk42\bin\vtkIO.dll
>>>>0x0B5E0000 - 0x0B602000 	D:\Apps\vtk42\bin\vtkpng.dll
>>>>0x0B610000 - 0x0B623000 	D:\Apps\vtk42\bin\vtkzlib.dll
>>>>0x0B630000 - 0x0B652000 	D:\Apps\vtk42\bin\vtkjpeg.dll
>>>>0x0B660000 - 0x0B6AE000 	D:\Apps\vtk42\bin\vtktiff.dll
>>>>0x0B6B0000 - 0x0B6D3000 	D:\Apps\vtk42\bin\vtkexpat.dll
>>>>0x0B6E0000 - 0x0B72A000 	D:\Apps\vtk42\bin\vtkImagingJava.dll
>>>>0x0B730000 - 0x0B990000 	D:\Apps\vtk42\bin\vtkImaging.dll
>>>>0x0B990000 - 0x0BA1F000 	D:\Apps\vtk42\bin\vtkGraphicsJava.dll
>>>>0x0BA20000 - 0x0BC9B000 	D:\Apps\vtk42\bin\vtkGraphics.dll
>>>>0x0BCA0000 - 0x0BD11000 	D:\Apps\vtk42\bin\vtkRenderingJava.dll
>>>>0x0BD20000 - 0x0BF5E000 	D:\Apps\vtk42\bin\vtkRendering.dll
>>>>0x755B0000 - 0x75678000 	C:\WINNT\System32\OPENGL32.dll
>>>>0x76C80000 - 0x76CA2000 	C:\WINNT\System32\GLU32.dll
>>>>0x77160000 - 0x77167000 	C:\WINNT\System32\DCIMAN32.dll
>>>>0x0BF60000 - 0x0BF71000 	D:\Apps\vtk42\bin\vtkftgl.dll
>>>>0x0BF80000 - 0x0BFCD000 	D:\Apps\vtk42\bin\vtkfreetype.dll
>>>>0x6D230000 - 0x6D235000 	D:\Apps\jdk1.4\jre\bin\jawt.dll
>>>>0x0DFA0000 - 0x0DFE6000 	D:\Apps\vtk42\bin\vtkHybridJava.dll
>>>>0x0DFF0000 - 0x0E15F000 	D:\Apps\vtk42\bin\vtkHybrid.dll
>>>>0x0E160000 - 0x0E17F000 	D:\Apps\vtk42\bin\vtkParallelJava.dll
>>>>0x0E180000 - 0x0E20F000 	D:\Apps\vtk42\bin\vtkParallel.dll
>>>>0x776D0000 - 0x776D8000 	C:\WINNT\system32\WSOCK32.dll
>>>>0x776B0000 - 0x776C4000 	C:\WINNT\system32\WS2_32.dll
>>>>0x776A0000 - 0x776A7000 	C:\WINNT\system32\WS2HELP.dll
>>>>0x6D180000 - 0x6D1D0000 	D:\Apps\jdk1.4\jre\bin\fontmanager.dll
>>>>0x77130000 - 0x77156000 	C:\WINNT\System32\ddraw.dll
>>>>0x69500000 - 0x6968A000 	C:\WINNT\System32\nvoglnt.dll
>>>>0x71300000 - 0x71306000 	C:\WINNT\system32\MSIDLE.DLL
>>>>0x76AC0000 - 0x76ADD000 	C:\WINNT\System32\imagehlp.dll
>>>>0x71DC0000 - 0x71DCA000 	C:\WINNT\System32\PSAPI.DLL
>>>>
>>>>Local Time = Fri Apr 11 19:02:44 2003
>>>>Elapsed Time = 6
>>>>#
>>>># The exception above was detected in native code outside the VM
>>>>#
>>>># Java VM: Java HotSpot(TM) Client VM (1.4.1-b21 mixed mode)
>>>>#
>>>># An error report file has been saved as hs_err_pid283.log.
>>>># Please refer to the file for further information.
>>>>#
>>>>
>>>>
>>>>Thanks
>>>>Shyam
>>>>
>>>>_______________________________________________
>>>>This is the private VTK discussion list.
>>>>Please keep messages on-topic. Check the FAQ at:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>><http://public.kitware.com/cgi-bin/vtkfaq>
>>>
>>>
>>>
>>>
>>>
>>>
>>>>Follow this link to subscribe/unsubscribe:
>>>>http://public.kitware.com/mailman/listinfo/vtkusers
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>_______________________________________________
>>>This is the private VTK discussion list.
>>>Please keep messages on-topic. Check the FAQ at:
>>>
>>>
>>>
>>>
>><http://public.kitware.com/cgi-bin/vtkfaq>
>>
>>
>>
>>
>>>Follow this link to subscribe/unsubscribe:
>>>http://public.kitware.com/mailman/listinfo/vtkusers
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
>
>--
>Jeff Lee
>Software Engineer
>Computational Dynamics North America Ltd
>21 Lafayette Street, Suite 230
>Lebanon NH 03766 USA
>fax:   603 643 9994
>phone: 603 643 9993 x109
>http://www.cd-adapco.com
>
>

--
Jeff Lee
Software Engineer
Computational Dynamics North America Ltd
21 Lafayette Street, Suite 230
Lebanon NH 03766 USA
fax:   603 643 9994
phone: 603 643 9993 x109
http://www.cd-adapco.com




More information about the vtkusers mailing list