Error running px4_sitl jmavsim

Hello there, I posted a reply onto this discussion last night because I was having the same issue as OP. The discussion was already verified as solved, and I can see that the issue is dropping fast in the main thread lol.

I am on a 2015 Mac Book Pro (Catalina 10.15.4), and I have been following this set up tutorial from the PX4 docs to run the SITL simulation.

All downloads are successful, when I run the start command:
make px4_sitl jmavsim everything works and I get success messages.
The problem arises right when the program (GUI) starts. I get a NSException error:

2020-05-14 21:36:47.480 java[9412:118755] Apple AWT Internal Exception: NSWindow drag regions should only be invalidated on the Main Thread!
2020-05-14 21:36:47.480 java[9412:118755] *** 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                      0x00007fff377dad07 __exceptionPreprocess + 250
	1   libobjc.A.dylib                     0x00007fff703655bf objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff3780350c -[NSException raise] + 9
	3   AppKit                              0x00007fff34a0a24c -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 310
	4   AppKit                              0x00007fff349f1cb2 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1416
	5   AppKit                              0x00007fff349f1723 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42
	6   libnativewindow_macosx.jnilib       0x000000010d5bdf6e Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 398
	7   ???                                 0x000000011015e407 0x0 + 4564837383
)
libc++abi.dylib: terminating with uncaught exception of type NSException
/Users/carterash/Firmware/Tools/jmavsim_run.sh: line 80:  9412 Abort trap: 6           java -XX:GCTimeRatio=20 -Djava.ext.dirs= -Djavax.accessibility.assistive_technologies=" " -jar jmavsim_run.jar $device $extra_args

In the discussion I mentioned earlier [where OP had the same exact error], the accepted solution said:

Tt works that replace adoptopenjdk 8 with development kit from official website https://www.oracle.com/java/technologies/javase-jdk8-downloads.html

I did follow this, but my result did not change.

I really need help getting this sim off the ground (lol), So i can check out px4!

Now if I can not get a result from this discussion, my plan is to start over and follow the instructions from the px4 git which has completely different instructions.

*I have done plenty of digging into the NSException, but it is a little above my head. But if anyone could also take the time and explain what that is, that would be super cool!

Thanks for reading this, I appreciate it.

Have you tried this PR?

I have not, but I will check it out today. Thanks!

Thanks @JulianOes I was not able to download your commit directly (said I do not have permission). But I did reworked the tutorial, so maybe your new lib was included!

I basically walk through projects with my eyes closed and run into walls until i somehow get it working lol

I don’t think you would have tried my PR then.

To check out a PR: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/checking-out-pull-requests-locally