Simple application doesn't run on a mac with java-7

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Simple application doesn't run on a mac with java-7

borobudur
Hi, I tried these libraries under linux and windows successfully but get an error under mac:


        compile group: 'org.jogamp.jogl', name: 'jogl-all', version: '2.0-rc10'
        compile group: 'org.jogamp.jogl', name: 'jogl-all', version: '2.0-rc10', classifier: 'natives-windows-i586'
        compile group: 'org.jogamp.jogl', name: 'jogl-all', version: '2.0-rc10', classifier: 'natives-linux-amd64'
        compile group: 'org.jogamp.jogl', name: 'jogl-all', version: '2.0-rc10', classifier: 'natives-macosx-universal'

        compile group: 'org.jogamp.gluegen', name: 'gluegen-rt', version: '2.0-rc10'
        compile group: 'org.jogamp.gluegen', name: 'gluegen-rt', version: '2.0-rc10', classifier: 'natives-windows-i586'
        compile group: 'org.jogamp.gluegen', name: 'gluegen-rt', version: '2.0-rc10', classifier: 'natives-linux-amd64'
        compile group: 'org.jogamp.gluegen', name: 'gluegen-rt', version: '2.0-rc10', classifier: 'natives-macosx-universal'

(gradle notation)

For this little tutorial:
https://sites.google.com/site/justinscsstuff/jogl-tutorial-3

I get this error under mac on a java-7 jdk:
2012-10-26 16:54:42.952 java[1484:1703] invalid drawable
2012-10-26 16:54:42.956 java[1484:1703] -[NSView CGLPBufferObj]: unrecognized selector sent to instance 0x7fd11bc9f990
2012-10-26 16:54:42.956 java[1484:1703] Apple AWT Internal Exception: -[NSView CGLPBufferObj]: unrecognized selector sent to instance 0x7fd11bc9f990
2012-10-26 16:54:42.957 java[1484:1703] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSView CGLPBufferObj]: unrecognized selector sent to instance 0x7fd11bc9f990'
*** First throw call stack:
(
        0   CoreFoundation                      0x00007fff929e60a6 __exceptionPreprocess + 198
        1   libobjc.A.dylib                     0x00007fff8f7533f0 objc_exception_throw + 43
        2   CoreFoundation                      0x00007fff92a7c6ea -[NSObject(NSObject) doesNotRecognizeSelector:] + 186
        3   CoreFoundation                      0x00007fff929d45ce ___forwarding___ + 414
        4   CoreFoundation                      0x00007fff929d43b8 _CF_forwarding_prep_0 + 232
        5   AppKit                              0x00007fff8c6395be -[NSOpenGLContext setPixelBuffer:cubeMapFace:mipMapLevel:currentVirtualScreen:] + 59
        6   libjogl_desktop.jnilib              0x000000016d1ef8cb setContextPBuffer + 203
        7   libjogl_desktop.jnilib              0x000000016d25328b Java_jogamp_opengl_macosx_cgl_CGL_setContextPBuffer__JJ + 43
        8   ???                                 0x0000000106794f90 0x0 + 4403580816
)
libc++abi.dylib: terminate called throwing an exception

Process finished with exit code 134

Any idea?
Reply | Threaded
Open this post in threaded view
|

Re: Simple application doesn't run on a mac with java-7

gouessej
Administrator
Hi

Try this one.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Simple application doesn't run on a mac with java-7

borobudur
same there with these libs:

- gluegen-rt-natives-macosx-universal.jar
- jogl-all-natives-macosx-universal.jar
- gluegen-rt.jar
- jogl-all.jar

Isn't that a java-7 issue?
Reply | Threaded
Open this post in threaded view
|

Re: Simple application doesn't run on a mac with java-7

gouessej
Administrator
No maybe it comes from JOGL. Please can you tell me exactly which version of Java and Mac you're using?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Simple application doesn't run on a mac with java-7

borobudur
java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)

MacBook Air
Prozessor  1.8 GHz Intel Core i7
Speicher  4 GB 1333 MHz DDR3
Grafikkarte  Intel HD Graphics 3000 384 MB
Software  OS X 10.8.2 (12C60)

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Simple application doesn't run on a mac with java-7

gouessej
Administrator
Ok you have to write a bug report with the necessary information and the exact code snippet that allows to reproduce your bug. Please follow these steps explained here in our wiki.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Simple application doesn't run on a mac with java-7

borobudur
I just tested under the same machine/os/jdk an older version of jogl & co:

jogl.all.jar 2.0-b11-20101213
gluegen-rt.jar 2.0-b8-20101213
nativewindow.all.jar 2.0-b11-20101213
newt.all.jar 2.0-b11-20101213

Same here, this works under linux and windows.
Under mac I get this error:


Exception in thread "AWT-EventQueue-0-AWTAnimator-1" java.lang.RuntimeException: Unable to initialize JAWT
        at com.jogamp.nativewindow.impl.jawt.JAWT$1.run(JAWT.java:103)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.jogamp.nativewindow.impl.jawt.JAWT.getJAWT(JAWT.java:98)
        at com.jogamp.nativewindow.impl.jawt.macosx.MacOSXJAWTWindow.lockSurfaceImpl(MacOSXJAWTWindow.java:68)
        at com.jogamp.nativewindow.impl.jawt.JAWTWindow.lockSurface(JAWTWindow.java:121)
        at com.jogamp.opengl.impl.GLDrawableImpl.lockSurface(GLDrawableImpl.java:187)
        at com.jogamp.opengl.impl.GLDrawableImpl.setRealized(GLDrawableImpl.java:148)
        at javax.media.opengl.awt.GLCanvas.validateGLDrawable(GLCanvas.java:533)
        at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:358)
        at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:74)
        at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:140)
        at com.jogamp.opengl.util.Animator$MainLoop.run(Animator.java:177)
        at java.lang.Thread.run(Thread.java:722)
exception in QueueFlusher:
java.lang.RuntimeException: Unable to initialize JAWT
        at com.jogamp.nativewindow.impl.jawt.JAWT$1.run(JAWT.java:103)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.jogamp.nativewindow.impl.jawt.JAWT.getJAWT(JAWT.java:98)
        at com.jogamp.nativewindow.impl.jawt.macosx.MacOSXJAWTWindow.lockSurfaceImpl(MacOSXJAWTWindow.java:68)
        at com.jogamp.nativewindow.impl.jawt.JAWTWindow.lockSurface(JAWTWindow.java:121)
        at com.jogamp.opengl.impl.GLDrawableImpl.lockSurface(GLDrawableImpl.java:187)
        at com.jogamp.opengl.impl.GLContextImpl.makeCurrentLocking(GLContextImpl.java:389)
        at com.jogamp.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:351)
        at com.jogamp.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:340)
        at javax.media.opengl.awt.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:810)
        at sun.java2d.opengl.OGLRenderQueue$QueueFlusher.run(OGLRenderQueue.java:234)
Reply | Threaded
Open this post in threaded view
|

Re: Simple application doesn't run on a mac with java-7

gouessej
Administrator
I would like to know whether something is wrong in your setup. Please can you run this demo?

Have you followed my instructions to install Java3D?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Simple application doesn't run on a mac with java-7

Pixelapp
I can't help but to wonder that you @borobudur are saying that you have java 1.7 under mac. There no such thing as java 1.7 on man, it only goes up to 1.6 as far as I know.

Also, if you compiling under 1.7 under windows, you should always compile under java 1.6 for Mac because Mac computers still don't have java 1.7 A.F.A.I.K.
Reply | Threaded
Open this post in threaded view
|

Re: Simple application doesn't run on a mac with java-7

Wade Walker
Administrator
I guess it's still a developer preview, but I've compiled JOGL successfully with Java 1.7 on a Mac. You can download it from http://jdk7.java.net/download.html.

The only difference I've found so far has been the change from .jnilib to .dynlib for JNI linked libraries.
Reply | Threaded
Open this post in threaded view
|

Re: Simple application doesn't run on a mac with java-7

Sven Gothel
Administrator
On 10/31/2012 07:48 PM, Wade Walker [via jogamp] wrote:
> I guess it's still a developer preview, but I've compiled JOGL successfully
> with Java 1.7 on a Mac. You can download it from
> http://jdk7.java.net/download.html.
>
> The only difference I've found so far has been the change from .jnilib to
> .dynlib for JNI linked libraries.

I test w/ the java7 version here as well (OSX, Windows, X11),
and our .jnilib libraries are being loaded on OSX.

Check
  <http://jogamp.org/deployment/archive/master/?C=M;O=D>

.. currently performing final testing for RC11.

~Sven



