Timeout Exception in SWT

classic Classic list List threaded Threaded
3 messages Options
Art
Reply | Threaded
Open this post in threaded view
|

Timeout Exception in SWT

Art
I get the following exception when shutting down a scene using SWT. This does not occur in Swing or NEWT. This also only seems to happen when running multiple scenes within the same JVM. You can get it to occur running tests in my open source library.

https://github.com/pnnl/svf 
https://bintray.com/pnnl/maven/svf/view 

finishLifecycleAction(com.jogamp.opengl.util.FPSAnimator$4): ++++++ timeout reached ++++++ main
finishLifecycleAction(com.jogamp.opengl.util.FPSAnimator$4): OK false- pollPeriod 25, blocking true -> res false, waited 1000/1000 - main
 - com.jogamp.opengl.util.FPSAnimator[started true, animating true, paused true, drawable 1, totals[dt 0, frames 0, fps 0.0], modeBits 1, init'ed true, animThread Thread[main-FPSAWTAnimator#05-Timer5,6,main], exclCtxThread false(null)]
    [2]: com.jogamp.opengl.util.AnimatorBase.finishLifecycleAction(AnimatorBase.java:630)
    [3]: com.jogamp.opengl.util.FPSAnimator.pause(FPSAnimator.java:363)
    [4]: com.jogamp.opengl.swt.GLCanvas$5.run(GLCanvas.java:209)
    [5]: com.jogamp.opengl.swt.GLCanvas.runInGLThread(GLCanvas.java:959)
    [6]: com.jogamp.opengl.swt.GLCanvas.dispose(GLCanvas.java:639)
    [7]: com.jogamp.opengl.swt.GLCanvas$7.handleEvent(GLCanvas.java:395)
    [8]: org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    [9]: org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    [10]: org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
    [11]: org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058)
    [12]: org.eclipse.swt.widgets.Widget.release(Widget.java:808)
    [13]: org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:873)
    [14]: org.eclipse.swt.widgets.Widget.release(Widget.java:811)
    [15]: org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:873)
    [16]: org.eclipse.swt.widgets.Widget.release(Widget.java:811)
    [17]: org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:873)
    [18]: org.eclipse.swt.widgets.Widget.release(Widget.java:811)
    [19]: org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:873)
    [20]: org.eclipse.swt.widgets.Widget.release(Widget.java:811)
    [21]: org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:873)
    [22]: org.eclipse.swt.widgets.Widget.release(Widget.java:811)
    [23]: org.eclipse.swt.widgets.Widget.dispose(Widget.java:446)
    [24]: org.eclipse.ui.internal.PartPane.dispose(PartPane.java:182)
    [25]: org.eclipse.ui.internal.ViewPane.dispose(ViewPane.java:204)
    [26]: org.eclipse.ui.internal.WorkbenchPartReference.dispose(WorkbenchPartReference.java:681)
    [27]: org.eclipse.ui.internal.WorkbenchPage.disposePart(WorkbenchPage.java:1810)
    [28]: org.eclipse.ui.internal.WorkbenchPage.partRemoved(WorkbenchPage.java:1802)
    [29]: org.eclipse.ui.internal.ViewFactory.releaseView(ViewFactory.java:257)
    [30]: org.eclipse.ui.internal.Perspective.dispose(Perspective.java:292)
    [31]: org.eclipse.ui.internal.WorkbenchPage.dispose(WorkbenchPage.java:1881)
    [32]: org.eclipse.ui.internal.WorkbenchWindow.closeAllPages(WorkbenchWindow.java:894)
    [33]: org.eclipse.ui.internal.WorkbenchWindow.hardClose(WorkbenchWindow.java:1729)
    [34]: org.eclipse.ui.internal.WorkbenchWindow.busyClose(WorkbenchWindow.java:730)
    [35]: org.eclipse.ui.internal.WorkbenchWindow.access$0(WorkbenchWindow.java:715)
    [36]: org.eclipse.ui.internal.WorkbenchWindow$6.run(WorkbenchWindow.java:867)
    [37]: org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    [38]: org.eclipse.ui.internal.WorkbenchWindow.close(WorkbenchWindow.java:865)
    [39]: org.eclipse.jface.window.WindowManager.close(WindowManager.java:109)
    [40]: org.eclipse.ui.internal.Workbench$18.run(Workbench.java:1114)
    [41]: org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    [42]: org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:1111)
    [43]: org.eclipse.ui.internal.Workbench.access$15(Workbench.java:1040)
    [44]: org.eclipse.ui.internal.Workbench$25.run(Workbench.java:1284)
    [45]: org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    [46]: org.eclipse.ui.internal.Workbench.close(Workbench.java:1282)
    [47]: org.eclipse.ui.internal.Workbench.close(Workbench.java:1254)
    [48]: org.eclipse.ui.internal.WorkbenchWindow.busyClose(WorkbenchWindow.java:727)
    [49]: org.eclipse.ui.internal.WorkbenchWindow.access$0(WorkbenchWindow.java:715)
    [50]: org.eclipse.ui.internal.WorkbenchWindow$6.run(WorkbenchWindow.java:867)
    [51]: org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    [52]: org.eclipse.ui.internal.WorkbenchWindow.close(WorkbenchWindow.java:865)
    [53]: org.eclipse.jface.window.Window.handleShellCloseEvent(Window.java:741)
    [54]: org.eclipse.jface.window.Window$3.shellClosed(Window.java:687)
    [55]: org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:98)
    [56]: org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    [57]: org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    [58]: org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
    [59]: org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
    [60]: org.eclipse.swt.widgets.Decorations.closeWidget(Decorations.java:309)
    [61]: org.eclipse.swt.widgets.Decorations.WM_CLOSE(Decorations.java:1694)
    [62]: org.eclipse.swt.widgets.Control.windowProc(Control.java:4530)
    [63]: org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
    [64]: org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1627)
    [65]: org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2069)
    [66]: org.eclipse.swt.widgets.Display.windowProc(Display.java:4976)
    [67]: org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    [68]: org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
    [69]: org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:498)
    [70]: org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
    [71]: org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
    [72]: org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1627)
    [73]: org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2069)
    [74]: org.eclipse.swt.widgets.Display.windowProc(Display.java:4976)
    [75]: org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    [76]: org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
    [77]: org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:498)
    [78]: org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
    [79]: org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
    [80]: org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1627)
    [81]: org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2069)
    [82]: org.eclipse.swt.widgets.Display.windowProc(Display.java:4976)
    [83]: org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
    [84]: org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2546)
    [85]: org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3756)
    [86]: org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
    [87]: org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
    [88]: org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
    [89]: org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
    [90]: org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    [91]: org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
    [92]: org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    [93]: gov.pnnl.canopy.ui.rcp.CanopyClient.start(CanopyClient.java:66)
    [94]: org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    [95]: org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    [96]: org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    [97]: org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
    [98]: org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    [99]: sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [100]: sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    [101]: sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [102]: java.lang.reflect.Method.invoke(Method.java:497)
    [103]: org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    [104]: org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    [105]: org.eclipse.equinox.launcher.Main.run(Main.java:1438)
    [106]: org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Reply | Threaded
Open this post in threaded view
|

Re: Timeout Exception in SWT

elect
In general, when you want to qui you have to stop the animator and System.exit(0). Is this what you are already doing?
Art
Reply | Threaded
Open this post in threaded view
|

Re: Timeout Exception in SWT

Art
Sort of. The framework is for creating visualizations that run within a view of a larger application. To dispose a scene I first cleanup any scene created resources, then stop the animator, and then dispose of the view components. System exit is only called when the entire application terminates. Within a single run there may be as many as ten scenes running at once and they may be created and destroyed multiple times. The framework only renders when necessary so having multiple scenes isn't an issue. What is an issue is it seems that SWT deadlocks when there are multiple animators running at one time.