[vtkusers] Crashes in Java wrapped vtk on linux because of xcb problems

Luke Dodd luke.dodd at gmail.com
Mon Nov 28 14:09:40 EST 2011


Hi Clemens,

I've had these errors before on Linux, and like you had difficulty
ever producing a small example.

Are you using vtkPanel or vtkCanvas? I have various theories, but I'm
not 100% sure about any of them. I think it could be to do with
vtkActors not being informed that the opengl context is no longer
"good" but still attempting to clean up native resources. What I did
conclude is that there is something "off" with vtkPanel/Canvas.

To side step this I actually made my own vtkCanvas, it uses LWJGL to
set up a opengl context painting to a java panel, and then get vtk to
use that OpenGL context using a slightly tweaked
vtkGenericRenderWindow class. This, so far (no crashes for a few
weeks) has solved the issue.

If you (or anyone else) are interested I could clean up this code a
little and put it on github. I'd be very happy to do this since if it
worked for you a) I would feel better about the stability of my own
code and b) if what I've done does actually "fix" it we'd be closer to
finding out the actual problem!

(Sorry for the multiple emails Clemens, I forgot to hit reply all - I
want the rest of this list to see this too)

Best Regards,
Luke Dodd


On 25 November 2011 15:52, Clemens Müthing
<clemens.muething at uni-konstanz.de> wrote:
>
> Hello everyone,
>
> I am currently developing a Viewer for Volume Renderings using the Java
> Wrappers of vtk.
> To complicate things a bit, the Viewer is a plugin for KNIME (www.knime.org,
> a tool to
> perform data mining and other tasks using a node based approach) which in
> term is an
> extension for eclipse.
>
> Now, the problem is the following: Everytime I run the programm, I can
> easily display
> the data, manipulate it etc without a crash as long as the window containing
> the
> vtkPanel is open. But when I close the window, at random intervals a crash
> will
> occur, giving me only one of the following error messages:
>
> java: ../../src/xcb_io.c:140: dequeue_pending_request: Assertion `req ==
> dpy->xcb->pending_requests failed.
> java: ../../src/xcb_io.c:571: _XReply: Assertion `(((long) (req->sequence) -
> (long) (dpy->request)) <= 0)' failed.
> java: ../../src/xcb_io.c:515: _XReply: Assertion `!dpy->xcb->reply_data'
> failed.
>
> To ease the problem, I tried to build a minimum example, but this didn't
> help, as that one is not
> crashing at all.
>
> So my question would be: Has anyone else have had a similar problem and
> could maybe give me
> a hint to where the problem may be? Or, as I don't have a clue how to debug
> this any
> further, any tips what I might do to get a little bit more output?
>
> Thanks in advance
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list