Applet Problem On MacOS With JOGL 2.0 RC4

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

Applet Problem On MacOS With JOGL 2.0 RC4

gabnicu
We were NOT able to run any applet with v. 2.0 RC4 - using MacOS 10.6.8, JRE 1.6.0.29, Eclipse
We tested Gears, and got the following:


GearsApplet: init() - begin
GearsApplet: init() - end
GearsApplet: start() - begin
GearsApplet: start() - end
Exception in thread "Timer-0" javax.media.opengl.GLException: javax.media.opengl.GLException: drawable has invalid handle: MacOSXOnscreenCGLDrawable[Realized true,
        Factory   jogamp.opengl.macosx.cgl.awt.MacOSXAWTCGLDrawableFactory@5bd6fbb3,
        handle    0x0,
        Window    JAWT-Window[windowHandle 0x10017b070, surfaceHandle 0x0, bounds [ 0 / 0  200 x 200 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], pos 0/0, size 200x200, visible true, lockedExt false,
        config AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type AWT, connection \Display0, unitID 0, awtDevice CGraphicsDevice[screen=0], handle 0x0], idx 0],
        chosen    GLCaps[offscr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2], pixmap],
        requested GLCaps[on-scr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2]],
        apple.awt.CGraphicsConfig@6b754699[dev=CGraphicsDevice[screen=0],pixfmt=0],
        encapsulated MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type MacOSX, connection decon, unitID 0, handle 0x0], idx 0],
        chosen    GLCaps[offscr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2], pixmap],
        requested GLCaps[on-scr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2]]]],
        awtComponent AWT-GLCanvas[Realized true,
        jogamp.opengl.macosx.cgl.MacOSXOnscreenCGLDrawable,
        Realized true,
        Factory   jogamp.opengl.macosx.cgl.awt.MacOSXAWTCGLDrawableFactory@5bd6fbb3,
        handle    0x0,
        Drawable size 200x200,
        AWT pos 0/0, size 200x200,
        visible true,
        AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type AWT, connection \Display0, unitID 0, awtDevice CGraphicsDevice[screen=0], handle 0x0], idx 0],
        chosen    GLCaps[offscr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2], pixmap],
        requested GLCaps[on-scr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2]],
        apple.awt.CGraphicsConfig@6b754699[dev=CGraphicsDevice[screen=0],pixfmt=0],
        encapsulated MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type MacOSX, connection decon, unitID 0, handle 0x0], idx 0],
        chosen    GLCaps[offscr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2], pixmap],
        requested GLCaps[on-scr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2]]]]]]]
        at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:98)
        at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:197)
        at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:164)
        at javax.media.opengl.awt.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:797)
        at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:400)
        at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:74)
        at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:142)
        at com.jogamp.opengl.util.FPSAnimator$1.run(FPSAnimator.java:128)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
Caused by: javax.media.opengl.GLException: drawable has invalid handle: MacOSXOnscreenCGLDrawable[Realized true,
        Factory   jogamp.opengl.macosx.cgl.awt.MacOSXAWTCGLDrawableFactory@5bd6fbb3,
        handle    0x0,
        Window    JAWT-Window[windowHandle 0x10017b070, surfaceHandle 0x0, bounds [ 0 / 0  200 x 200 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], pos 0/0, size 200x200, visible true, lockedExt false,
        config AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type AWT, connection \Display0, unitID 0, awtDevice CGraphicsDevice[screen=0], handle 0x0], idx 0],
        chosen    GLCaps[offscr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2], pixmap],
        requested GLCaps[on-scr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2]],
        apple.awt.CGraphicsConfig@6b754699[dev=CGraphicsDevice[screen=0],pixfmt=0],
        encapsulated MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type MacOSX, connection decon, unitID 0, handle 0x0], idx 0],
        chosen    GLCaps[offscr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2], pixmap],
        requested GLCaps[on-scr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2]]]],
        awtComponent AWT-GLCanvas[Realized true,
        jogamp.opengl.macosx.cgl.MacOSXOnscreenCGLDrawable,
        Realized true,
        Factory   jogamp.opengl.macosx.cgl.awt.MacOSXAWTCGLDrawableFactory@5bd6fbb3,
        handle    0x0,
        Drawable size 200x200,
        AWT pos 0/0, size 200x200,
        visible true,
        AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type AWT, connection \Display0, unitID 0, awtDevice CGraphicsDevice[screen=0], handle 0x0], idx 0],
        chosen    GLCaps[offscr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2], pixmap],
        requested GLCaps[on-scr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2]],
        apple.awt.CGraphicsConfig@6b754699[dev=CGraphicsDevice[screen=0],pixfmt=0],
        encapsulated MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type MacOSX, connection decon, unitID 0, handle 0x0], idx 0],
        chosen    GLCaps[offscr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2], pixmap],
        requested GLCaps[on-scr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2]]]]]]]
        at jogamp.opengl.GLContextImpl.makeCurrentLocking(GLContextImpl.java:459)
        at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:399)
        at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:370)
        at javax.media.opengl.awt.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:920)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:677)
        at java.awt.EventQueue.access$000(EventQueue.java:85)
        at java.awt.EventQueue$1.run(EventQueue.java:638)
        at java.awt.EventQueue$1.run(EventQueue.java:636)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:647)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Reply | Threaded
