Bug 997 - Error on dispose
Summary: Error on dispose
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 1
Hardware: pc_x86_64 linux
: --- major
Assignee: Sven Gothel
Depends on:
Reported: 2014-03-09 13:41 CET by Giuseppe Barbieri
Modified: 2014-03-10 18:29 CET (History)
1 user (show)

See Also:
Type: ---
SCM Refs:
Workaround: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Giuseppe Barbieri 2014-03-09 13:41:39 CET
Here a minimal test case

 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
package test;

import com.jogamp.newt.awt.NewtCanvasAWT;
import com.jogamp.newt.opengl.GLWindow;
import com.jogamp.opengl.util.Animator;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLEventListener;
import javax.media.opengl.GLProfile;
import javax.swing.JFrame;

 * @author elect
public class Bug extends JFrame {

     * @param args the command line arguments
    public static void main(String[] args) {

        bug = new Bug();

    private static Bug bug;
    private GlViewer glViewer;

    public Bug() {

        glViewer = new GlViewer();


        final Animator animator = new Animator(glViewer.glWindow);

        addWindowListener(new WindowAdapter() {

            public void windowClosing(WindowEvent windowEvent) {


        setSize(1024, 768);



    private class GlViewer implements GLEventListener {

        public GLWindow glWindow;
        public NewtCanvasAWT newtCanvasAWT;
        public Animator animator;
        public GlViewer(){
            GLProfile glProfile = GLProfile.getDefault();

            GLCapabilities glCapabilities = new GLCapabilities(glProfile);

        glWindow = GLWindow.create(glCapabilities);


        newtCanvasAWT = new NewtCanvasAWT(glWindow);
        public void init(GLAutoDrawable glad) {

        public void dispose(GLAutoDrawable glad) {

        public void display(GLAutoDrawable glad) {

        public void reshape(GLAutoDrawable glad, int i, int i1, int i2, int i3) {


This is the error

X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 3/3, reusable (open, marked uncloseable): 0, pending (open in creation order): 3)
X11Util: Open X11 Display Connections: 3
X11Util: Open[0]: NamedX11Display[:0, 0x7f81540a1980, refCount 1, unCloseable false]
X11Util: Open[1]: NamedX11Display[:0, 0x7f81540dbe90, refCount 1, unCloseable false]
X11Util: Open[2]: NamedX11Display[:0, 0x7f819c5f09a0, refCount 1, unCloseable false]
Comment 1 Sven Gothel 2014-03-10 18:21:36 CET
This is not an error, but a notification
that you have not closed the display / device properly.

The display is kept open, since you don't close the window,
here the GLWindow bound to the NewtCanvasAWT.
Comment 2 Giuseppe Barbieri 2014-03-10 18:29:06 CET
How do I close the windows? destroy() on the glWindow doesn't work either