turning off X11Util messages

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

turning off X11Util messages

Martin Hegedus
I just downloaded and installed the latest JOGL by means of jogamp-all-platforms.7z.

After installing, I compiled and ran my Java code and got the following message when I exited the code.  Is there a way of turning the message off?  After testing my code for a short while, everything seems to be working as it did before.

X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 1/1, reusable (open, marked uncloseable): 0, pending (open in creation order): 1)
X11Util: Open X11 Display Connections: 1
X11Util: Open[0]: NamedX11Display[:0.0, 0x852c5c0, refCount 1, unCloseable false]

Regards,
Martin Hegedus
Reply | Threaded
Open this post in threaded view
|

Re: turning off X11Util messages

Sven Gothel
Administrator
On 03/09/2013 07:09 PM, Martin Hegedus [via jogamp] wrote:

> I just downloaded and installed the latest JOGL by means of
> jogamp-all-platforms.7z.
>
> After installing, I compiled and ran my Java code and got the following
> message when I exited the code.  Is there a way of turning the message off?
>  After testing my code for a short while, everything seems to be working as it
> did before.
>
> X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 1/1,
> reusable (open, marked uncloseable): 0, pending (open in creation order): 1)
> X11Util: Open X11 Display Connections: 1
> X11Util: Open[0]: NamedX11Display[:0.0, 0x852c5c0, refCount 1, unCloseable false]
Try to close the NEWT window or AWT frame etc,
this message is a reminder for not closing precious resources.

~Sven

>
> Regards,
> Martin Hegedus


signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: turning off X11Util messages

Martin Hegedus
Thanks, I'll give that a shot on Monday.
Reply | Threaded
Open this post in threaded view
|

Re: turning off X11Util messages

Martin Hegedus
Finally had a chance to get back to this but still have not been able to get the X11 message to go away.

I've listed the test program I'm using below.  If I do a System.exit(0) then I get the X11Util.Display message.  If I use frame.dispose() I get a "A fatal error has been detected by the Java Runtime Environment:" segfault.  canvas.destroy also crashes the program.

Any thoughts?
Thanks.

===========
import java.awt.Frame;
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 SimpleTest implements GLEventListener {
    public static void main(String[] args) {
        GLProfile glp = GLProfile.getDefault();
        GLCapabilities caps = new GLCapabilities(glp);
        final GLCanvas canvas = new GLCanvas(caps);

        final Frame frame = new Frame("Test");
        frame.setSize(300, 300);
        frame.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                //canvas.destroy();
                //frame.dispose();
                System.exit(0);
            }
        });
       
        canvas.addGLEventListener(new SimpleTest());
        frame.add(canvas);
       
        frame.setVisible(true);
    }
    public void display(GLAutoDrawable drawable) {
        drawable.getGL().getGL2().glClear(GL.GL_COLOR_BUFFER_BIT);
    }
    public void dispose(GLAutoDrawable drawable) { }
    public void init(GLAutoDrawable drawable) { }
    public void reshape(GLAutoDrawable drawable, int x, int y, int w, int h) { }
}
Reply | Threaded
Open this post in threaded view
|

Re: turning off X11Util messages

Martin Hegedus
I ran the SimpleTest code with  -Djogl.debug -Djogl.verbose, does this output help?  I've only shown the last bit.  If required I could post all of it.  I gather the exceptions are for information purposes only, rather than a real error.

...
SharedResourceRunner.stop() - Thread-4
SharedResourceRunner.run(): RELEASE START - main-SharedResourceRunner
Shutdown Shared:
Device  : X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x81264e0, ResourceToolkitLock[obj 0xf8f7db, isOwner false, <15856a5, a084f8>[count 0, qsz 0, owner <NULL>]]]
Screen  : X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x81264e0, ResourceToolkitLock[obj 0xf8f7db, isOwner false, <15856a5, a084f8>[count 0, qsz 0, owner <NULL>]]], idx 0]
Drawable: X11OnscreenGLXDrawable[Realized true,
        Factory   jogamp.opengl.x11.glx.X11GLXDrawableFactory@c09554,
        Handle    0x4c00002,
        Surface   WrappedSurface[ X11DummyUpstreamSurfaceHook[ 64x64], displayHandle 0x81264e0, surfaceHandle 0x4c00002, size 64x64, UOB[ OWNS_SURFACE | WINDOW_INVISIBLE ], surfaceLock <18bf072, 56f631>[count 0, qsz 0, owner <NULL>] ]]
CTX     : X11OnscreenGLXContext [OpenGL 2.1, options 0x8202, 2.1 (Compatibility profile, FBO, software) - 2.1 Mesa 7.8.2, this 0x1d6f122, handle 0x8228568, jogamp.opengl.gl4.GL4bcImpl@7109c4,
         quirks: [NoSetSwapIntervalPostRetarget],
        Drawable: X11OnscreenGLXDrawable[Realized true,
        Factory   jogamp.opengl.x11.glx.X11GLXDrawableFactory@c09554,
        Handle    0x4c00002,
        Surface   WrappedSurface[ X11DummyUpstreamSurfaceHook[ 64x64], displayHandle 0x81264e0, surfaceHandle 0x4c00002, size 64x64, UOB[ OWNS_SURFACE | WINDOW_INVISIBLE ], surfaceLock <18bf072, 56f631>[count 0, qsz 0, owner <NULL>] ]], direct true]
