GLJPanel crashes when resuming from sleep mode.

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

GLJPanel crashes when resuming from sleep mode.

mikaelhc
Hi,

If I run a JOGL application and put my laptop in sleep, GLJPanel will crash when returning from sleep mode, with a:
Error making context 0x20000 current on Thread AWT-EventQueue-0... (Full trace: http://pastebin.com/eCDKbs25)

Here is a short program which reproduces this behavior:
http://pastebin.com/GGMe0dKB

This error does not occur when using GLCanvas.

Are there any workarounds for this?

I'm using Windows 7 64-bit, Geforce 310M, and using the 11/04-2013 auto-aggregated builds.

Reply | Threaded
Open this post in threaded view
|

Re: GLJPanel crashes when resuming from sleep mode.

gouessej
Administrator
Hi

Please test with the very latest aggregated build and write a bug report. Are you forced to use GLJPanel in your case?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: GLJPanel crashes when resuming from sleep mode.

mikaelhc
Also crashes using latest auto-aggregated builds.
Yes, GLJPanel is my only option, since the GLCanvas has too many issues with the application I've embedded the OpenGL view in.

I have filed this bug report: https://jogamp.org/bugzilla/show_bug.cgi?id=740
Reply | Threaded
Open this post in threaded view
|

Re: GLJPanel crashes when resuming from sleep mode.

gouessej
Administrator
mikaelhc wrote
Yes, GLJPanel is my only option, since the GLCanvas has too many issues with the application I've embedded the OpenGL view in.
Can you elaborate please? I would like to find a workaround if possible so that you could use GLCanvas or NewtCanvasAWT.

mikaelhc wrote
Thank you.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: GLJPanel crashes when resuming from sleep mode.

mikaelhc
gouessej wrote
mikaelhc wrote
Yes, GLJPanel is my only option, since the GLCanvas has too many issues with the application I've embedded the OpenGL view in.
Can you elaborate please? I would like to find a workaround if possible so that you could use GLCanvas or NewtCanvasAWT.
The main problem with GLCanvas is that we get a lot of flickering when resizing / switching between different tabs, or docking windows in our application - sometimes the GLCanvas is even drawn outside its proper location before it is moved back.

Other than that the UI sometimes fail to update properly (not drawing anything on screen, even though the OpenGL render loop completes with any OpenGL errors). We also have issues when setting a mouse cursor, and we have issues with transparent windows on top of our window. Finally, there are also some platform specific issues - e.g. on one of our Mac's we sometimes get artifacts on top of our OpenGL window.

These issues are not simple to reproduce and I don't see them when I create test application from scratch. Since the OpenGL window is part of a much larger application framework I cannot change much about the window / Swing setup.

I don't have any problems using GLJPanel though - I see around ~20ms constant overhead of grabbing the FBO pixels and drawing them using Swing, which is no big deal for me. We are not building a game, but doing interactive visualization.
Reply | Threaded
Open this post in threaded view
|

Re: GLJPanel crashes when resuming from sleep mode.

gouessej
Administrator
I used the SWT_AWT bridge with the AWT GLCanvas for a year and an half in a very large Eclipse RCP application, I spent some days in making it work correctly without flickering, with no resize problems and without preventing the use of the debug pipeline, I admit it was tricky. I posted my code (a small piece of code illustrating the tricky initialisation) in a bug report, maybe I can find it if you're interested. My visualizer (used in an application of geo sciences) was tested only under GNU Linux and Windows, not on Mac. I used a GLJPanel only to draw a part of the GUI with some transparency above the GLCanvas.
Julien Gouesse | Personal blog | Website