User Tools

Site Tools


private:upgrade_to_jogl_1507

Upgrade to Jogl 1507 to fix a MacOSX bug (nswindow drag regions) requires Java 1.11

fc-8.10.2021 Not fixed yet, we want to stay a bit longer in Java 1.8

Thomas Arsouze reported a bug with Xplo on MacOSX 11.3.1 Big Sur

arsouze@S921 AMAPstudio % java -version
java version "1.8.0_301"
Java(TM) SE Runtime Environment (build 1.8.0_301-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.301-b09, mixed mode) 

(...)

Xplo 1.1-5199 with pilot jeeb.xplo.gui.Pilot: correct boot at 7 Oct 2021 10:36:26 CEST
Gui Pilot booting...
2021-10-07 10:36:29.508 java[8248:1160872] Apple AWT Internal Exception: NSWindow drag regions should only be invalidated on the Main Thread!
2021-10-07 10:36:29.509 java[8248:1160872] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!' 

Found the bug has been fixed in Jogamp on 5 apr 2019, planned for Jogl 2.4.0, not released yet (current is 2.3.2), AMAPstudio is in Jogl 2.2, see this page

1. Unistalled Jogl 2.2 from AMAPstudio:

  • from the ext/directory, removed:
    • gluegen-rt.jar
    • gluegen-rt-natives-linux-amd64.jar
    • gluegen-rt-natives-linux-i586.jar
    • gluegen-rt-natives-macosx-universal.jar
    • gluegen-rt-natives-windows-amd64.jar
    • gluegen-rt-natives-windows-i586.jar
    • jogll-all.jar.jar
    • jogl-all-natives-linux-amd64.jar
    • jogl-all-natives-linux-i586.jar
    • jogl-all-natives-macosx-universal.jar
    • jogl-all-natives-windows-amd64.jar
    • jogl-all-natives-windows-i586.jar
  • No more .dll / .so to be removed (packaged inside the jars since 2.2)

2. Installed Jogl 2.4 (snapshot gluegen_938-joal_661-jogl_1507-jocl_1148) in ext:

→ jogamp-all-platforms.7z 2021-01-12 00:35 74M

  • Picked and copied in amapstudio/ext/ :

3. Adapted to the move of javax.media packages to com.jogamp

Concerns javax.media.nativewindow and javax.media.opengl. Jogamp team moved them to com.jojamp.nativewindow and com.jogamp.nativewindow

See this discussion thread: https://jogamp.org/bugzilla/show_bug.cgi?id=682

In Eclipse, updated the jar list in amapstudio project build path, then selected amapstudio/ and Ctrl-Shift-O to reorganize all imports to point on the com.jogamp pakages

4. Last jogl snapshot is gluegen_938-joal_661-jogl_1507-jocl_1148, tryied it but failed at execution / compilation time: was compiled with java 11

  • java.lang.EnumConstantNotPresentException: javax.lang.model.SourceVersion.RELEASE_11
  • found a message on july 2012 telling joamp switch to java 11 was a wip (work under progress)

5. Tried to find an older Jogl snapshot with the bug fixed and still in Java 8…

  • searched a snapshot after correction (apr 2019) and before switch to java 11
  • tried gluegen_916-joal_642-jogl_1483-jocl_1122 (10.4.2019)

Same compilation error, also in Java 11.

→ correction in not possible in Java 1.8

→ Oriented Thomas Arsouze on workaround found with Francois Pimont :

Problems were reported when using Capsis or AMAPstudio under Mac OS X.

'Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'', Camilo Valdes, 21.10.2020, Francois Pimont, 1.9.2020, this could be fixed by switching from Java 1.8.0_261 to Java 1.8.0_202.

private/upgrade_to_jogl_1507.txt · Last modified: 2021/12/17 09:22 by 127.0.0.1