G4P exit app problems

edited December 2016 in Library Questions

I cannot get the app the close cleanly using GWindow.

Here is the code I use to set up the window:

void setup() { size(1200, 1050, P3D);

window = GWindow.getWindow(this, "My Window", 1201, 30, 300, 800, P3D); window.addDrawHandler(this, "windowDraw"); window.setAlwaysOnTop(true);

I've tried CLOSE_WINDOW and every combination I could think of.

Either I get a Thread Death error or Processing crashes on exit no matter which window I close.

Error: java.lang.ThreadDeath at java.lang.Thread.stop(Thread.java:850) at com.jogamp.newt.opengl.GLWindow$GLLifecycleHook$1.run(GLWindow.java:724) at java.security.AccessController.doPrivileged(Native Method) at com.jogamp.newt.opengl.GLWindow$GLLifecycleHook.shutdownRenderingAction(GLWindow.java:719) at jogamp.newt.WindowImpl.shutdown(WindowImpl.java:635) at jogamp.newt.WindowImpl.shutdownAll(WindowImpl.java:123) at jogamp.newt.DisplayImpl$1.run(DisplayImpl.java:74) at com.jogamp.nativewindow.NativeWindowFactory.shutdown(NativeWindowFactory.java:274) at com.jogamp.nativewindow.NativeWindowFactory$2$1.run(NativeWindowFactory.java:192) at java.lang.Thread.run(Thread.java:745)


  • This only appears to happen when the second window is an OpenGL window. I will have to do some investigation and see if I can find a fix.

    Please post a ticket on Sourceforge

  • I get the same error when I try the example "ControlP5 Controlframe" - so it looks like a Processing issue. Seems to be P3D too.

  • In PS2 all windows used JFrame not matter which renderer you used. With PS 3 P2D and P3D renders use OpenGL windows so it is not surprising that problems like this occur. There may still be a solution that can be implemented in G4P so if you post a ticket I will see what I can do.

  • Thanks for raising a ticket :)

Sign In or Register to comment.