magmaOffenburg / RoboViz

Monitor and visualization tool for the RoboCup 3D Soccer Simulation League
Apache License 2.0
50 stars 17 forks source link

Can 't run on Mac OS #130

Closed abuzar-rasool closed 2 years ago

abuzar-rasool commented 2 years ago

I am unable to the run roboviz on mac os. Any solutions? Seems like an issue to me. TIA

java -version
openjdk version "1.8.0_322"
OpenJDK Runtime Environment (Temurin)(build 1.8.0_322-b06)
OpenJDK 64-Bit Server VM (Temurin)(build 25.322-b06, mixed mode)
./roboviz.sh 
objc[90635]: Class JNFException is implemented in both /System/Library/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation (0x7ffa51f47a50) and /private/var/folders/6_/l_lbgtqn7_qcx0y3wyvlsy3c0000gn/T/nativeutils327850182587546570254676503451646/JavaNativeFoundation.framework/JavaNativeFoundation (0x10d8edd90). One of the two will be used. Which one is undefined.
objc[90635]: Class JNFTypeCoercer is implemented in both /System/Library/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation (0x7ffa51f47aa0) and /private/var/folders/6_/l_lbgtqn7_qcx0y3wyvlsy3c0000gn/T/nativeutils327850182587546570254676503451646/JavaNativeFoundation.framework/JavaNativeFoundation (0x10d8edde0). One of the two will be used. Which one is undefined.
objc[90635]: Class JNFInternalJavaClassToCoersionHolder is implemented in both /System/Library/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation (0x7ffa51f47ac8) and /private/var/folders/6_/l_lbgtqn7_qcx0y3wyvlsy3c0000gn/T/nativeutils327850182587546570254676503451646/JavaNativeFoundation.framework/JavaNativeFoundation (0x10d8ede08). One of the two will be used. Which one is undefined.
objc[90635]: Class JNFStringCoercion is implemented in both /System/Library/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation (0x7ffa51f47b68) and /private/var/folders/6_/l_lbgtqn7_qcx0y3wyvlsy3c0000gn/T/nativeutils327850182587546570254676503451646/JavaNativeFoundation.framework/JavaNativeFoundation (0x10d8edea8). One of the two will be used. Which one is undefined.
objc[90635]: Class JNFNumberCoercion is implemented in both /System/Library/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation (0x7ffa51f47bb8) and /private/var/folders/6_/l_lbgtqn7_qcx0y3wyvlsy3c0000gn/T/nativeutils327850182587546570254676503451646/JavaNativeFoundation.framework/JavaNativeFoundation (0x10d8edef8). One of the two will be used. Which one is undefined.
objc[90635]: Class JNFDateCoercion is implemented in both /System/Library/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation (0x7ffa51f47c08) and /private/var/folders/6_/l_lbgtqn7_qcx0y3wyvlsy3c0000gn/T/nativeutils327850182587546570254676503451646/JavaNativeFoundation.framework/JavaNativeFoundation (0x10d8edf48). One of the two will be used. Which one is undefined.
objc[90635]: Class JNFMapCoercion is implemented in both /System/Library/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation (0x7ffa51f47c58) and /private/var/folders/6_/l_lbgtqn7_qcx0y3wyvlsy3c0000gn/T/nativeutils327850182587546570254676503451646/JavaNativeFoundation.framework/JavaNativeFoundation (0x10d8edf98). One of the two will be used. Which one is undefined.
objc[90635]: Class JNFListCoercion is implemented in both /System/Library/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation (0x7ffa51f47ca8) and /private/var/folders/6_/l_lbgtqn7_qcx0y3wyvlsy3c0000gn/T/nativeutils327850182587546570254676503451646/JavaNativeFoundation.framework/JavaNativeFoundation (0x10d8edfe8). One of the two will be used. Which one is undefined.
objc[90635]: Class JNFSetCoercion is implemented in both /System/Library/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation (0x7ffa51f47cf8) and /private/var/folders/6_/l_lbgtqn7_qcx0y3wyvlsy3c0000gn/T/nativeutils327850182587546570254676503451646/JavaNativeFoundation.framework/JavaNativeFoundation (0x10d8ee038). One of the two will be used. Which one is undefined.
objc[90635]: Class JNFDefaultCoercions is implemented in both /System/Library/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation (0x7ffa51f47d20) and /private/var/folders/6_/l_lbgtqn7_qcx0y3wyvlsy3c0000gn/T/nativeutils327850182587546570254676503451646/JavaNativeFoundation.framework/JavaNativeFoundation (0x10d8ee060). One of the two will be used. Which one is undefined.
objc[90635]: Class JNFJObjectWrapper is implemented in both /System/Library/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation (0x7ffa51f47d70) and /private/var/folders/6_/l_lbgtqn7_qcx0y3wyvlsy3c0000gn/T/nativeutils327850182587546570254676503451646/JavaNativeFoundation.framework/JavaNativeFoundation (0x10d8ee0b0). One of the two will be used. Which one is undefined.
objc[90635]: Class JNFWeakJObjectWrapper is implemented in both /System/Library/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation (0x7ffa51f47dc0) and /private/var/folders/6_/l_lbgtqn7_qcx0y3wyvlsy3c0000gn/T/nativeutils327850182587546570254676503451646/JavaNativeFoundation.framework/JavaNativeFoundation (0x10d8ee100). One of the two will be used. Which one is undefined.
objc[90635]: Class JNFRunLoop is implemented in both /System/Library/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation (0x7ffa51f47e38) and /private/var/folders/6_/l_lbgtqn7_qcx0y3wyvlsy3c0000gn/T/nativeutils327850182587546570254676503451646/JavaNativeFoundation.framework/JavaNativeFoundation (0x10d8ee178). One of the two will be used. Which one is undefined.
objc[90635]: Class JNFRunnableWrapper is implemented in both /System/Library/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation (0x7ffa51f47e88) and /private/var/folders/6_/l_lbgtqn7_qcx0y3wyvlsy3c0000gn/T/nativeutils327850182587546570254676503451646/JavaNativeFoundation.framework/JavaNativeFoundation (0x10d8ee1c8). One of the two will be used. Which one is undefined.
objc[90635]: Class JNFRunnable is implemented in both /System/Library/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation (0x7ffa51f47ed8) and /private/var/folders/6_/l_lbgtqn7_qcx0y3wyvlsy3c0000gn/T/nativeutils327850182587546570254676503451646/JavaNativeFoundation.framework/JavaNativeFoundation (0x10d8ee218). One of the two will be used. Which one is undefined.
Warning: the fonts "Times" and "Lucida Bright" are not available for the Java logical font "Serif", which may have unexpected appearance or behavior. Re-enable the "Times" font to remove this warning.
2022-08-18 03:33:18.448 java[90635:588665] Apple AWT Internal Exception: NSWindow drag regions should only be invalidated on the Main Thread!
2022-08-18 03:33:18.448 java[90635:588665] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007ff80e89d7b3 __exceptionPreprocess + 242
    1   libobjc.A.dylib                     0x00007ff80e5fdbc3 objc_exception_throw + 48
    2   CoreFoundation                      0x00007ff80e8c6066 -[NSException raise] + 9
    3   AppKit                              0x00007ff8112872f4 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 321
    4   AppKit                              0x00007ff8112732a4 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1288
    5   AppKit                              0x00007ff811272d96 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42
    6   libnativewindow_macosx.jnilib       0x000000011e5943fe Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 398
    7   ???                                 0x000000010d9d8407 0x0 + 4523394055
)
libc++abi: terminating with uncaught exception of type NSException
./roboviz.sh: line 28: 90635 Abort trap: 6           java -Xmx512m -Xdock:name="RoboViz" -jar RoboViz.jar "$@"
Habib-Shahzad commented 2 years ago

