Summary: | Native window events not delivered when doing GLProfile.initSingleton() | ||
---|---|---|---|
Product: | [JogAmp] Jogl | Reporter: | Paul Alesius <Paul> |
Component: | x11 | Assignee: | Sven Gothel <sgothel> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | Paul, wwalker3 |
Priority: | --- | ||
Version: | 2 | ||
Hardware: | pc_x86_64 | ||
OS: | linux | ||
Type: | --- | SCM Refs: |
d2ec9f34cf2b3a54c80e2e23671d8fa8a5397d5d
|
Workaround: | --- | ||
Attachments: | Debug output of program |
Description
Paul Alesius
2010-07-03 18:05:55 CEST
Created attachment 155 [details]
Debug output of program
I've seen this too. The general symptom is that if I comment out the first four lines of GL stuff below (plus "frame.add(canvas)"), the app works fine. When I comment in any of those lines, the app doesn't get its close message. It also doesn't get other native messages -- I tried mouse move too. Also, the line "frame.add(canvas)" makes the app unterminatable by Eclipse. I have to go the the command line and kill it with "kill -KILL". Commenting out this line makes the app terminateable by Eclipse again. Here's the bug report info: Source code: included below Invocation command-line: invoked from inside Eclipse OS & version: CentOS 5.4 2.6.18-164.el5 Architecture: x86_64 Java version: 1.6.0_21 JOGL Source/build versions: jogl-b187-2010-09-30_18-13-01 Exceptions, stdout/stderr log file: included below package name.wadewalker.test; import java.awt.Frame; import java.awt.event.MouseEvent; import java.awt.event.MouseMotionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.media.opengl.*; import javax.media.opengl.awt.GLCanvas; import com.jogamp.opengl.util.*; public class SimpleScene implements GLEventListener { static { GLProfile.initSingleton(); } public static void main(String[] args) { GLProfile glp = GLProfile.getDefault(); GLCapabilities caps = new GLCapabilities(glp); GLCanvas canvas = new GLCanvas(caps); Frame frame = new Frame("AWT Window Test"); frame.setSize(300, 300); frame.add(canvas); frame.setVisible(true); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); canvas.addGLEventListener(new SimpleScene()); } @Override public void display(GLAutoDrawable drawable) { update(); render(drawable); } @Override public void dispose(GLAutoDrawable drawable) { } @Override public void init(GLAutoDrawable drawable) { } @Override public void reshape(GLAutoDrawable drawable, int x, int y, int w, int h) { } private void update() { } private void render(GLAutoDrawable drawable) { GL2 gl = drawable.getGL().getGL2(); gl.glClear(GL.GL_COLOR_BUFFER_BIT); // draw a triangle filling the window gl.glBegin(GL.GL_TRIANGLES); gl.glColor3f(1, 0, 0); gl.glVertex2f(-1, -1); gl.glColor3f(0, 1, 0); gl.glVertex2f(0, 1); gl.glColor3f(0, 0, 1); gl.glVertex2f(1, -1); gl.glEnd(); } } was fixed .. http://jogamp.org/chuck/job/jogl/label=linux-x86_64/lastCompletedBuild/testReport/com.jogamp.test.junit.jogl.awt/TestAWT02WindowClosing/test01WindowClosing/ sorry don't know when anymore, probably d2ec9f34cf2b3a54c80e2e23671d8fa8a5397d5d, or another deadlock change. please verify. Tested and verified that b211 doesn't show this bug anymore. Both reshape and mousemove events show up properly now. |