Open this post in threaded view
|

Re: Applet Problem On MacOS With JOGL 2.0 RC4

gabnicu
Just to mention, it doesn't work even if we try with the AppletViewer from Eclipse.
Thx
Gabi
Reply | Threaded
Open this post in threaded view
|

Re: Applet Problem On MacOS With JOGL 2.0 RC4

Sven Gothel
Administrator
In reply to this post by gabnicu
On Thursday, December 08, 2011 05:55:13 PM gabnicu [via jogamp] wrote:
>
> We were NOT able to run any applet with v. 2.0 RC4 - using MacOS 10.6.8, JRE
> 1.6.0.29, Eclipse

I have not tested Applets w/ Eclipse yet.

Can you try to validate the Applets:

- http://jogamp.org/deployment/jogamp-current/jogl-test-applets.html
  - Works for me on 10.7 (fine) and 10.6.8 (some freezing happens at startup time)

- http://jogamp.org/deployment/jogamp-current/jogl-demos/applet-gears.html
  - I have attached the exception, similar to yours.

Looks like OS X's CA_Layer ain't complete for AWT/GLCanvas.
I have to admit, I only have tested NEWT Applets (1st URL) so far.

Don't worry, I will fix this.

~Sven

> We tested Gears, and got the following:
>

<snip/>

