Java-Gaming.org
Java4K - to go         Javadoc:
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, peek at the official java tutorials or join us at irc #jgo.
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  exception in jogl rc7 and above in linux-i586  (Read 1378 times)
0 Members and 1 Guest are viewing this topic.
Offline curioussoul

JGO n00b
*

Posts: 3



« on: 2010-03-13 11:31:58 »

Hi,
I'm having problems running jogl 1.1.1 under Linux. It's Linux/Debian, and I'm using Java 6 and Xith3D scenegraph.
I get an exception when running my app with newest versions of JOGL (I'm using linux-i586 version):

Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.nio.DirectByteBuffer cannot be cast to com.sun.opengl.impl.x11.JAWT_X11DrawingSurfaceInfo
        at com.sun.opengl.impl.x11.X11OnscreenGLDrawable.lockSurface(X11OnscreenGLDrawable.java:152)
        at com.sun.opengl.impl.x11.X11OnscreenGLContext.makeCurrentImpl(X11OnscreenGLContext.java:61)
        at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:134)
        at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:182)
        at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:412)
        at javax.media.opengl.GLCanvas.display(GLCanvas.java:244)
        at javax.media.opengl.GLCanvas.paint(GLCanvas.java:277)
        at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
        at sun.awt.X11.XRepaintArea.paintComponent(XRepaintArea.java:56)
        at sun.awt.RepaintArea.paint(RepaintArea.java:224)
        at sun.awt.X11.XComponentPeer.handleEvent(XComponentPeer.java:695)
        at java.awt.Component.dispatchEventImpl(Component.java:4706)
        at java.awt.Component.dispatchEvent(Component.java:4460)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

I'm getting jogl from: http://download.java.net/media/jogl/builds/archive/
Now, the problem exists when I use 1.1.1-rc7 or above. What I could notice is that from rc7 and up the jogl_awt.so changed (used to be 9772b in size, then changed to 8997b in rc7). Also, if you look into the jars with native libs for webstart (jogl-natives-linux-i586.jar) and the zips with OS-specific distrubutions (jogl-1.1.1-rc[56]-linux-i586.zip) then at least for rc5 and rc6 webstart jars contain different jogl_awt.so (8997b size) than the OS-specific archives (9772b). Looking at the changes in files, it would suggest some inconsistency with packaging.

However, I can successfully run any new version (incl. 1.1.1a) of JOGL if I take the 9772b jogl_awt.so from jogl-1.1.1-rc6-linux-i586.zip and replace the original .so lib bundled in distribution. This however seems a bit of a hack, therefore I'd like to ask if this is any known problem. As of  doing my homework - yes, I've asked Google for the exception message and it returns only few results and no answer applies to me, so after spending few hours tracking the source of problem I'm asking the wise men (and women Wink ) here.
Thanks & regards
Offline gouessej

JGO Kernel
*****

Posts: 3433
Medals: 26


TUER


« Reply #1 on: 2010-03-13 11:44:10 »

Why don't you use JOGL 1.1.1a as it works? I use it under Mandriva Linux and everything is ok (except the fullscreen bug of KDE 4.3/4.4).

Julien Gouesse
Offline curioussoul

JGO n00b
*

Posts: 3



« Reply #2 on: 2010-03-15 01:59:19 »

Well, I do use 1.1.1a but to make it work I needed to overwrite jogl_awt.so with the one from 1.1.1-rc6. This is not a show-stopper for me but I wonder why the official build archives seem inconsistent and I'm a bit concerned about stability...
Games published by our own members! Go get 'em!
Offline gouessej

JGO Kernel
*****

Posts: 3433
Medals: 26


TUER


« Reply #3 on: 2010-03-15 14:40:40 »

Well, I do use 1.1.1a but to make it work I needed to overwrite jogl_awt.so with the one from 1.1.1-rc6. This is not a show-stopper for me but I wonder why the official build archives seem inconsistent and I'm a bit concerned about stability...
You should not need to do this. Make some cleanup on your machine. I already used JOGL 1.1.1a even on other versions of Linux including Ubuntu, Fedora 10, etc... and I did not have such problems. In my humble opinion, another JAR or another native modules (.so) is somewhere in a directory in your class path. Don't put JARs and native modules in your JVM and try my game (or another application relying on JOGL 1.1.1a) to check if JOGL 1.1.1a really works on your machine.

Julien Gouesse
Offline curioussoul

JGO n00b
*

Posts: 3



« Reply #4 on: 2010-03-16 14:30:24 »

OK, you're right Smiley
One of the projects (Netbeans) referenced by my project did include jogl.jar.. an older version...
Fortunately adding -verbose:class to cmd-line helped find the traitor Wink
So: BIG thanks for help.
Regards
Offline gouessej

JGO Kernel
*****

Posts: 3433
Medals: 26


TUER


« Reply #5 on: 2010-03-17 04:46:20 »

OK, you're right Smiley
One of the projects (Netbeans) referenced by my project did include jogl.jar.. an older version...
Fortunately adding -verbose:class to cmd-line helped find the traitor Wink
So: BIG thanks for help.
Regards
You're welcome. I'm glad to see you solved your problem. I have used JOGL for years and I would not use it if it did not work on Linux. You should look at this too, you're concerned as you use Linux:
http://www.java-gaming.org/topics/bad-piece-of-news-fullscreen-mode-broken-in-kde-4-3-4-4/22108/msg/182544/view.html#msg182544

Julien Gouesse
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.12 seconds with 22 queries.