[vtkusers] Xlib: unexpected async reply (sequence 0x2b1a)

Carl Westerberg henrik.westerberg at crg.es
Wed Sep 12 06:41:59 EDT 2007


Hello vtkusers,

I believe I have resolved my issue with threading in VTK/Java/X.

I added a method to vtkPanel.java to remove all actors in a scene:

public void removeProps() {
    Lock();
    ren.RemoveAllViewProps();
    UnLock();
}

Recompiled VTK and now I no longer get any async errors, well after about 10mins of testing anyway.

So I use 

renWin.removeProps();

rather than

renWin.GetRenderer().RemoveAllViewProps();

where renWin is a vtkCanvas.

regards,

Henrik


-----Original Message-----
From: vtkusers-bounces+henrik.westerberg=crg.es at vtk.org on behalf of Henrik Westerberg
Sent: Mon 8/27/2007 6:06 PM
To: vtkusers at vtk.org
Subject: [vtkusers] Xlib: unexpected async reply (sequence 0x2b1a)
 

Hello vtkusers,

I am getting a lot of these types of errors in my Java/VTK app:

Xlib: unexpected async reply (sequence 0x2b1a)

I have tried using methods from vtkPanel/vtkCanvas where possible
but sometimes it is necessary to use vtk functions which may
interact with the renderer. i.e:

renWin.GetRenderer().RemoveAllViewProps();
renWin.GetRenderer().AddActor(aActor);

using vtkCanvas and vtkPanel:

renWin.resetCamera();
renWin.Render();

where renWin is a vtkCanvas.

I need to be able to interactively take actors in and out of the scene, and
I suspect it is the RemoveAllViewProps() which is causing the problems. Also
I cannot use  Lock and Unlock provided in vtkPanel as they are protected, is
this an avenue worth looking into? 

I am using VTK 5.1, Java 1.6, X 6.8.2, RH5.5 

any pointers would be appreciated,

Henrik

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070912/f0076b86/attachment.htm>


More information about the vtkusers mailing list