Reply – GLWindow in NewtCanvasAWT - deadlock in GLWindow.setSize
Your Name
Subject
Message
or Cancel
In Reply To
GLWindow in NewtCanvasAWT - deadlock in GLWindow.setSize
— by Andrzej Andrzej
Hi,

This is related to the my previous post: http://forum.jogamp.org/JOGL-without-GLEventListener-GLCanvas-or-GLJPanel-td4038837.html in so far that the setup is the same.

GLWindow in NewtCanvasAWT and a native c++ renderer.

I setup my GLWindow, put it inside the NewtCanvasAWT, and put that in a JFrame, in between two JToolBars. OpenGL content gets displayed correctly, but this happens:

DefaultEDT.run(): Caught exception occured on thread AWT-EventQueue-0-Display-.macosx_nil-1-EDT-2: RunnableTask[executed true, tTotal 19976 ms, tExec 5002 ms, tQueue 14974 ms, attachment null, throwable java.lang.RuntimeException: Waited 5000ms for: <27285f7b, 5ed3053b>[count 132, qsz 0, owner <Thread-6>] - <AWT-EventQueue-0-Display-.macosx_nil-1-EDT-2>]
java.lang.RuntimeException: Waited 5000ms for: <27285f7b, 5ed3053b>[count 132, qsz 0, owner <Thread-6>] - <AWT-EventQueue-0-Display-.macosx_nil-1-EDT-2>
        at jogamp.common.util.locks.RecursiveLockImpl01Unfairish.lock(RecursiveLockImpl01Unfairish.java:198)
        at jogamp.newt.WindowImpl$SetSizeAction.run(WindowImpl.java:1045)
        at jogamp.newt.DisplayImpl.runOnEDTIfAvail(DisplayImpl.java:435)
        at jogamp.newt.WindowImpl.runOnEDTIfAvail(WindowImpl.java:2133)
        at jogamp.newt.WindowImpl.setSize(WindowImpl.java:1087)
        at com.jogamp.newt.opengl.GLWindow.setSize(GLWindow.java:509)
        at jogamp.newt.awt.event.AWTParentWindowAdapter$1.run(AWTParentWindowAdapter.java:128)
        at com.jogamp.common.util.RunnableTask.run(RunnableTask.java:133)
        at jogamp.newt.DefaultEDTUtil$NEDT.run(DefaultEDTUtil.java:372)

Looks like the newt canvas calls setSize on GLWindow to resize it to fit it within itself, but can't. That's also the effect I see, GLWindow does not fit in its newt canvas container. Any help would be greatly appreciated.

Thanks,

Andrzej