[vtkusers] VTK with JDK1.3.1_08
R K Shyamprakash
ramakrishna.prakash at quest-global.com
Fri Jun 27 08:58:20 EDT 2003
In the load operation, I read the file, and create an actor out of the read
data, add the actor to renderer and then call Render. I will dig into the
code and see if really another thread is accessing the data.
>
event thread is starved. really can't diagnose your problem without
some code. can try ctrl-\ to get a thread-dump if you use jdk1.4,
otherwise its hard to see where the hang occurs.
>
I tried the thread dump. It says
"AWT-EventQueue-0" prio=7 tid=0x008B20A0 nid=0x66 in Object.wait()
[277ef000..27
7efd90]
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:426)
at java.awt.EventQueue.getNextEvent(EventQueue.java:333)
- locked <114267A0> (a java.awt.EventQueue)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:161)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java: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)
But here the interesting thing is, if I click on toolbar or menubar
item(they are blank), the event gets fired and I can continue operation in
VTK window as usual. only that these buttons are not repainted properly. I
have a strong feeling that VTK is holding the graphics resources which is
disallowing java to repaint because if I close the VTK window(in case if I
manage to hit the correct menu item) and reopen it all java objects return
to normal state.
Thanks
Shyam
-----Original Message-----
From: vtkusers-admin at vtk.org [mailto:vtkusers-admin at vtk.org]On Behalf Of
Jeff Lee
Sent: Friday, June 27, 2003 5:53 PM
To: R K Shyamprakash
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] VTK with JDK1.3.1_08
R K Shyamprakash wrote:
>Jeff,
> Say I am loading a .stl file into SourceViewer(which is a subclass of
>vtkCanvas and it is a child of JTabbedPane). The crash occurs only during
>the first load operation. Once the model is loaded everything works fine.
>what I don't understand is, all operation gets executed in the event
thread,
>so there is no chance of another thread accessing the data at the same
time.
>
there is a chance that the c++ interactor is performing a render while
your data is loading. also could be that there really is a chance of
another thread accessing the data at the same time. what does your load
operation do?
>
> Further, when I move the mouse over the actor, I pick the cell and change
>its scalar value(to paint the cell with a different color) . the whole
thing
>gets executed in the mouseDragged event thread. if I do this operation for
>say, 8 to 10 minutes, the JAVA GUI freezes(toolbar and menubar goes blank)
>though the vtk window(vtkCanvas) works fine. at this point if I close the
>existing vtk window and open a new one everything returns to normal. I
tried
>forcing repaint and all other things. but nothing seems to be working. Can
>you guess any reason for this?
>
event thread is starved. really can't diagnose your problem without
some code. can try ctrl-\ to get a thread-dump if you use jdk1.4,
otherwise its hard to see where the hang occurs.
>
>
>
_______________________________________________
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://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list