jMAVsim bug in macOS 10.15.5

Hi, I encountered a bug trying to run jMAVsim after launching this command:
make px4_sitl jmavsim

It shows a lot of stuff in the terminal, then it launches the application, but it crashes and I see this in the terminal:

2020-06-08 21:42:01.249 java[12368:66275] Apple AWT Internal Exception: NSWindow drag    Preformatted text regions should only be invalidated on the Main Thread!
2020-06-08 21:42:01.249 java[12368:66275] *** 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                      0x00007fff33806be7 __exceptionPreprocess + 250
	1   libobjc.A.dylib                     0x00007fff6c5de5bf objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff3382f3dc -[NSException raise] + 9
	3   AppKit                              0x00007fff30a2dddc -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 310
	4   AppKit                              0x00007fff30a15842 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1416
	5   AppKit                              0x00007fff30a152b3 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42
	6   libnativewindow_macosx.jnilib       0x000000014f04df6e Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 398
	7   ???                                 0x0000000113c8a407 0x0 + 4626883591
)
libc++abi.dylib: terminating with uncaught exception of type NSException
/Users/lannimatteolorenzo/Firmware/Tools/jmavsim_run.sh: line 80: 12368 Abort trap: 6           java -XX:GCTimeRatio=20 -Djava.ext.dirs= -Djavax.accessibility.assistive_technologies=" " -jar jmavsim_run.jar $device $extra_args

I’m using a MacBook Pro 13" late 2016 with macOS Catalina 10.15.5.
Any idea if I can solve this? Thank you.

Can you try out this pull request?

So you would do:

cd Tools/jMAVSim
git fetch
git checkout pr-update-libs
git submodule update
cd ../..

And then build and not agree to update the submodule but leave them as is.

Again, you helped me a lot :slight_smile: it solved the problem, now I can launch the jmavsim simulation successfully, thank you.
There is another problem I face with Gazebo instead, it seems to me like a typing error in the code but I’m not good enough to solve it myself.
Do you think I can point it out in this topic?

So you’re saying this pull request fixes it? If so that’s good feedback and means we should probably merge it.

There is another problem I face with Gazebo instead, it seems to me like a typing error in the code but I’m not good enough to solve it myself.
Do you think I can point it out in this topic?

Please create a new thread.

So you’re saying this pull request fixes it? If so that’s good feedback and means we should probably merge it

Yes exactly, at least for me it worked immediately just following your instructions.

Ok I’ll create a new thread about Gazebo :slight_smile:

1 Like