java.lang.Exception: Stack trace
        at java.lang.Thread.dumpStack(Thread.java:1206)
        at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.releaseSharedResource(X11GLXDrawableFactory.java:296)
        at jogamp.opengl.SharedResourceRunner.releaseSharedResources(SharedResourceRunner.java:314)
        at jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:294)
        at java.lang.Thread.run(Thread.java:619)
main-SharedResourceRunner: GLContextImpl.destroy.0: obj 0x1d6f122, ctx 0x8228568, surf 0x4c00002, isShared false - <4ecfdd, 30d82d>[count 0, qsz 0, owner <NULL>]
main-SharedResourceRunner: GLContext.resetStates()
main-SharedResourceRunner: setRealized: X11OnscreenGLXDrawable true -> false
SharedResourceRunner.run(): RELEASE END - main-SharedResourceRunner
EGLDisplayUtil.EGLDisplays: Shutdown (open: 0)
java.lang.Exception: Stack trace
        at java.lang.Thread.dumpStack(Thread.java:1206)
        at jogamp.opengl.egl.EGLDisplayUtil.shutdown(EGLDisplayUtil.java:71)
        at jogamp.opengl.egl.EGLDrawableFactory.destroy(EGLDrawableFactory.java:242)
        at javax.media.opengl.GLDrawableFactory.shutdownImpl(GLDrawableFactory.java:223)
        at javax.media.opengl.GLDrawableFactory.access$100(GLDrawableFactory.java:98)
        at javax.media.opengl.GLDrawableFactory$1.run(GLDrawableFactory.java:242)
        at java.lang.Thread.run(Thread.java:619)
X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 1/1, reusable (open, marked uncloseable): 0, pending (open in creation order): 1)
X11Util: Open X11 Display Connections: 1
X11Util: Open[0]: NamedX11Display[:0.0, 0x867ca58, refCount 1, unCloseable false]
Reply | Threaded
Open this post in threaded view
|

Re: turning off X11Util messages

gouessej
Administrator
Please read the instructions in the wiki and provide the whole logs.

Edit.: Provide the crash logs too, when you call dispose() and destroy().
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: turning off X11Util messages

Sven Gothel
Administrator
In reply to this post by Martin Hegedus
On 03/14/2013 11:47 PM, Martin Hegedus [via jogamp] wrote:
> Finally had a chance to get back to this but still have not been able to get
> the X11 message to go away.
>
> I've listed the test program I'm using below.  If I do a System.exit(0) then I
> get the X11Util.Display message.  If I use frame.dispose() I get a "A fatal
> error has been detected by the Java Runtime Environment:" segfault.
>  canvas.destroy also crashes the program.
>
> Any thoughts?

frame.dispose() ?

~Sven



signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: turning off X11Util messages

gouessej
Administrator
I have the same problem for several months but I was too lazy to investigate... :s frame.dispose() doesn't solve it.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: turning off X11Util messages

Martin Hegedus
In reply to this post by Sven Gothel
Sven:  When I use frame.dispose() (i.e. comment out System.exit(0) and uncomment frame.dispose()) within the windowClosing(WindowEvent e) method the JVM crashes.  I also tried e.getWindow().dispose() within the windowClosing(WindowEvent e) method instead of frame.dispose() just to be sure.  e.getWindow().dispose() should be doing the same thing as frame.dispose().

I'm on a Dell Latitude D520 laptop running openSUSE 10.2 (i586) [Linux 2.6.18.8-0.3-default i686] using an Intel 945 GM card.

Sven and gouessej, this sounds like a bug?  OK, I'll follow the wiki instructions and provide the whole logs later.  I tried digging around a little in the JOGL code, but it is over my head.  From what I've seen, the following occurs.  "X11Util.Display: openDisplay" occurs twice, once from GLProfile.getDefault() and another from frame.setVisible(true).  If I call System.exit(0) then only the display created by getDefault() is closed.  If I call e.getWindow().dispose() then the display created by frame.setVisible(true) is closed and the JVM crashes after System.exit(0) is called.

I saw the comments about ATI so I compiled and ran the displayMultiple02 program and it was successful for both the normal and reverse destroy order (i.e. no bug in regards to that)

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: turning off X11Util messages

Martin Hegedus
OK, I added Bug 705 in regards to the JVM crashing.  I figured the "right" way to write SimpleTest was to use the dispose() and then exit.  The scripts test.sh and test_dbg.sh also crashed the JVM.  However, the older version of JOGL I was using seems to work OK in regards to the test programs and SimpleTest.  But, I compiled that JOGL version locally.  On the other hand, the JOGL I'm currently using (the one for which JVM crashes) is the latest aggregated autobuild.

I guess I'll try to compile the latest JOGL locally.  But, that will need to wait till next Tuesday.
Reply | Threaded
Open this post in threaded view
|

Re: turning off X11Util messages

Martin Hegedus
I did end up compiling the latest version locally and have the same issues.  I'll move further discussions exclusively to Bug 705.