[vtkusers] VTK with JDK1.3.1_08
R K Shyamprakash
ramakrishna.prakash at quest-global.com
Thu Jul 3 06:35:58 EDT 2003
Jeff,
following is the method where I pick the cell id
private int getCellId(int x, int y) {
int cellId = -1;
cellPicker.SetTolerance(0.00001);
Lock();
int picked = cellPicker.Pick(x, (getHeight() - y), 0, GetRenderer());
UnLock();
if (picked != 0) {
cellId = cellPicker.GetCellId();
}
return cellId;
}
Now I commented out the Lock/UnLock block. Also instead of calling Render()
I call rw.Render() without the lock/unlock block and everything is working
fine. Since the complete loop gets executed in the event thread I feel its
ok to skip the lock/unlock block. Since the drawing surface was getting
locked and unlocked so many times(in the mouse dragged event once for
picking once for rendering), is it possible that one of the times the unlock
fails and drawing surface remains locked and this resulting in GUI freeze? I
am still not sure of the reason but now everything seems to work fine(I had
a round of regression test).
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:
>
> 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