[vtkusers] removeActor() causes error ("wglMakeCurrent failed...")

Sebastien Jourdain sebastien.jourdain at kitware.com
Mon Jun 28 15:48:18 EDT 2010


Hi Marcus,

Anyway, the main issue was that you overflow the EDT queue by calling
repaint() inside a paintXXX method.

What I meant before was, did you build your Swing components in the
EDT as it should be ? Which means, did you used
SwingUtility.invokeLater(....) ? And also is VTK is managed only by
only one thread ??? Normaly, bad management of java thread with VTK
imply a crash, but it could also have been a cause of paint error...

Seb

EDT = Event Dispatch Thread



On Mon, Jun 28, 2010 at 8:58 AM, Markus Ott <ott-markus at t-online.de> wrote:
> I'm calling removeActor() from the JPanel class to which the vtkCanvas
> is added. The actor even gets removed from the canvas but nevertheless
> the error occurs. What do you mean by "occur in the EDT"? I'm not
> starting any other threads manually.
>
>
> Sebastien Jourdain schrieb:
>> Does the removeActor occurs in the EDT ?
>>
>> On Sat, Jun 26, 2010 at 11:44 AM, Markus Ott <ott-markus at t-online.de> wrote:
>>> Hi vtkusers!
>>>
>>> We're using VTK within Java having a vtkCanvas containing some
>>> vtkArrowSource Objects. Pushing them onto the canvas works fine but
>>> removing them causes an error. We just call the method stated below:
>>>
>>> public void removeActor(vtkActor actor){
>>>        renWin.GetRenderer().RemoveActor(actor);
>>>        renWin.repaint();
>>> }
>>>
>>> After that the vtkOutputWindow pops up (please see attached image) with
>>> an error message which i can't read completely since the program crashed:
>>>
>>> "wglMakeCurrent failed ..."
>>>
>>> I can't see what we did wrong. Any ideas?
>>>
>>> Regards,
>>> Markus
>>>
>>>
>>> _______________________________________________
>>> 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