I am experiencing the same issue

FaazAbidi commented 2 years ago

@hannesbraun can you please guide us on this? Same issue.

Habib-Shahzad commented 2 years ago

I was able to fix the issue by using this java JDK https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08/OpenJDK8U-jre_x64_mac_hotspot_8u242b08.pkg

hannesbraun commented 2 years ago

TL;DR

Use this old version of AdoptOpenJDK: https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_x64_mac_hotspot_8u232b09.tar.gz

Explanation of the problem

This is the part causing the crash:

2022-08-18 03:33:18.448 java[90635:588665] Apple AWT Internal Exception: NSWindow drag regions should only be invalidated on the Main Thread!
2022-08-18 03:33:18.448 java[90635:588665] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'

This is an issue of JOGL, the library providing the OpenGL bindings. Sadly, it looks like this library is not maintained anymore. This issue got fixed but it didn't find its way into a release until now.

The workaround for me is to use an old JDK. In this case, I can recommend a specific old version of AdoptOpenJDK (JDK8u232 ,see the link above). At least, this is the version I'm using.

Previously, invalidating NSWindow drag regions outside of the Main Thread only caused a warning. That's the behavior you get with that old JDK version. Since JDK8u252, this throws an error and crashes the application. Without JOGL being maintained and publishing an update, there's no better "easy" fix that I know about right now. (Maybe, I'll have some time in the following months to find a long term solution for this as well as some other issues. We'll see...)

Edit Using JDK8u242 (as suggested by @hs05888) should indeed be equally good.

abuzar-rasool commented 2 years ago

Thanks for the help @hannesbraun @hs05888. I was able to fix this by using JDK8u242.