<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="font-size: 14px; font-family: Verdana, sans-serif; color: rgb(0, 0, 0); ">SO I worked my way through the Java Examples in VTK/Examples/Tutorial, converting each to an Eclipse project, correcting the load library calls. They all worked until I reach # 5, which differs from the others in that it has the following code:</div><div style="font-size: 14px; font-family: Verdana, sans-serif; color: rgb(0, 0, 0); "><br></div><div style="font-size: 14px; color: rgb(0, 0, 0); "><div><span class="Apple-tab-span" style="font-family: Verdana, sans-serif; white-space: pre; ">        </span><font face="Consolas">vtkInteractorStyleTrackballCamera style = new vtkInteractorStyleTrackballCamera();</font></div><div><font face="Consolas"> iren.SetInteractorStyle(style);</font></div><div><font face="Consolas"><br></font></div><div><font face="Consolas"> iren.Initialize();</font></div><div><font face="Consolas"> iren.Start();</font></div></div><div style="font-size: 14px; font-family: Verdana, sans-serif; color: rgb(0, 0, 0); "><br></div><div style="font-size: 14px; font-family: Verdana, sans-serif; color: rgb(0, 0, 0); ">This causes:</div><div style="font-size: 14px; font-family: Verdana, sans-serif; color: rgb(0, 0, 0); "><br></div><div><div><font color="#ff0000" face="Consolas" style="font-size: 12px;">2013-08-05 14:38:21.256 java[6596:1203] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /SourceCache/Foundation/Foundation-945.18/Misc.subproj/NSUndoManager.m:328</font></div><div><font color="#ff0000" face="Consolas" style="font-size: 12px;">2013-08-05 14:38:21.256 java[6596:1203] +[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.</font></div><div><font color="#ff0000" face="Consolas" style="font-size: 12px;">2013-08-05 14:38:21.258 java[6596:1203] (</font></div><div><font color="#ff0000" face="Consolas" style="font-size: 12px;"><span class="Apple-tab-span" style="white-space:pre">        </span>0 CoreFoundation 0x00007fff880b2b06 __exceptionPreprocess + 198</font></div><div><font color="#ff0000" face="Consolas" style="font-size: 12px;"><span class="Apple-tab-span" style="white-space:pre">        </span>1 libobjc.A.dylib 0x00007fff90a073f0 objc_exception_throw + 43</font></div><div><font color="#ff0000" face="Consolas" style="font-size: 12px;"><span class="Apple-tab-span" style="white-space:pre">        </span>2 CoreFoundation 0x00007fff880b2948 +[NSException raise:format:arguments:] + 104</font></div><div><font color="#ff0000" face="Consolas" style="font-size: 12px;"><span class="Apple-tab-span" style="white-space:pre">        </span>3 Foundation 0x00007fff92f914c2 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 189</font></div><div><font color="#ff0000" face="Consolas" style="font-size: 12px;"><span class="Apple-tab-span" style="white-space:pre">        </span>4 Foundation 0x00007fff92ff7807 +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 156</font></div><div><font color="#ff0000" face="Consolas" style="font-size: 12px;"><span class="Apple-tab-span" style="white-space:pre">        </span>5 AppKit 0x00007fff8bea024d -[NSApplication run] + 687</font></div><div><font color="#ff0000" face="Consolas" style="font-size: 12px;"><span class="Apple-tab-span" style="white-space:pre">        </span>6 libvtkRenderingOpenGL-6.0.1.dylib 0x00000001177ee284 -[vtkCocoaServer start] + 244</font></div><div><font color="#ff0000" face="Consolas" style="font-size: 12px;"><span class="Apple-tab-span" style="white-space:pre">        </span>7 libvtkRenderingOpenGL-6.0.1.dylib 0x00000001177eea09 _ZN30vtkCocoaRenderWindowInteractor5StartEv + 265</font></div><div><font color="#ff0000" face="Consolas" style="font-size: 12px;"><span class="Apple-tab-span" style="white-space:pre">        </span>8 libvtkRenderingCoreJava.dylib 0x00000001172fc3b1 Java_vtk_vtkRenderWindowInteractor_Start_15 + 49</font></div><div><font color="#ff0000" face="Consolas" style="font-size: 12px;"><span class="Apple-tab-span" style="white-space:pre">        </span>9 ??? 0x000000010df1ecd5 0x0 + 4528925909</font></div><div><font color="#ff0000" face="Consolas" style="font-size: 12px;"><span class="Apple-tab-span" style="white-space: pre; ">        </span>10 ??? 0x000000010df0d8da 0x0 + 4528855258</font></div></div><div><font color="#ff0000" face="Consolas" style="font-size: 12px;"><br></font></div><div><font>This is apparently a Cocoa problem on 64 bit systems:</font></div><div><font><br></font></div><div><font><a href="http://www.dsource.org/forums/viewtopic.php?t=5762&sid=e34eedb51399e9c6776536c3d0da67ef">http://www.dsource.org/forums/viewtopic.php?t=5762&sid=e34eedb51399e9c6776536c3d0da67ef</a></font></div><div><font><br></font></div><div><font><a href="https://bugreports.qt-project.org/browse/QTBUG-7393">https://bugreports.qt-project.org/browse/QTBUG-7393</a></font></div><div><font><br></font></div><div><font><a href="http://code.google.com/p/ultra-finance/issues/detail?id=5">http://code.google.com/p/ultra-finance/issues/detail?id=5</a></font></div><div><font><br></font></div><div><font>I am on OSX 10.8.4 64 bit, MBP.</font></div><div><font><br></font></div><div><font>Oddly, though, in the debugger there APPEARS to be only one thread when the exception occurs and it is labelled (main) but it could be that Eclipse (which itself tends to use lots of threads) may be using what OSX thinks is the main thread and so this widget is being created in not-the-real-main-thread.</font></div><div><font><br></font></div><div><font>Haven't dug into it any farther.</font></div><div><font><br></font></div><div><font>Ric</font></div><div><font><br></font></div></body></html>