Jme-jfx-11 on MacOs Issue on JavaFxUI initialize

Hello everybody,

Recently I have tried to use Java FX with jme-jfx-11 from jayfella
on a project which I am developing from a mac book. (OS Version 10.13.6)

My application does crash, when following line is called


I just tried the example from JMonkeyStore jme-jfx-11 from jayfella.
(With same build.gradle dependencies from the descriptions with version 1.1.5)
While this is running all totally fine on my windows, on my macbook
I get this error on the console:

2020-03-20 21:22:08.928 java[774:42513] *** Assertion failure in -[NSMenu itemAtIndex:], /BuildRoot/Library/Caches/
2020-03-20 21:22:08.930 java[774:42513] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: index >= 0'
*** First throw call stack:
	0   CoreFoundation                      0x00007fff285600db __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x00007fff4f89c942 objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff28565cc2 +[NSException raise:format:arguments:] + 98
	3   Foundation                          0x00007fff2a6aea30 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 193
	4   AppKit                              0x00007fff25a5a06c -[NSMenu itemAtIndex:] + 216
	5   AppKit                              0x00007fff25a3db19 -[NSApplication(NSWindowsMenu) setWindowsMenu:] + 199
	6   libglass.dylib                      0x0000000132dd97a7 -[GlassApplication runLoop:] + 1831
	7   libglass.dylib                      0x0000000132dda1e8 Java_com_sun_glass_ui_mac_MacApplication__1runLoop + 264
	8   ???                                 0x00000001184188d0 0x0 + 4701915344
	9   ???                                 0x0000000118412ca7 0x0 + 4701891751
libc++abi.dylib: terminating with uncaught exception of type NSException

Has anybody an idea, why this occurs? Anybody ever tried this with a mac?

I am using eclipse for developing.
In use: jdk-11.0.5
VM arguments: -XstartOnFirstThread.
Also use “setShowSettings(false);” (Because settings window seems to have issues on mac)

Yea, it doesn’t work at all on OSX. From what i’ve been able to tell… it is expecting some sort of menu access that it doesn’t have and so it crashes. I haven’t found a way around it yet.


Okay, thanks for the answer.
With Java 8 this was still working. (With the older lib)
@jayfella do you know by chance any workaround to get this running on OSX?

I don’t “know” of a work around, but maybe upping the jfx plugin version and the jfx version to 12 or 13 might solve it. It’s worth a try.