Login  Register

JOGL on Mac OSX - libjogl_desktop.jnilib error

Posted by Chigurh on Aug 20, 2012; 5:20pm
URL: https://forum.jogamp.org/JOGL-on-Mac-OSX-libjogl-desktop-jnilib-error-tp4025842.html

Hello.

I followed this tutorial to setup jogamp/jogl https://sites.google.com/site/justinscsstuff/jogl-tutorial-1. As soon as i initiize GLProfile as seen below:

GLProfile profile = GLProfile.get(GLProfile.GL2ES1);

Eclipse gives me this error message: "com.hoshi.pong.Pong ended unexpectedly when using "plugin" libjogl_desktop.jnilib." (roughly translated from swedish) as an "messagebox alert" (not console).

The console says:


2012-08-20 19:13:09.453 java[662:1903] invalid drawable
2012-08-20 19:13:09.455 java[662:1903] -[NSView CGLPBufferObj]: unrecognized selector sent to instance 0x7f9cb482bf80
2012-08-20 19:13:09.455 java[662:1903] An uncaught exception was raised
2012-08-20 19:13:09.455 java[662:1903] -[NSView CGLPBufferObj]: unrecognized selector sent to instance 0x7f9cb482bf80
2012-08-20 19:13:09.456 java[662:1903] (
	0   CoreFoundation                      0x00007fff8b85bf56 __exceptionPreprocess + 198
	1   libobjc.A.dylib                     0x00007fff8df89dee objc_exception_throw + 43
	2   CoreFoundation                      0x00007fff8b8e81be -[NSObject doesNotRecognizeSelector:] + 190
	3   CoreFoundation                      0x00007fff8b848e23 ___forwarding___ + 371
	4   CoreFoundation                      0x00007fff8b848c38 _CF_forwarding_prep_0 + 232
	5   AppKit                              0x00007fff8c862522 -[NSOpenGLContext setPixelBuffer:cubeMapFace:mipMapLevel:currentVirtualScreen:] + 49
	6   libjogl_desktop.jnilib              0x000000010eca98cb setContextPBuffer + 203
	7   libjogl_desktop.jnilib              0x000000010ed0d28b Java_jogamp_opengl_macosx_cgl_CGL_setContextPBuffer__JJ + 43
	8   ???                                 0x0000000102791d6e 0x0 + 4336459118
)
2012-08-20 19:13:09.456 java[662:1903] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSView CGLPBufferObj]: unrecognized selector sent to instance 0x7f9cb482bf80'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff8b85bf56 __exceptionPreprocess + 198
	1   libobjc.A.dylib                     0x00007fff8df89dee objc_exception_throw + 43
	2   CoreFoundation                      0x00007fff8b8e81be -[NSObject doesNotRecognizeSelector:] + 190
	3   CoreFoundation                      0x00007fff8b848e23 ___forwarding___ + 371
	4   CoreFoundation                      0x00007fff8b848c38 _CF_forwarding_prep_0 + 232
	5   AppKit                              0x00007fff8c862522 -[NSOpenGLContext setPixelBuffer:cubeMapFace:mipMapLevel:currentVirtualScreen:] + 49
	6   libjogl_desktop.jnilib              0x000000010eca98cb setContextPBuffer + 203
	7   libjogl_desktop.jnilib              0x000000010ed0d28b Java_jogamp_opengl_macosx_cgl_CGL_setContextPBuffer__JJ + 43
	8   ???                                 0x0000000102791d6e 0x0 + 4336459118
)
terminate called throwing an exception

And my code:


package com.hoshi.pong;

import java.awt.Frame;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;

import javax.media.opengl.GLProfile;

public class Pong extends Frame{
	
	public Pong() {
		GLProfile profile = GLProfile.get(GLProfile.GL2ES1);
		
		setTitle("Hoshi");
		setSize(600,600);
		setLocation(100,100);
		setVisible(true);
	
		addWindowListener(new WindowListener() {
			
			@Override
			public void windowOpened(WindowEvent e) {
				// TODO Auto-generated method stub
				
			}
			
			@Override
			public void windowIconified(WindowEvent e) {
				// TODO Auto-generated method stub
				
			}
			
			@Override
			public void windowDeiconified(WindowEvent e) {
				// TODO Auto-generated method stub
				
			}
			
			@Override
			public void windowDeactivated(WindowEvent e) {
				// TODO Auto-generated method stub
				
			}
			
			@Override
			public void windowClosing(WindowEvent e) {
				System.exit(0);
			}
			
			@Override
			public void windowClosed(WindowEvent e) {
				// TODO Auto-generated method stub
				
			}
			
			@Override
			public void windowActivated(WindowEvent e) {
				// TODO Auto-generated method stub
				
			}
		});
		
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		new Pong();
		
	}

}

I have tried to add GLCapabilities, GLCanvas and to use GLProfile.GL2ES2 and GL2 but i still have the same problem.

Computer: Macbook pro 13", Intel HD Graphics 4000, Mac OS X 10.7.4.

Does anyone know how to fix this?

Thanks in advance!