> Exception in thread "Timer-0" javax.media.opengl.GLException:
> javax.media.opengl.GLException: drawable has invalid handle:
> MacOSXOnscreenCGLDrawable[Realized true,
> Factory  
> jogamp.opengl.macosx.cgl.awt.MacOSXAWTCGLDrawableFactory@5bd6fbb3,
> handle    0x0,
> Window    JAWT-Window[windowHandle 0x10017b070, surfaceHandle 0x0, bounds [
> 0 / 0  200 x 200 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], pos 0/0, size
> 200x200, visible true, lockedExt false,
> config AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type
> AWT, connection \Display0, unitID 0, awtDevice CGraphicsDevice[screen=0],
> handle 0x0], idx 0],
> chosen    GLCaps[offscr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0,
> dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2], pixmap],
> requested GLCaps[on-scr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0,
> dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2]],
> apple.awt.CGraphicsConfig@6b754699[dev=CGraphicsDevice[screen=0],pixfmt=0],
> encapsulated
> MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type
> MacOSX, connection decon, unitID 0, handle 0x0], idx 0],
> chosen    GLCaps[offscr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0,
> dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2], pixmap],
> requested GLCaps[on-scr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0,
> dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2]]]],
> awtComponent AWT-GLCanvas[Realized true,
> jogamp.opengl.macosx.cgl.MacOSXOnscreenCGLDrawable,
> Realized true,
> Factory  
> jogamp.opengl.macosx.cgl.awt.MacOSXAWTCGLDrawableFactory@5bd6fbb3,
> handle    0x0,
> Drawable size 200x200,
> AWT pos 0/0, size 200x200,
> visible true,
> AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type AWT,
> connection \Display0, unitID 0, awtDevice CGraphicsDevice[screen=0], handle
> 0x0], idx 0],
> chosen    GLCaps[offscr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0,
> dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2], pixmap],
> requested GLCaps[on-scr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0,
> dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2]],
> apple.awt.CGraphicsConfig@6b754699[dev=CGraphicsDevice[screen=0],pixfmt=0],
> encapsulated
> MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type
> MacOSX, connection decon, unitID 0, handle 0x0], idx 0],
> chosen    GLCaps[offscr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0,
> dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2], pixmap],
> requested GLCaps[on-scr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0,
> dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2]]]]]]]
> at
> jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:98)
> at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:197)
> at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:164)
> at
> javax.media.opengl.awt.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:797)
> at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:400)
> at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:74)
> at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:142)
> at com.jogamp.opengl.util.FPSAnimator$1.run(FPSAnimator.java:128)
> at java.util.TimerThread.mainLoop(Timer.java:512)
> at java.util.TimerThread.run(Timer.java:462)
> Caused by: javax.media.opengl.GLException: drawable has invalid handle:
> MacOSXOnscreenCGLDrawable[Realized true,
> Factory  
> jogamp.opengl.macosx.cgl.awt.MacOSXAWTCGLDrawableFactory@5bd6fbb3,
> handle    0x0,
> Window    JAWT-Window[windowHandle 0x10017b070, surfaceHandle 0x0, bounds [
> 0 / 0  200 x 200 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], pos 0/0, size
> 200x200, visible true, lockedExt false,
> config AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type
> AWT, connection \Display0, unitID 0, awtDevice CGraphicsDevice[screen=0],
> handle 0x0], idx 0],
> chosen    GLCaps[offscr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0,
> dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2], pixmap],
> requested GLCaps[on-scr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0,
> dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2]],
> apple.awt.CGraphicsConfig@6b754699[dev=CGraphicsDevice[screen=0],pixfmt=0],
> encapsulated
> MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type
> MacOSX, connection decon, unitID 0, handle 0x0], idx 0],
> chosen    GLCaps[offscr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0,
> dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2], pixmap],
> requested GLCaps[on-scr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0,
> dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2]]]],
> awtComponent AWT-GLCanvas[Realized true,
> jogamp.opengl.macosx.cgl.MacOSXOnscreenCGLDrawable,
> Realized true,
> Factory  
> jogamp.opengl.macosx.cgl.awt.MacOSXAWTCGLDrawableFactory@5bd6fbb3,
> handle    0x0,
> Drawable size 200x200,
> AWT pos 0/0, size 200x200,
> visible true,
<snip/>

applet-osx-awt_glcanvas.txt (98K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Applet Problem On MacOS With JOGL 2.0 RC4

gabnicu
Hello Sven,

We did test the link you mention:
http://jogamp.org/deployment/jogamp-current/jogl-demos/applet-gears.html
and get crashes in Safari & Chrome - same error:

Exception in thread "thread applet-demos.applets.GearsApplet-1" java.lang.ExceptionInInitializerError
        at javax.media.nativewindow.NativeWindowFactory._getNativeWindowingType(NativeWindowFactory.java:105)
        at javax.media.nativewindow.NativeWindowFactory.initSingleton(NativeWindowFactory.java:181)
        at javax.media.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1168)
        at javax.media.opengl.GLProfile.access$000(GLProfile.java:71)
        at javax.media.opengl.GLProfile$1.run(GLProfile.java:112)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.media.opengl.GLProfile.initSingleton(GLProfile.java:110)
        at demos.applets.GearsApplet.init(GearsApplet.java:19)
        at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1639)
        at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.RuntimeException: Incompatible MachineDescriptions:
 Static MachineDescriptionStatic: X86_32_UNIX(1): MachineDescription: runtimeValidated false, littleEndian true, 32Bit true, primitive size / alignment:
  int8    1 / 1, int16   2 / 2
  int     4 / 4, long    4 / 4
  int32   4 / 4, int64   8 / 4
  float   4 / 4, double  8 / 4, ldouble 12 / 4
  pointer 4 / 4, page    4096
 Runtime MachineDescription: runtimeValidated true, littleEndian true, 32Bit true, primitive size / alignment:
  int8    1 / 1, int16   2 / 2
  int     4 / 4, long    4 / 4
  int32   4 / 4, int64   8 / 4
  float   4 / 4, double  8 / 4, ldouble 16 / 16
  pointer 4 / 4, page    4096
        at com.jogamp.common.os.Platform.<clinit>(Platform.java:193)
        ... 10 more
Reply | Threaded
Open this post in threaded view
|

Re: Applet Problem On MacOS With JOGL 2.0 RC4

gabnicu
In reply to this post by Sven Gothel
And yes, the first link you mentioned works fine, after some delay, exactly as you mentioned.
What is the difference between the 2 types of applets?
Thx,
Gabi
Reply | Threaded
Open this post in threaded view
|

Re: Applet Problem On MacOS With JOGL 2.0 RC4

Sven Gothel
Administrator
On Friday, December 09, 2011 04:07:22 PM gabnicu [via jogamp] wrote:
>
> And yes, the first link you mentioned works fine, after some delay, exactly
> as you mentioned.
> What is the difference between the 2 types of applets?

The working one uses NEWT as the underlying NativeWindow adapter
attaching to the AWT Applets via native parenting.
Well, in case of OS X and the offscreen CA_Layer this is not completly true,
since it pushes it's offscreen data to the parent's layer.

However, this OS X offscreen CA_Layer mechanism hasn't been tested yet
w/ pure AWT Applet (ie. GLCanvas) .. but this is next on my list.

~Sven

> Thx,
> Gabi