Bug 882 - Jogl 2.1.2-rc-20131031 crash on OSX when closing NEWT window
Summary: Jogl 2.1.2-rc-20131031 crash on OSX when closing NEWT window
Status: RESOLVED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: macosx (show other bugs)
Version: 2
Hardware: pc_x86_64 macosx
: --- normal
Assignee: Sven Gothel
URL:
: 883 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-10-31 22:57 CET by johan
Modified: 2013-11-01 02:40 CET (History)
1 user (show)

See Also:
Type: ---
SCM Refs:
cc57413180edc4e5102f6729ccca6c4695d93e42 85878162940067b39b17c71878446dff0759040d
Workaround: ---


Attachments
crash log (35.26 KB, application/octet-stream)
2013-10-31 22:57 CET, johan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description johan 2013-10-31 22:57:13 CET
Created attachment 532 [details]
crash log

The following will show a NEWT-window on OSX 10.9, JDK 1.7_u40. But when closing the window there is a crash in native code.

public static void main(String[] args) { 
                final GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GL4)); 
                caps.setBackgroundOpaque(true); 
                caps.setDoubleBuffered(true); 
                caps.setDepthBits(16); 
                GLWindow glWindow = GLWindow.create(caps); 
                glWindow.addGLEventListener(new GLEventListener() { 
                        @Override 
                        public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { 
                        } 

                        @Override 
                        public void init(GLAutoDrawable drawable) { 
                                System.out.println("init: " + drawable); 
                        } 

                        @Override 
                        public void dispose(GLAutoDrawable drawable) { 
                                System.out.println("dispose: " + drawable); 
                        } 

                        @Override 
                        public void display(GLAutoDrawable drawable) { 
                        } 
                }); 
                glWindow.setTitle("Test"); 
                glWindow.setSize(1024, 768); 
                glWindow.setUndecorated(false); 
                glWindow.setPointerVisible(true); 
                glWindow.setVisible(true); 
                glWindow.setFullscreen(false); 
                glWindow.setDefaultCloseOperation(WindowClosingProtocol.WindowClosingMode.DISPOSE_ON_CLOSE); 

                Animator animator = new Animator(glWindow); 
                animator.start(); 
        }
Comment 1 Sven Gothel 2013-10-31 23:03:37 CET
Thank you! Re-dir to Bug 883, which I filed as well w/ more details :)

*** This bug has been marked as a duplicate of bug 883 ***
Comment 2 Sven Gothel 2013-10-31 23:05:04 CET
*** Bug 883 has been marked as a duplicate of this bug. ***
Comment 3 Sven Gothel 2013-10-31 23:05:58 CET
ok .. not stealing your credentials :)
Comment 4 Sven Gothel 2013-10-31 23:07:22 CET
reproduced
Comment 5 johan 2013-10-31 23:08:04 CET
LoL, since you fix the bugs you can have all the credentials :-)
Comment 6 Sven Gothel 2013-11-01 01:26:55 CET
- Check JavaVM and JNIEnv handles before usage in NewtMacWindow (Not the culprit .. but more safe)

- Release NewtMacWindow  manually in close0()
      - Mark [NewtMacWindow setReleasedWhenClosed: NO] in init0(..)
      - Release NewtMacWindow manually in close0(..)
    
- Check pointer args in close0(..)
Comment 7 Sven Gothel 2013-11-01 02:40:29 CET
All unit tests passes on OSX 10.9, but the 'ususal suspect' (2 failed focus issues)