Crash of VM when laptop hibernates

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

Crash of VM when laptop hibernates

Pol Magermans
Hi guys,

I notice the following error whenever I Hibernate my laptop with my java3D application running (eclipse product with a java3D River network drawn). I cannot figure whether this happens at hibernate or at Wake-up time. It happened with Pre11 and still happens with pre12.

com.jogamp.opengl.GLException: Error making context 0xb0000 current on Thread J3D-Renderer-1, drawableWrite 0xffffffffb1013401, drawableRead 0xffffffffb1013401, werr: 0, WindowsWGLContext [Version 4.4 (Compat profile, arb, compat[ES2, ES3], FBO, hardware) - 4.4.0 [GL 4.4.0, vendor 0.0.0 (n/a)], options 0x2c03, this 0x7a597036, handle 0xb0000, isShared false, jogamp.opengl.gl4.GL4bcImpl@69d7e1df,
         quirks: [NoDoubleBufferedBitmap, NoSurfacelessCtx],
        Drawable: WindowsOnscreenWGLDrawable[Realized true,
        Factory   jogamp.opengl.windows.wgl.WindowsWGLDrawableFactory@5921f476,
        Handle    0xffffffffb1013401,
        Surface   JAWTWindow[0x777d0651][JVM version: 1.8.0_25 (1.8.0 update 25)
JAWT version: 0x10004, CA_LAYER: false, isLayeredSurface false, bounds [ 0 / 0  1095 x 857 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], pixelScale 1.0x1.0, shallUseOffscreenLayer false, isOffscreenLayerSurface false, attachedSurfaceLayer 0x0, windowHandle 0x1c12d2, surfaceHandle 0xffffffffb1013401, bounds [ 0 / 0  1095 x 857 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], window [0/0 1095x857], pixels[scale 1.0, 1.0 -> 1095x857], visible true, lockedExt false,
        config AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type .awt, connection \Display0, unitID 0, awtDevice D3DGraphicsDevice[screen=0], handle 0x0], idx 0],
        chosen    GLCaps[wgl vid 7 arb: rgba 8/8/8/0, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/0, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]],
        requested GLCaps[rgba 5/5/5/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]],
        sun.awt.Win32GraphicsConfig@62455bb2[dev=D3DGraphicsDevice[screen=0],pixfmt=7],
        encapsulated WindowsWGLGraphicsConfiguration[DefaultGraphicsScreen[WindowsGraphicsDevice[type .windows, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0xbd15867]], idx 0], pfdID 7, ARB-Choosen true,
        requested GLCaps[rgba 5/5/5/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]],
        chosen    GLCaps[wgl vid 7 arb: rgba 8/8/8/0, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/0, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]]],
        awtComponent javax.media.j3d.Canvas3D[canvas0,0,0,1095x857],
        surfaceLock <4a3f09d2, 7bd61863>[count 1, qsz 0, owner <J3D-Renderer-1>]]]]
        at jogamp.opengl.windows.wgl.WindowsWGLContext.makeCurrentImpl(WindowsWGLContext.java:415)
        at jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:834)
        at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:642)
        at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:580)
        at javax.media.j3d.JoglPipeline.useCtx(JoglPipeline.java:7248)
        at javax.media.j3d.Canvas3D.useCtx(Canvas3D.java:4820)
        at javax.media.j3d.Canvas3D.makeCtxCurrent(Canvas3D.java:2407)
        at javax.media.j3d.Canvas3D.makeCtxCurrent(Canvas3D.java:2393)
        at javax.media.j3d.Renderer.doWork(Renderer.java:944)
        at javax.media.j3d.J3dThread.run(J3dThread.java:271)

