DefaultGraphicsConfiguration cast exception

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

DefaultGraphicsConfiguration cast exception

runiter
One of my clients got the following exception when trying to run my Ardor3D software in his Mac laptop:

java.lang.ClassCastException: javax.media.nativewindow.DefaultGraphicsConfiguration cannot be cast to com.jogamp.nativewindow.awt.AWTGraphicsConfiguration
    at javax.media.opengl.awt.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:1099)
    at javax.media.opengl.awt.GLCanvas.addNotify(GLCanvas.java:529)
    at java.awt.Container.addNotify(Container.java:2769)
    at javax.swing.JComponent.addNotify(JComponent.java:4743)
    at java.awt.Container.addNotify(Container.java:2769)
    at javax.swing.JComponent.addNotify(JComponent.java:4743)
    at java.awt.Container.addNotify(Container.java:2769)
    at javax.swing.JComponent.addNotify(JComponent.java:4743)
    at java.awt.Container.addNotify(Container.java:2769)
    at javax.swing.JComponent.addNotify(JComponent.java:4743)
    at java.awt.Container.addNotify(Container.java:2769)
    at javax.swing.JComponent.addNotify(JComponent.java:4743)
    at javax.swing.JRootPane.addNotify(JRootPane.java:756)
    at java.awt.Container.addNotify(Container.java:2769)
    at java.awt.Window.addNotify(Window.java:770)
    at java.awt.Frame.addNotify(Frame.java:487)
    at java.awt.Window.show(Window.java:1031)
    at java.awt.Component.show(Component.java:1651)
    at java.awt.Component.setVisible(Component.java:1603)
    at java.awt.Window.setVisible(Window.java:1014)
    at org.concord.energy3d.MainApplication.main(MainApplication.java:35)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at com.sun.javaws.Launcher.executeApplication(Unknown Source)
    at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
    at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
    at com.sun.javaws.Launcher.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:722)
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: DefaultGraphicsConfiguration cast exception

gouessej
Administrator
Hi

We need a small test case to reproduce this bug. I don't understand why a DefaultGraphicsConfiguration is returned by chooseGraphicsConfiguration in this case.

Please be more precise about the version of Mac and the JVM.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: DefaultGraphicsConfiguration cast exception

runiter
This post was updated on .
I got myself a test Mac to test it but I get a different exception on this one.

Java Web Start 1.6.0_37
MacBook1,1
Intel GMA 950:

  Chipset Model: GMA 950
  Type: GPU
  Bus: Built-In
  VRAM (Total): 64 MB of Shared System Memory
  Vendor: Intel (0x8086)
  Device ID: 0x27a2
  Revision ID: 0x0003

Here is the exception I get:

java.lang.NullPointerException
        at jogamp.opengl.gl4.GL4bcImpl.glFlush(GL4bcImpl.java:5334)
        at jogamp.opengl.macosx.cgl.MacOSXCGLContext$NSOpenGLImpl.release(MacOSXCGLContext.java:776)
        at jogamp.opengl.macosx.cgl.MacOSXCGLContext.destroyContextARBImpl(MacOSXCGLContext.java:260)
        at jogamp.opengl.GLContextImpl.createContextARBVersions(GLContextImpl.java:974)
        at jogamp.opengl.GLContextImpl.createContextARBMapVersionsAvailable(GLContextImpl.java:911)
        at jogamp.opengl.GLContextImpl.mapGLVersions(GLContextImpl.java:858)
        at jogamp.opengl.GLContextImpl.createContextARB(GLContextImpl.java:761)
        at jogamp.opengl.macosx.cgl.MacOSXCGLContext.createImpl(MacOSXCGLContext.java:299)
        at jogamp.opengl.macosx.cgl.MacOSXOnscreenCGLContext.createImpl(MacOSXOnscreenCGLContext.java:80)
        at jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:592)
        at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:509)
        at jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateOSXSharedResource(MacOSXCGLDrawableFactory.java:241)
        at jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.createSharedResource(MacOSXCGLDrawableFactory.java:289)
        at javax.media.opengl.GLProfile.initProfilesForDeviceCritical(GLProfile.java:1560)
        at javax.media.opengl.GLProfile.initProfilesForDevice(GLProfile.java:1521)
        at javax.media.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1490)
        at javax.media.opengl.GLProfile.access$100(GLProfile.java:76)
        at javax.media.opengl.GLProfile$1.run(GLProfile.java:157)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.media.opengl.GLProfile.initSingleton(GLProfile.java:123)
        at javax.media.opengl.GLProfile.getProfileMap(GLProfile.java:1857)
        at javax.media.opengl.GLProfile.get(GLProfile.java:801)
        at javax.media.opengl.GLProfile.get(GLProfile.java:830)
        at javax.media.opengl.GLProfile.getMaxFixedFunc(GLProfile.java:636)
        at com.ardor3d.framework.jogl.CapsUtil.getCapsForSettings(CapsUtil.java:34)
        at com.ardor3d.framework.jogl.JoglAwtCanvas.<init>(JoglAwtCanvas.java:42)
        at org.concord.energy3d.scene.SceneManager.<init>(SceneManager.java:213)
        at org.concord.energy3d.scene.SceneManager.<clinit>(SceneManager.java:150)
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: DefaultGraphicsConfiguration cast exception

