Open alexanderbachev opened 4 years ago
Indeed not matsim, but an incompatibility between mac os 10.15 and java opengl (jogl). See here: https://github.com/matsim-org/matsim-libs/issues/972 . That issue points to a manual work-around; there is unfortunately no "automatic" work around yet.
Thanks for the fast reply, @kainagel ! I hadn't known there is another Issues section under matsim-libs.
I added the two jars manually (same gluegen937...), added them to my only module (matsim-example-project) and set them to Runtime:
After reimporting the maven dependencies and starting the simulation, the program breaks at the same place but with another exception:
2020-05-27 23:47:02,658 INFO QSim:505 SIMULATION (NEW QSim) AT 04:09:00 : #Veh=25156 lost=0 simT=0.0s realT=1s; (s/r): 0.0
2020-05-27 23:47:02,658 INFO Gbl:58 used RAM: 948462080B = 926232kB = 904MB free: 521641472B = 497MB total: 1470103552B = 1402MB
2020-05-27 23:47:02,660 INFO EventsManagerImpl:134 event # 4
2020-05-27 23:47:02,671 ERROR MatsimRuntimeModifications$1:41 Getting uncaught Exception in Thread AWT-EventQueue-0
java.lang.UnsatisfiedLinkError: Can't load library: /Users/alexanderbachev/matsim-example-project/natives/macosx-universal//gluegen_rt
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2630)
at java.base/java.lang.Runtime.load0(Runtime.java:744)
at java.base/java.lang.System.load(System.java:1873)
at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:625)
at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:64)
at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:107)
at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:488)
at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(DynamicLibraryBundle.java:427)
at com.jogamp.common.os.Platform$1.run(Platform.java:321)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
at com.jogamp.common.os.Platform.<clinit>(Platform.java:290)
at com.jogamp.opengl.GLProfile.<clinit>(GLProfile.java:154)
at org.matsim.vis.otfvis.opengl.drawer.OTFOGLDrawer.createGLCanvas(OTFOGLDrawer.java:329)
at org.matsim.vis.otfvis.OTFClientLive$1.run(OTFClientLive.java:78)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Am I missing something to load the library?
I had to add the native jars in the same directory as well. That fixed the issue. Thank you for the assistance!
I had to add the native jars in the same directory as well. That fixed the issue. Thank you for the assistance!
Where (how) exactly did you add the jars? I'm having the exact same problem.
I've downloaded the 2 jogl-all.jar
and gluegen-rt.jar
files in my example-project directory and added them as global libraries. (follow the steps from kainagel's comment: https://github.com/matsim-org/matsim-libs/issues/972#issuecomment-619370785 ). Afterwards, download from the same link the jars which are native to your OS and move them in the same directory as the ...-all.jar files. I did that and the issue was resolved.
Great it works! Thanks :)
Hello,
I'm a newbie on MATSim: I'm following the 2019 MATSim class from https://isis.tu-berlin.de/course/view.php?id=16944 and have met the same issue you describe here. I've achived the manual fixing steps but still get the same error. I'm running the equil scenario provided within the repository (https://github.com/matsim-org/matsim-example-project). I tried with several versions of jdk (11, 13, 14, 15), tried with a freshly cloned repo, tried to reboot after adding the global libraries, tried to add the native as global libraries too but nevermind. I'm on Mac OS X 10.15.6 (19G2021). Have someone experienced the issue despite fix proposed here? Having some advices? Here is the end of the log printed in MATSim GUI:
2020-10-13 17:17:05,742 INFO MobsimListenerManager:53 assigned class org.matsim.core.mobsim.framework.listeners.MobsimListener to interface org.matsim.core.mobsim.framework.listeners.MobsimListener
2020-10-13 17:17:08,061 INFO EventsManagerImpl:134 event # 1
/Users/melanie.cortina/Documents/GitHub/matsim-example-project/scenarios/equil/otfsettings.vcfg
2020-10-13 17:17:08,081 INFO EventsManagerImpl:134 event # 4
2020-10-13 17:17:08,082 INFO QNetsimEngine:346 SIMULATION (QNetsimEngine) AT 05:58:30 : #links=0 #nodes=1
2020-10-13 17:17:08,082 INFO QSim:531 SIMULATION (NEW QSim) AT 05:58:30 : #Veh=100 lost=0 simT=0.0s realT=2s; (s/r): 0.0
2020-10-13 17:17:08.670 java[919:11359] *** 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 0x00007fff2f58db57 __exceptionPreprocess + 250
1 libobjc.A.dylib 0x00007fff6823b5bf objc_exception_throw + 48
2 CoreFoundation 0x00007fff2f5b634c -[NSException raise] + 9
3 AppKit 0x00007fff2c7b05ec -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 310
4 AppKit 0x00007fff2c798052 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1416
5 AppKit 0x00007fff2c797ac3 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42
6 libnativewindow_macosx.jnilib 0x000000012977b3fe Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 398
7 ??? 0x0000000110161c90 0x0 + 4564851856
)
libc++abi.dylib: terminating with uncaught exception of type NSException
The simulation did not run properly. Error/Exit code: 134
Thank you
Hi, I am not really proficient in that area, but looking at what you did, I can tell you that I just dragged the native jars to global lib directory in the project and it worked. Do you have them in that directory like in the screenshot above? https://github.com/matsim-org/matsim-code-examples/issues/345#issuecomment-645908233
Hi, thank you for your answer. Yes I have them in the global lib directory as you can see in the screenshot below but it had no effect and did'nt change the error message I get when launching a simulation.
Dear guys,
I am facing yet another issue, this time probably unrelated to the MATSim software. I have recently been working on generating transit data for my project and am trying to run a simulation with pt. Every time I try to run the simulation at the start of QSim, I get a message pop-up about a previous crash (see screenshot), where I can hit reopen or not open. Whatever I click, the program breaks with the following exception:
I'll post part of the log bellow, as it is quite long. I get an issue window from macOS as well (see screenshot).
So far I've tried changing things in the config file, running the equil scenario, running the equil scenario on a newly cloned example-project, updating macOS and using the latest JDK 14, but had no success with avoiding that error. Googling didn't help me either. That error seems to originate from a variety of things. Has anybody encountered something similar?
PS: 1. I was trying to use the Schedule Validator from the GUI the other day, as explained in the book, however that option is missing from the GUI Tools menu. PS: 2. Am I spamming too much the issues section? Is there another place where I can ask questions?