jogl application crashing X, how to debug ?

Hello everybody

my application is, after a random amount of time, crashing X :
i can move the mouse, but clicking has no effect, keyboard is not responding (CTRL-ALT-DEL, CTRL-ALT-F123456…)
but i can still access the computer via ssh (killing java has no effect)

at this moment i was unable to reproduce this on another computer (with another ATI card, not the same model however)

I guess that a certain sequence of opengl command are bowsering X …
how can i determine the last 10-20 opengl commands before the crash ? is there a log somewhere ? can i create one with DebugGL ?

thx

(i’m under Debian 2.6.11-1-686, x.org)

Hummm

it seems that the crash occurs where later versions of jogl would do the “xlib unexcpeted async sequence” stuff …

What graphics card and drivers?

Does the stability improve if you specify -Djogl.GLContext.noopt on the command line?

it also crashed with -Djogl.GLContext.noopt

my drivers are fglrx-driver_8.14.13-1_i386 for the the ATI Radeon 9600

Sounds like buggy ATI drivers to me. You should try upgrading them and report problems like this to ATI.

ARGLLL
I moved to 2.6.16-1-686, with a NVIDIA card and last nvidia drivers on Xorg 7.0.0
i launch my application and i get
Xlib: unexpected async reply (sequence 0x12e)!

I thought this was an ATI bug, is there some way that my jogl code is doing that ?

I don’t know. It’s possible. The TraceGL will produce printed output for all OpenGL calls which you might be able to use for debugging. If the JOGL demos work properly on your machine then that would indicate a problem in the application.

i checked, every demo works :’(
i will check tracegl

Ok, problem solved

I narrowed down the code to the minimum crashing code. The problem is in the GLCanvas, i don’t even need a GLEventListener
the crashing code is when i add the GLcanvas to the JFrame :


package fr.ustrasbg.ibmc.assemble;
import javax.swing.*;
import javax.media.opengl.GLCanvas;
import java.awt.*;

public final class Main extends JFrame
{
    static Main window;
    public static void main(String[] args)
    {
        window = new Main();
    }

    public Main()
    {
        JPopupMenu.setDefaultLightWeightPopupEnabled(false);
        GLCanvas canvas = new GLCanvas();
        canvas.setSize(800, 800);
        this.getContentPane().add(canvas, BorderLayout.CENTER);// this line crashes
        this.pack();
        this.setVisible(true);
    }
}

in fact, when upgrading ma system, my version of java was replaced by /usr/lib/jvm/java-gcj/jre/bin/java
which have problems with AWT

So are things working for you at this point with the Sun JRE?

Note I’ll be away for a week starting tomorrow so will be slow on replies.

with the other jre (gcj), the this.getContentPane.add(canvas); crashed the application

now with j2sk1.4.2 the application works, but still does this xlib problem at a random point.
sometimes it crashes almost immediatly, sometimes i can use it for ten minutes

I’ll try to log exactly every opengl commands and see if there is a correlation at crashing point
also, a friend of mine suspect it comes from the fact that i’m running sid/testing version of debian

but what is weird is that a add absolutly no problem before april 18th, so either I changed something import in my code at that point (i’ll check in the CVS) or I had a mother board failure (the RAM is ok)

In JSR-231 beta 4 (April 20) there were some significant changes to the locking protocol used internally to the JOGL library on X11 platforms. However if this were the root cause of your problem then specifying -Djogl.GLContext.noopt on the command line should revert back to the pre-beta 4 behavior. I would suggest you try cutting out portions of your application to narrow down where the problem is coming from. If it turns out to be a bug in JOGL we’ll gladly fix or work around it.

since i tried to debug it (with tracegl) i was unable to crash my soft ;D