Login  Register

After upgrading from JOGL1 my canvas dies when moving between monitors

Posted by wspear on Apr 17, 2013; 11:15pm
URL: https://forum.jogamp.org/After-upgrading-from-JOGL1-my-canvas-dies-when-moving-between-monitors-tp4028978.html

I just updated my application from an ancient version of JOGL 1 to the most recent release. This mostly consisted of changing some import paths and changing GL objects to GL2 objects.

Everything seems to work except when I drag my application from one of my monitors to the other the canvas with my rendered objects turns blank and I have to reset the whole application to see anything. The application also hops to the monitor where it is being dragged when the canvas begins to cross over instead of transitioning smoothly with my mouse movement as it used to.

I am running on 64 bit Ubuntu 12.04 and my dual-head setup is managed by the Nouveau drivers.

I noticed two API changes during the upgrade which might be relevant.  The first is that GLCapabilities now requires an argument. I wasn't sure where to find what it wanted so I just passed in null which results in it grabbing a default.

The second is that my renderer which implements GLEventListener now requires a dispose(GLAutoDrawable) method. Destroying my drawable (or doing anything else) inside the dispose method didn't seem to accomplish anything, but this method is called whenever I move my application between monitors. The problem is presumably a chain of disposal that occurs when the monitor switch is detected but I don't know what I can do to recover from that smoothly.

A block of console error output is generated when the switch occurs and the canvas goes blank. Just googling around I haven't been able to find much useful information on it but it seems to suggest some kind of issue with reinitializing itself on the new monitor:

Info: Nativewindow X11 Error: 3 - BadWindow (invalid Window parameter), dpy 0x7f3d2c27c7a0, id 360009d, # 5838: 20:0 X_GetProperty
Info: Nativewindow X11 Error: 3 - BadWindow (invalid Window parameter), dpy 0x7f3d2c27c7a0, id 360009d, # 5839: 20:0 X_GetProperty
nvfx_screen_get_param:95 -  Warning: unknown PIPE_CAP 30
nvfx_screen_get_param:95 -  Warning: unknown PIPE_CAP 30
nvfx_screen_get_param:95 -  Warning: unknown PIPE_CAP 55
nvfx_screen_get_param:95 -  Warning: unknown PIPE_CAP 56
nvfx_screen_get_param:95 -  Warning: unknown PIPE_CAP 59
nvfx_screen_get_param:95 -  Warning: unknown PIPE_CAP 58
nvfx_screen_get_param:95 -  Warning: unknown PIPE_CAP 30
nvfx_screen_get_param:95 -  Warning: unknown PIPE_CAP 30
nvfx_screen_get_param:95 -  Warning: unknown PIPE_CAP 30
nvfx_screen_get_param:95 -  Warning: unknown PIPE_CAP 55
nvfx_screen_get_param:95 -  Warning: unknown PIPE_CAP 56
nvfx_screen_get_param:95 -  Warning: unknown PIPE_CAP 59
nvfx_screen_get_param:95 -  Warning: unknown PIPE_CAP 58
nvfx_screen_get_param:95 -  Warning: unknown PIPE_CAP 30

Please let me know if there is any more information I can provide. Any assistance would be greatly appreciated. I'll have to switch back to my prior version of JOGL if I can't get this fixed.