Posted by
Sven Gothel on
Apr 18, 2013; 1:54am
URL: https://forum.jogamp.org/After-upgrading-from-JOGL1-my-canvas-dies-when-moving-between-monitors-tp4028978p4028979.html
On 04/18/2013 01:15 AM, wspear [via jogamp] wrote:
> 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.
First of all thank you for your bug report via this forum.
Proper bug reporting is described here:
<
https://jogamp.org/wiki/index.php/Jogl_FAQ#Bugreports_.26_Testing>
We do prefer bugzilla bug reports, after initial discussion here.
Regarding latest builds, please have a look here:
Please use one of the latest aggregated archives[1],
as described in this section[2].
[1] <
http://jogamp.org/deployment/archive/master/?C=M;O=D>
[2] <
https://jogamp.org/wiki/index.php/Downloading_and_installing_JOGL#Downloading_the_latest_aggregated_autobuild>
Then I would need your test case, which you may attach to the bug report.
At least you could reference one of our many unit tests within JOGL, maybe under the 'demo' sub-packages.
Chose one which matches your test case the most .. and use it as a boiler plate for your new one.
Or .. simply create a small test case.
You mention X11, your test case will show whether you use GLCanvas (I guess so) or
any other GLAutoDrawable.
I will test multi monitor behavior w/ AWT GLCanvas and NEWT
on a vbox 3d hw-accel machine in a bit and post you the result.
I will use the following demo unit tests on GNU/Linux (X11) and Windows:
com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT
com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT
com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasSWT
com.jogamp.opengl.test.junit.jogl.demos.gl2.awt.TestGearsGLJPanelAWT
~Sven