<?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>614</bug_id>
          
          <creation_ts>2012-09-06 21:25:49 +0200</creation_ts>
          <short_desc>GLProfile crashes on Mountain Lion</short_desc>
          <delta_ts>2012-09-16 13:40:08 +0200</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jogl</product>
          <component>opengl</component>
          <version>2</version>
          <rep_platform>pc_x86_64</rep_platform>
          <op_sys>macosx</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="John B.">johnbepublic</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>---</cf_type>
          <cf_scm_refs>jogl e30c2c7d06847889d961d12b50e77e4dfd6e525f</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1780</commentid>
    <comment_count>0</comment_count>
    <who name="John B.">johnbepublic</who>
    <bug_when>2012-09-06 21:25:49 +0200</bug_when>
    <thetext>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 &apos;NSInvalidArgumentException&apos;, reason: &apos;-[NSView CGLPBufferObj]: unrecognized selector sent to instance 0x7ffaaa4581d0&apos;
*** 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 &quot;invalid drawable&quot; message but continues to execute without crashing.

This code executes without errors on an older release of JogAmp (2.0b23).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1785</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-09-16 13:34:34 +0200</bug_when>
    <thetext>Fixed w/ Bug 599 and jogl commit e30c2c7d06847889d961d12b50e77e4dfd6e525f
 &lt;http://jogamp.org/git/?p=jogl.git;a=commit;h=e30c2c7d06847889d961d12b50e77e4dfd6e525f&gt;

Please test .. build will come up soon (in a few hours)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1786</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-09-16 13:40:08 +0200</bug_when>
    <thetext>Note: I have no OSX 10.8 available - hence validation of changes/fix is mandatory.

If this fix doesn&apos;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!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>