GLCanvas / GLJPanel makes application freeze

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

GLCanvas / GLJPanel makes application freeze

dop
Hey there,

I am using JOGL on my Ubuntu 11.10 64bit notebook. As long as neither Swing nor AWT are involved, everything works just fine.
But as soon as I add a GLCanvas or GLJPanel to a Frame or JFrame, my application doesn't react to user input anymore (I have to kill it from command line), uses about 99 percent of CPU time and doesn't show anything except for a blank grey window.
The code from the wiki-entry (http://jogamp.org/wiki/index.php/Using_JOGL_in_AWT_SWT_and_Swing) suffices to produce the error.

There does not seem to be a problem with displaying OpenGL inside of Swing or AWT components per se, for when I step through the program with a debugger, my scene is actually being rendered correctly.  Using an Animator or FPSAnimator does not solve the problem.
I hope you guys can point;q=0.7,*;q=0.7
Connection: keep-alive
Referer: http://sweet-acid.908975.n3.nabb
dop
Reply | Threaded
Open this post in threaded view
|

Re: GLCanvas / GLJPanel makes application freeze

dop
I'm sorry for the rubbish that magically appeared and replaced the end of my last post.
it was meant to read
"...point me in the right direction :)
best,
dop"
Reply | Threaded
Open this post in threaded view
|

Re: GLCanvas / GLJPanel makes application freeze

gouessej
Administrator
Hi

Do you use Unity, GNOME or KDE? Do you reproduce this bug with NEWT? Which build of JOGL 2 do you use? What's your graphics card?
Julien Gouesse | Personal blog | Website
dop
Reply | Threaded
Open this post in threaded view
|

Re: GLCanvas / GLJPanel makes application freeze

dop
Now that's a lot of questions :)

I'm using GNOME 3, I do not reproduce that bug with NEWT, according to the readme that shipped with my jogamp archive I'm using "build version 2.0-b45-20111219, based on: branch  rc, commit 2f2b071d60f5b630989140b1ade49d648ad78c20" and my graphics card is an Intel Graphics Media Accelerator HD onboard chip.

Hope that helps,
dop
Reply | Threaded
Open this post in threaded view
|

Re: GLCanvas / GLJPanel makes application freeze

Wade Walker
Administrator
In reply to this post by dop
I've seen some similar freeze recently on 32-bit Ubuntu 11.10. You might try running the built-in "gears" test to see if you can see the 3D gears spinning. You can set it up like this:

mkdir jar
mkdir lib

cp gluegenjars/gluegen-rt.jar jar
cp somewhere/junit.jar jar
cp jogljars/jogl.all.jar jar
cp jogljars/jogl.test.jar jar

cp gluegenlibs/libgluegen-rt.so lib
cp jogllibs/*.so lib

java -Dsun.java2d.noddraw=true -Dsun.java2d.opengl=false -Djava.library.path=lib -Djogamp.debug=all -Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all -classpath jar/gluegen-rt.jar:jar/jogl.all.jar:jar/jogl.test.jar:jar/junit.jar com.jogamp.opengl.test.junit.jogl.demos.gl2.awt.TestGearsAWT

The JARs and SO files are in the JOGL build you downloaded, and you should be able to get junit.jar from http://sourceforge.net/projects/junit/files/ if you don't already have it somewhere.
dop
Reply | Threaded
Open this post in threaded view
|

Re: GLCanvas / GLJPanel makes application freeze

dop
The jUnit example reveals the same problems: Blank window, killall -9 is the only way to terminate.

Do you know if this problem is related to Ubuntu driver issues or something similar?
Reply | Threaded
Open this post in threaded view
|

Re: GLCanvas / GLJPanel makes application freeze

gouessej
Administrator
I'm sad, there are some problems with OpenJDK under Ubuntu, some freezes on applets, etc... I don't reproduce these problems on Mageia Linux 1 and Cent OS Linux 5.3. I really think I will use GLWindow with NewtCanvasAWT instead of GLCanvas when it is possible.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: GLCanvas / GLJPanel makes application freeze

Wade Walker
Administrator
In reply to this post by dop
dop wrote
The jUnit example reveals the same problems: Blank window, killall -9 is the only way to terminate.

Do you know if this problem is related to Ubuntu driver issues or something similar?
Not sure what it's related to yet, but if you capture that debug output to a log file, and attach it to a Bugzilla report, it'll definitely help make sure this gets fixed. I just noticed some freezing in the process of working on another unrelated bug, so I haven't been able to really look into it.