DefaultRenderingErrorListener.errorOccurred:
UNEXPECTED_RENDERING_ERROR: Renderer: Unexpected RuntimeException caught during rendering
graphicsDevice = D3DGraphicsDevice[screen=0]
canvas = javax.media.j3d.Canvas3D[canvas0,0,0,1095x857]
Caught exception on thread BasinView initialiser-SharedResourceRunner
com.jogamp.opengl.GLException: Error making context 0x30001 current on Thread BasinView initialiser-SharedResourceRunner, drawableWrite 0xf012433, drawableRead 0xf012433, werr: 0, WindowsWGLContext [Version 4.4 (Compat profile, arb, compat[ES2, ES3], FBO, hardware) - 4.4.0 [GL 4.4.0, vendor 0.0.0 (n/a)], options 0x2c03, this 0x50aeb0ff, handle 0x30001, isShared false, jogamp.opengl.gl4.GL4bcImpl@2159a77b,
         quirks: [NoDoubleBufferedBitmap, NoSurfacelessCtx],
        Drawable: WindowsOnscreenWGLDrawable[Realized true,
        Factory   jogamp.opengl.windows.wgl.WindowsWGLDrawableFactory@5921f476,
        Handle    0xf012433,
        Surface   GDISurface[ displayHandle 0x0
, surfaceHandle 0xf012433
, size 64x64
, UOB[ OWNS_SURFACE | WINDOW_INVISIBLE ]
, WindowsWGLGraphicsConfiguration[DefaultGraphicsScreen[WindowsGraphicsDevice[type .windows, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0xbd15867]], idx 0], pfdID 7, ARB-Choosen false,
        requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]],
        chosen    GLCaps[wgl vid 7 gdi: rgba 8/8/8/0, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]]]
, surfaceLock <18ace827, 4bf1db92>[count 2, qsz 0, owner <BasinView initialiser-SharedResourceRunner>]
, GDIDummyUpstreamSurfaceHook[pixel 64x64]
, upstreamSurface false ]]]
        at jogamp.opengl.windows.wgl.WindowsWGLContext.makeCurrentImpl(WindowsWGLContext.java:415)
        at jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:834)
        at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:642)
        at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:580)
        at jogamp.opengl.GLContextImpl.destroy(GLContextImpl.java:467)
        at jogamp.opengl.windows.wgl.WindowsWGLDrawableFactory$SharedResourceImplementation.releaseSharedResource(WindowsWGLDrawableFactory.java:410)
        at jogamp.opengl.SharedResourceRunner.releaseSharedResources(SharedResourceRunner.java:346)
        at jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:328)
        at java.lang.Thread.run(Unknown Source)
Reply | Threaded
Open this post in threaded view
|

Re: Crash of VM when laptop hibernates

gouessej
Administrator
Hi

Please try this simple example. It would help to determine whether this problem comes from Java3D or JOGL. I'm not sure that it can be fixed. Please use the flags -Dsun.java2d.d3d=false and -Dsun.java2d.noddraw=true, maybe it is a viable workaround.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Crash of VM when laptop hibernates

Pol Magermans
Hi Julien,

Unfortunately, My app does require java2d within jFreeChart, I tried d3d false and noddraw true earlier but it disables my curve drawing features.

Nevertheless, I managed to by-pass the hibernate crash using the following hack:

In JoglPipeline.useCtx(Context, Drawable), I catch GLException thrown by context.makeCurrent() and do nothing if thrown
in JoglPipeline.releaseContext(Context), I catch Throwable thrown by context.release() and do nothing with it.

I haven't seen any side effect so far, but I'll keep an eye on it and eventually come back to you.

thanks anyway
Pol.
Reply | Threaded
Open this post in threaded view
|

Re: Crash of VM when laptop hibernates

gouessej
Administrator
I used JFreeChart from 2007 to 2012 and I used those flags without any trouble even under Windows :s

I thought that Java3D tried to make current / release the context by doing several tries like JogAmp's Ardor3D Continuation, it helps with buggy or weak OpenGL drivers. Maybe I can drive Java3D a bit more robust so that you can drop your workaround later. I have to investigate.
Julien Gouesse | Personal blog | Website