signature.asc (907 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Simple application doesn't run on a mac with java-7

borobudur
I finally found a jdk6 to test and I made it with the old libraries (mentioned above) but with the new libs I still get an error:

2012-11-01 09:10:39.742 java[450:1203] invalid drawable
2012-11-01 09:10:39.747 java[450:1203] -[NSView CGLPBufferObj]: unrecognized selector sent to instance 0x7fa9fb245a60
2012-11-01 09:10:39.747 java[450:1203] An uncaught exception was raised
2012-11-01 09:10:39.748 java[450:1203] -[NSView CGLPBufferObj]: unrecognized selector sent to instance 0x7fa9fb245a60
2012-11-01 09:10:39.748 java[450:1203] (
        0   CoreFoundation                      0x00007fff94ae50a6 __exceptionPreprocess + 198
        1   libobjc.A.dylib                     0x00007fff918523f0 objc_exception_throw + 43
        2   CoreFoundation                      0x00007fff94b7b6ea -[NSObject(NSObject) doesNotRecognizeSelector:] + 186
        3   CoreFoundation                      0x00007fff94ad35ce ___forwarding___ + 414
        4   CoreFoundation                      0x00007fff94ad33b8 _CF_forwarding_prep_0 + 232
        5   AppKit                              0x00007fff8e7385be -[NSOpenGLContext setPixelBuffer:cubeMapFace:mipMapLevel:currentVirtualScreen:] + 59
        6   libjogl_desktop.jnilib              0x000000011b8a98cb setContextPBuffer + 203
        7   libjogl_desktop.jnilib              0x000000011b90d28b Java_jogamp_opengl_macosx_cgl_CGL_setContextPBuffer__JJ + 43
        8   ???                                 0x000000010f9f5eee 0x0 + 4557070062
)
2012-11-01 09:10:39.751 java[450:1203] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSView CGLPBufferObj]: unrecognized selector sent to instance 0x7fa9fb245a60'
*** First throw call stack:
(
        0   CoreFoundation                      0x00007fff94ae50a6 __exceptionPreprocess + 198
        1   libobjc.A.dylib                     0x00007fff918523f0 objc_exception_throw + 43
        2   CoreFoundation                      0x00007fff94b7b6ea -[NSObject(NSObject) doesNotRecognizeSelector:] + 186
        3   CoreFoundation                      0x00007fff94ad35ce ___forwarding___ + 414
        4   CoreFoundation                      0x00007fff94ad33b8 _CF_forwarding_prep_0 + 232
        5   AppKit                              0x00007fff8e7385be -[NSOpenGLContext setPixelBuffer:cubeMapFace:mipMapLevel:currentVirtualScreen:] + 59
        6   libjogl_desktop.jnilib              0x000000011b8a98cb setContextPBuffer + 203
        7   libjogl_desktop.jnilib              0x000000011b90d28b Java_jogamp_opengl_macosx_cgl_CGL_setContextPBuffer__JJ + 43
        8   ???                                 0x000000010f9f5eee 0x0 + 4557070062
)
libc++abi.dylib: terminate called throwing an exception

Process finished with exit code 134


I'd like to mention again that I just tried with the libraries from jogl-all and gluegen-rt. This works under linux and windows. On mac I'm trying the same:

 group: 'org.jogamp.jogl', name: 'jogl-all', version: '2.0-rc10'
 group: 'org.jogamp.jogl', name: 'jogl-all', version: '2.0-rc10', classifier: 'natives-macosx-universal'

 group: 'org.jogamp.gluegen', name: 'gluegen-rt', version: '2.0-rc10'
 group: 'org.jogamp.gluegen', name: 'gluegen-rt', version: '2.0-rc10', classifier: 'natives-macosx-universal'


@gouessej: the demo (scary stuff) worked under linux (asking me for root passwd, very scary); under this mac I can't start it because I don't get over the certificate thing; the example I still will try it…

@Pixelapp: jdk7 is supported by oracle for mac
Reply | Threaded
Open this post in threaded view
|

Re: Simple application doesn't run on a mac with java-7

gouessej
Administrator
borobudur wrote
@gouessej: the demo (scary stuff) worked under linux (asking me for root passwd, very scary)
There is a problem on your system because a Java Web Start application never asks for root password. I tested on Cent OS 5.3, Mageia 2, Debian Squeeze, Ubuntu, LUbuntu...

borobudur wrote
under this mac I can't start it because I don't get over the certificate thing; the example I still will try it…
Ok the OSCP bug concerns self signed certificates too under Mac, which is a very bad piece of news.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Simple application doesn't run on a mac with java-7

Sven Gothel
Administrator
In reply to this post by borobudur
On 11/01/2012 09:27 AM, borobudur [via jogamp] wrote:
> I finally found a jdk6 to test and I made it with the old libraries (mentioned
> above) but with the new libs I still get an error:

This was fixed a while ago and available in pre RC11 builds.

Now RC11 is out already .. pls try.

~Sven

>
> 2012-11-01 09:10:39.742 java[450:1203] invalid drawable
> 2012-11-01 09:10:39.747 java[450:1203] -[NSView CGLPBufferObj]: unrecognized
> selector sent to instance 0x7fa9fb245a60
> 2012-11-01 09:10:39.747 java[450:1203] An uncaught exception was raised
> 2012-11-01 09:10:39.748 java[450:1203] -[NSView CGLPBufferObj]: unrecognized
> selector sent to instance 0x7fa9fb245a60
> 2012-11-01 09:10:39.748 java[450:1203] (


signature.asc (907 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Simple application doesn't run on a mac with java-7

borobudur
Sven Gothel wrote
This was fixed a while ago and available in pre RC11 builds.

Now RC11 is out already .. pls try.
Works finally with RC11!!