<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Verdana, sans-serif; "><div>So did some more spelunking and it looks like this is just a basic incompatibility for SWT and AWT &#8211; in the specific case where AWT is trying to start their own event loop once SWT has started. &nbsp;Previously, in my other work, I handled events on my own &#8211; I didn't ask or expect AWT to start or manage it's own events. I used AWT basically to host the OpenGL canvas (based on JOGL). &nbsp;But when one invokes the vtkRenderWIndowInteractor an event loop IS spawned and the causes various weird problems.</div><div><br></div><div>There is a fairly long summary of some of the issues here:</div><div><br></div><div><a href="http://marc.info/?l=openjdk-awt-dev&amp;m=135818602009136&amp;w=2">http://marc.info/?l=openjdk-awt-dev&amp;m=135818602009136&amp;w=2</a></div><div><br></div><div>So the question that comes to my mind is how dependent is the rest of VTK on starting its own event loops? &nbsp;I.e. Can I use the rest of VTK and its pipeline to perform graphics, manage datasets, etc. &nbsp;I am willing to give up the Interactor and its mimicking of trackball if everything else is likely to work. &nbsp;But if spawning its own event loop(s) is intrinsic to how most of VTK works then I'm probably dead in the water.</div><div><br></div><div>Thoughts or suggestions?</div><div><br></div><div>Thanks</div><div>Ric</div><div><br></div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Ric Wright &lt;<a href="mailto:rkwright@geofx.com">rkwright@geofx.com</a>&gt;<br><span style="font-weight:bold">Date: </span> Tuesday, August 13, 2013 12:59 PM<br><span style="font-weight:bold">To: </span> Sebastien Jourdain &lt;<a href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@kitware.com</a>&gt;<br><span style="font-weight:bold">Cc: </span> Sean McBride &lt;<a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a>&gt;, vtkusers &lt;<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>&gt;<br><span style="font-weight:bold">Subject: </span> Re: [vtkusers] VTK6 and Java Cone Example 5<br></div><div><br></div><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Verdana, sans-serif; "><div>An update on this. &nbsp;I ported over some of my other Eclipse work and adapted it to VTK. &nbsp;It is pushed to my account on github and there is a writeup here: &nbsp;<a href="http://rkwright.github.io/geofx-pages/vtkview.html">http://rkwright.github.io/geofx-pages/vtkview.html</a>. &nbsp;There are 3 articles in there. &nbsp;The latest rev of the code is here:&nbsp;<a href="https://github.com/rkwright/vtkscene">https://github.com/rkwright/vtkscene</a>&nbsp;in the develop branch.</div><div><br></div><div>Mostly, it works great. &nbsp;However, when I tried the fifth cone example, which has the problematic vtkRenderWindowInteractor, I ran into similar problems as before. &nbsp;I instantiated it with a valid vtkPanel.RenderWindow but it still goes off into the ozone, sometimes crashing the native vtkOpenGL dylib.</div><div><br></div><div>I'm going to skip the interactor for now and move on to see if I run into more problems. If not, I can probably live without that widget but the problems there might be symptomatic of deeper problems on OSX 64 bit systems.</div><div><br></div><div>Any further suggestions would be welcome.</div><div><br></div><div>Thanks</div><div>Ric</div><div><br></div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Sebastien Jourdain &lt;<a href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@kitware.com</a>&gt;<br><span style="font-weight:bold">Date: </span> Tuesday, August 6, 2013 8:56 AM<br><span style="font-weight:bold">To: </span> Ric Wright &lt;<a href="mailto:rkwright@geofx.com">rkwright@geofx.com</a>&gt;<br><span style="font-weight:bold">Cc: </span> Sean McBride &lt;<a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a>&gt;, vtkusers &lt;<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>&gt;<br><span style="font-weight:bold">Subject: </span> Re: [vtkusers] VTK6 and Java Cone Example 5<br></div><div><br></div><div dir="ltr">In Java you should use the Java specific classes anyway like vtkPanel/vtkCanvas or the new version of them used in the vtk.sample package of the vtk.jar...<div><br></div><div style="">The purpose of those example was to show the possible match between the different languages...&nbsp;</div><div style=""><br></div><div style="">Nothing more I believe,</div><div style=""><br></div><div style="">Seb</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 6, 2013 at 8:52 AM, Ric Wright <span dir="ltr">&lt;<a href="mailto:rkwright@geofx.com" target="_blank">rkwright@geofx.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ah, OK. &nbsp;Well, I don't know what to do here. &nbsp;Is this happening to others?<br>
&nbsp;Should I file a bug? &nbsp;Just try to work around it by not using<br>
RenderWindowInteractors (sounds kind of lame). &nbsp;Or?<br><br>
Suggestions?<br><br>
Thanks<br><span class="HOEnZb"><font color="#888888">Ric<br></font></span><div class="HOEnZb"><div class="h5"><br><br>
On 8/5/13 4:15 PM, "Sean McBride" &lt;<a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a>&gt; wrote:<br><br>
&gt;On Mon, 5 Aug 2013 16:10:55 -0500, Ric Wright said:<br>
&gt;<br>
&gt;&gt;Well, a little playing around didn't seem to help, but I am frankly not<br>
&gt;&gt;an<br>
&gt;&gt;expert on threads. &nbsp;However, it seems to me that the source of the<br>
&gt;&gt;problem<br>
&gt;&gt;is that the vtkRenderWindowInteractor gets initialized then the start()<br>
&gt;&gt;method creates an event loop that is monitored by the<br>
&gt;&gt;vtkRenderWindowInteractor. &nbsp;I suspect that start() method spawns a new<br>
&gt;&gt;thread to listen to the events and it is the spawning of that thread that<br>
&gt;&gt;causes the exception.<br>
&gt;<br>
&gt;VTK's Cocoa classes never create any threads.<br>
&gt;<br>
&gt;Cheers,<br>
&gt;<br>
&gt;--<br>
&gt;____________________________________________________________<br>
&gt;Sean McBride, B. Eng &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a><br>
&gt;Rogue Research &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.rogue-research.com" target="_blank">www.rogue-research.com</a><br>
&gt;Mac Software Developer &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Montréal, Québec, Canada<br>
&gt;<br>
&gt;<br><br><br></div></div></blockquote></div><br></div></span></div></div></span></body></html>