OSM2World icon indicating copy to clipboard operation
OSM2World copied to clipboard

JOGL not working on Mac OS 10.8.1 Mountain Lion

Open tordanik opened this issue 12 years ago • 10 comments

The OSM2World viewer launches and immediately quits on an iMac with Mac OS 10.8.1 Mountain Lion and Oracle Java 7.

Java version:

java version "1.7.0_06"
Java(TM) SE Runtime Environment (build 1.7.0_06-b24)
Java HotSpot(TM) 64-Bit Server VM (build 23.2-b09, mixed mode)

Command line output:

No parameters, running graphical interface.
If you want to use the command line, use the --help parameter for a list of available parameters.
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jogl in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
    at java.lang.Runtime.loadLibrary0(Runtime.java:845)
    at java.lang.System.loadLibrary(System.java:1084)
    at com.sun.opengl.impl.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:189)
    at com.sun.opengl.impl.NativeLibLoader.access$000(NativeLibLoader.java:49)
    at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(NativeLibLoader.java:80)
    at com.sun.opengl.impl.NativeLibLoader.loadLibrary(NativeLibLoader.java:103)
    at com.sun.opengl.impl.NativeLibLoader.access$200(NativeLibLoader.java:49)
    at com.sun.opengl.impl.NativeLibLoader$1.run(NativeLibLoader.java:111)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.opengl.impl.NativeLibLoader.loadCore(NativeLibLoader.java:109)
    at com.sun.opengl.impl.macosx.MacOSXGLDrawableFactory.<clinit>(MacOSXGLDrawableFactory.java:53)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:186)
    at javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java:108)
    at javax.media.opengl.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:520)
    at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:131)
    at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:90)
    at org.osm2world.viewer.view.ViewerGLCanvas.<init>(Unknown Source)
    at org.osm2world.viewer.view.ViewerFrame.<init>(Unknown Source)
    at org.osm2world.console.OSM2World.executeArgumentsGroup(Unknown Source)
    at org.osm2world.console.OSM2World.main(Unknown Source)

The version producing the error is an hourly build from August 2012 (development for 0.2.0 release), after the migration to JOGL 2.x.

On the same system, OSM2World 0.1.9 - using JOGL 1.1.1 - will show the menu bar of the viewer, and the statistics feature as well the OBJ export can successfully be used. However, creation of the GLCanvas will fail with an exception. ("Exception in thread "Timer-0" javax.media.opengl.GLException: java.lang.NoClassDefFoundError: apple/awt/ComponentModel")

[This is an error reported by a user of OSM2World, it has not been reproduced by a developer yet.]

tordanik avatar Aug 24 '12 20:08 tordanik

JOGL 2.0 RC 10 doesn't fully work under Mountain Lion yet but Sven is going to investigate soon. As I have no Mac, I can't test. JOGL 1.1.1 is obsolete and no more mantained. If you completely switch to NEWT, you won't have such problems but I'm not sure it is possible in your case.

ghost avatar Aug 25 '12 08:08 ghost

jogl-all.jar is probably not in your classpath. In the past, it was called jogl.all.jar.

ghost avatar Aug 25 '12 08:08 ghost

I have just looked at your classpath in your Ant script, jogl.all.jar has not been replaced by jogl-all.jar. Anyway, keep in mind that we have found some regressions in Mac OS X Mountain Lion when using it with AWT.

ghost avatar Aug 25 '12 08:08 ghost

@gouessej The classpath in the ant script includes jogl.all.jar, which is the name of the jar with the version of JOGL included with OSM2World since 1ec0137c1c3db35e3c518fe80921174caf58bebb. OSM2World has not been upgraded to the latest release candidates which, indeed, contain a jogl-all.jar instead.

Do you suggest that an upgrade to the latest RC of JOGL 2.0 might help with this issue?

tordanik avatar Aug 28 '12 07:08 tordanik

Hi

At first, I thought that a JAR and/or some of its dependencies were missing. If you're absolutely sure that JOGL and GlueGen JARs (native and others) are in the same directory and that the JARs containing the Java libraries are in the classpath, then I was wrong, it is not a classpath / library path problem. I remind you that JogAmp does not yet support Mac OS X Mountain Lion 10.8.1. Please can you confirm it works fine on GNU Linux and/or Windows? I suggest that an upgrade to JOGL 2.0 RC11 (not yet ready) will fix this issue. I have no Mac, Sven began trying to fix this problem with Mac yesterday, be patient. Mac support is really painful to maintain, each major version breaks some things in JogAmp.

ghost avatar Aug 28 '12 08:08 ghost

We were not able to reproduce this issue on Windows XP, Ubuntu, Gentoo, and even MacOS 10.7 and 10.8 with Java 6.

So far only the user originally reporting this has experienced the problem on their system configuration.

tordanik avatar Oct 15 '12 15:10 tordanik

Ok I'm reassured. The pre-RC11 latest build solves most of the problems under Mac OS 10.8.

ghost avatar Oct 15 '12 21:10 ghost

Please can you switch to JOGL 2.0.2 (stable) and close this bug report if it works?

ghost avatar Aug 07 '13 08:08 ghost

Ok, i'm going to check with 2.0.2. I'll have to find a test system first, though.

tordanik avatar Aug 08 '13 16:08 tordanik

Switched to JOGL 2.0.2 as of 35b4bf546b2507aaf6344f0059319f9971bc96cf. It continues to work on Linux and Windows. Not tested on Mac (any version) yet.

tordanik avatar Aug 19 '13 18:08 tordanik