gouessej
Administrator
Can you reproduce it with an example provided with Ardor3D? Which version of Mac OS X do you use? 10.7?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: DefaultGraphicsConfiguration cast exception

runiter
Yes, I can reproduce it with JoglAwtExample.
Mac OS X version is 10.6.8

Here is the exception of that JoglAwtExample generates:


java.lang.NullPointerException
        at jogamp.opengl.gl4.GL4bcImpl.glFlush(GL4bcImpl.java:5334)
        at jogamp.opengl.macosx.cgl.MacOSXCGLContext$NSOpenGLImpl.release(MacOSXCGLContext.java:776)
        at jogamp.opengl.macosx.cgl.MacOSXCGLContext.destroyContextARBImpl(MacOSXCGLContext.java:260)
        at jogamp.opengl.GLContextImpl.createContextARBVersions(GLContextImpl.java:974)
        at jogamp.opengl.GLContextImpl.createContextARBMapVersionsAvailable(GLContextImpl.java:911)
        at jogamp.opengl.GLContextImpl.mapGLVersions(GLContextImpl.java:858)
        at jogamp.opengl.GLContextImpl.createContextARB(GLContextImpl.java:761)
        at jogamp.opengl.macosx.cgl.MacOSXCGLContext.createImpl(MacOSXCGLContext.java:299)
        at jogamp.opengl.macosx.cgl.MacOSXOnscreenCGLContext.createImpl(MacOSXOnscreenCGLContext.java:80)
        at jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:592)
        at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:509)
        at jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateOSXSharedResource(MacOSXCGLDrawableFactory.java:241)
        at jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.createSharedResource(MacOSXCGLDrawableFactory.java:289)
        at javax.media.opengl.GLProfile.initProfilesForDeviceCritical(GLProfile.java:1560)
        at javax.media.opengl.GLProfile.initProfilesForDevice(GLProfile.java:1521)
        at javax.media.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1490)
        at javax.media.opengl.GLProfile.access$100(GLProfile.java:76)
        at javax.media.opengl.GLProfile$1.run(GLProfile.java:157)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.media.opengl.GLProfile.initSingleton(GLProfile.java:123)
        at javax.media.opengl.GLProfile.getProfileMap(GLProfile.java:1857)
        at javax.media.opengl.GLProfile.get(GLProfile.java:801)
        at javax.media.opengl.GLProfile.get(GLProfile.java:830)
        at javax.media.opengl.GLProfile.getMaxFixedFunc(GLProfile.java:636)
        at com.ardor3d.framework.jogl.CapsUtil.getCapsForSettings(CapsUtil.java:34)
        at com.ardor3d.framework.jogl.JoglAwtCanvas.<init>(JoglAwtCanvas.java:42)
        at com.ardor3d.example.canvas.JoglAwtExample.addCanvas(JoglAwtExample.java:153)
        at com.ardor3d.example.canvas.JoglAwtExample.main(JoglAwtExample.java:105)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.javaws.Launcher.executeApplication(Launcher.java:1919)
        at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1852)
        at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1614)
        at com.sun.javaws.Launcher.run(Launcher.java:139)
        at java.lang.Thread.run(Thread.java:680)

Edit: full log is attached.
log.rtf
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: DefaultGraphicsConfiguration cast exception

gouessej
Administrator
Thank you runiter. Maybe you will have to fill a bug report.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: DefaultGraphicsConfiguration cast exception

runiter
Where can I file a bug report?
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: DefaultGraphicsConfiguration cast exception

gouessej
Administrator