<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>997</bug_id>
          
          <creation_ts>2014-03-09 13:41:39 +0100</creation_ts>
          <short_desc>Error on dispose</short_desc>
          <delta_ts>2014-03-10 18:29:06 +0100</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jogl</product>
          <component>core</component>
          <version>1</version>
          <rep_platform>pc_x86_64</rep_platform>
          <op_sys>linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Giuseppe Barbieri">elect86</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          <cc>sgothel</cc>
          
          <cf_type>---</cf_type>
          <cf_scm_refs></cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>3840</commentid>
    <comment_count>0</comment_count>
    <who name="Giuseppe Barbieri">elect86</who>
    <bug_when>2014-03-09 13:41:39 +0100</bug_when>
    <thetext>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();

        add(glViewer.newtCanvasAWT);

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

        addWindowListener(new WindowAdapter() {

            @Override
            public void windowClosing(WindowEvent windowEvent) {

                animator.stop();
                System.exit(0);
            }
        });

        setSize(1024, 768);

        setVisible(true);

        animator.start();
    }

    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);
        
        glWindow.addGLEventListener(this);

        glWindow.setVisible(true);

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

        @Override
        public void dispose(GLAutoDrawable glad) {
        }

        @Override
        public void display(GLAutoDrawable glad) {
        }

        @Override
        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]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3846</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2014-03-10 18:21:36 +0100</bug_when>
    <thetext>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&apos;t close the window,
here the GLWindow bound to the NewtCanvasAWT.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3847</commentid>
    <comment_count>2</comment_count>
    <who name="Giuseppe Barbieri">elect86</who>
    <bug_when>2014-03-10 18:29:06 +0100</bug_when>
    <thetext>How do I close the windows? destroy() on the glWindow doesn&apos;t work either</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>