Bug 614 - GLProfile crashes on Mountain Lion
Summary: GLProfile crashes on Mountain Lion
Status: RESOLVED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: opengl (show other bugs)
Version: 2
Hardware: pc_x86_64 macosx
: --- critical
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2012-09-06 21:25 CEST by John B.
Modified: 2012-09-16 13:40 CEST (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John B. 2012-09-06 21:25:49 CEST
Using JogAmp 2.0rc10, the following code crashes when run on OS X 10.8 Mountain Lion (reduced to critical code from a larger application):

import javax.media.opengl.*;
public class TestJOGL {
  public static void main(String[] args) {
    final GLProfile profile = GLProfile.get(GLProfile.GL2);
  }
}

Other uses of GLProfile also crash, including an explicit call to GLProfile.initSingleton();

The resulting error message is as follows:

-----
2012-09-06 14:01:03.796 java[52240:1203] invalid drawable
2012-09-06 14:01:03.799 java[52240:1203] -[NSView CGLPBufferObj]: unrecognized selector sent to instance 0x7ffaaa4581d0
2012-09-06 14:01:03.799 java[52240:1203] An uncaught exception was raised
2012-09-06 14:01:03.800 java[52240:1203] -[NSView CGLPBufferObj]: unrecognized selector sent to instance 0x7ffaaa4581d0
2012-09-06 14:01:03.801 java[52240:1203] (
	0   CoreFoundation                      0x00007fff8f0c9716 __exceptionPreprocess + 198
	1   libobjc.A.dylib                     0x00007fff980aa470 objc_exception_throw + 43
	2   CoreFoundation                      0x00007fff8f15fd5a -[NSObject(NSObject) doesNotRecognizeSelector:] + 186
	3   CoreFoundation                      0x00007fff8f0b7c3e ___forwarding___ + 414
	4   CoreFoundation                      0x00007fff8f0b7a28 _CF_forwarding_prep_0 + 232
	5   AppKit                              0x00007fff8e949b3e -[NSOpenGLContext setPixelBuffer:cubeMapFace:mipMapLevel:currentVirtualScreen:] + 59
	6   libjogl_desktop.jnilib              0x0000000112c818cb setContextPBuffer + 203
	7   libjogl_desktop.jnilib              0x0000000112ce528b Java_jogamp_opengl_macosx_cgl_CGL_setContextPBuffer__JJ + 43
	8   ???                                 0x000000010658cd6e 0x0 + 4401450350
)
2012-09-06 14:01:03.802 java[52240:1203] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSView CGLPBufferObj]: unrecognized selector sent to instance 0x7ffaaa4581d0'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff8f0c9716 __exceptionPreprocess + 198
	1   libobjc.A.dylib                     0x00007fff980aa470 objc_exception_throw + 43
	2   CoreFoundation                      0x00007fff8f15fd5a -[NSObject(NSObject) doesNotRecognizeSelector:] + 186
	3   CoreFoundation                      0x00007fff8f0b7c3e ___forwarding___ + 414
	4   CoreFoundation                      0x00007fff8f0b7a28 _CF_forwarding_prep_0 + 232
	5   AppKit                              0x00007fff8e949b3e -[NSOpenGLContext setPixelBuffer:cubeMapFace:mipMapLevel:currentVirtualScreen:] + 59
	6   libjogl_desktop.jnilib              0x0000000112c818cb setContextPBuffer + 203
	7   libjogl_desktop.jnilib              0x0000000112ce528b Java_jogamp_opengl_macosx_cgl_CGL_setContextPBuffer__JJ + 43
	8   ???                                 0x000000010658cd6e 0x0 + 4401450350
)
libc++abi.dylib: terminate called throwing an exception
-----

This error has been observed on a 2008 Mac Pro. It seems to be the same bug described on http://forum.jogamp.org/JOGL-on-Mac-OSX-libjogl-desktop-jnilib-error-td4025842.html but has not previously been submitted to bugzilla.

This code using 2.0rc10 on OS X 10.7 produces the same "invalid drawable" message but continues to execute without crashing.

This code executes without errors on an older release of JogAmp (2.0b23).
Comment 1 Sven Gothel 2012-09-16 13:34:34 CEST
Fixed w/ Bug 599 and jogl commit e30c2c7d06847889d961d12b50e77e4dfd6e525f
 <http://jogamp.org/git/?p=jogl.git;a=commit;h=e30c2c7d06847889d961d12b50e77e4dfd6e525f>

Please test .. build will come up soon (in a few hours)
Comment 2 Sven Gothel 2012-09-16 13:40:08 CEST
Note: I have no OSX 10.8 available - hence validation of changes/fix is mandatory.

If this fix doesn't solve the OSX 10.8 problem, pls:
  - reopen
  - add a complete trace w/ all debug flags enabled
  - if possible use a self compiled version with VERBOSE enabled:
     - edit:
        src/nativewindow/native/macosx/OSXmisc.m
          - // #define VERBOSE 1
          + #define VERBOSE 1
        src/jogl/native/macosx/MacOSXWindowSystemInterface.h
          -  // #define VERBOSE_ON 1
          + #define VERBOSE_ON 1

      - rm -rf build build-macosx
      - and recompile all !

Thx!