I have tracked down a workaround which also I think points us closer to what may be causing this.
If I go to my MacOS settings, I have “Automatically hide and show the menu bar” to “Always”. If I set this to “Never”, it completely prevents all of the error output. If I set it back to “Always” the error output comes right back. Even if I change this Mac OS setting in the middle of a JavaFX runtime, it will have the expected effect. Turning it to “Always” during runtime will causes the JavaFX app to start have the error output, while turning it to “Never” during runtime will prevent any further error output from being produced as long as it stays on “Never”. So unless you are willing to put up with all of the error output, JavaFX is not fully compatible with the MacOS feature of automatically hiding the system menu bar right now. > On Dec 18, 2022, at 7:49 PM, Matt Groth <mgrot...@gmail.com> wrote: > > This is actually more severe than I initially thought. > > The error output is getting printed constantly during runtime, so much so > that it is exceeding the console’s buffer. > > It seems to be triggered whenever the JavaFX application gains or loses > focus. That may not be the only trigger. > > This issue is present in the latest version of JavaFX from Maven, 20-ea+11. > However, as the reproducer I attached in the previous email shows that the > issue is also present in 19. > > >> On Dec 18, 2022, at 4:29 PM, Matt Groth <mgrot...@gmail.com> wrote: >> >> I’m a JavaFX developer using a silicon Mac. Immediately after updating my >> Mac to Ventura 13.1 (22C65) a few hours ago, I started to have this issue. I >> have never seen this issue before. >> >> Any JavaFX app I run from source produces error output. I can not find a >> single workaround. The output does not explain the cause. Google searches on >> the text within the output produce no useful results. I have tried >> restarting my computer, but the problem persists. >> >> Attached is a compressed reproducer project. I can reliable reproduce the >> error output by running this. If I comment out the line that launches the >> JavaFX app, the error output is not produced. >> >> I execute the code using `gradle run` with Gradle 7.6. My JDK is 18.0.2. I >> am unsure if this matters, but my Xcode is up to date (14.2). >> >> The following is the full console output. The error output is in between >> “Hello world” and “Goodbye world”, and it is red in my console. >> >> ======================================================================================================================== >> /Users/matthewgroth/.gradle/wrapper/dists/gradle-7.6-all/9f832ih6bniajn45pbmqhk2cw/gradle-7.6/bin/gradle >> run >> >>> Configure project : >> Project : => no module-info.java found >> >>> Task :run >> Hello world >> 1 HIToolbox 0x000000018fd8ad4c >> _ZN15MenuBarInstance21IsAutoShowHideAllowedEv + 284 >> 2 HIToolbox 0x000000018fc64230 >> _ZN15MenuBarInstance24UpdateAutoShowVisibilityE5Pointh + 40 >> 3 HIToolbox 0x000000018fc64184 >> _ZN15MenuBarInstance14EnableAutoShowEv + 56 >> 4 HIToolbox 0x000000018fc07310 >> SetMenuBarObscured + 372 >> 5 HIToolbox 0x000000018fc06ee8 >> _ZN13HIApplication15HandleActivatedEP14OpaqueEventRefhP15OpaqueWindowPtrh + >> 172 >> 6 HIToolbox 0x000000018fc00fcc >> _ZN13HIApplication13EventObserverEjP14OpaqueEventRefPv + 296 >> 7 HIToolbox 0x000000018fbc7cd0 >> _NotifyEventLoopObservers + 176 >> 8 HIToolbox 0x000000018fc0096c >> AcquireEventFromQueue + 432 >> 9 HIToolbox 0x000000018fbefc84 >> ReceiveNextEventCommon + 320 >> 10 HIToolbox 0x000000018fbefb2c >> _BlockUntilNextEventMatchingListInModeWithFilter + 72 >> 11 AppKit 0x000000018979c424 _DPSNextEvent + >> 632 >> 12 AppKit 0x000000018979b5b4 >> -[NSApplication(NSEvent) >> _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728 >> 13 libglass.dylib 0x000000010145bd88 JNI_OnLoad + 9324 >> 14 libglass.dylib 0x000000010145c8bc >> Java_com_sun_glass_ui_mac_MacApplication__1enterNestedEventLoopImpl + 64 >> 15 ??? 0x0000000109e818ac 0x0 + 4461172908 >> 16 ??? 0x0000000109e7dd80 0x0 + 4461157760 >> 17 ??? 0x0000000109e7dd80 0x0 + 4461157760 >> 18 ??? 0x0000000109e7dd80 0x0 + 4461157760 >> 19 ??? 0x0000000109e7dd80 0x0 + 4461157760 >> 20 ??? 0x0000000109e7dfc8 0x0 + 4461158344 >> 21 ??? 0x0000000109e7dfc8 0x0 + 4461158344 >> 22 ??? 0x0000000109e78140 0x0 + 4461134144 >> 23 libjvm.dylib 0x0000000101c4cda8 >> _ZN9JavaCalls11call_helperEP9JavaValueRK12methodHandleP17JavaCallArgumentsP10JavaThread >> + 908 >> 24 libjvm.dylib 0x0000000101ca687c >> _ZL20jni_invoke_nonstaticP7JNIEnv_P9JavaValueP8_jobject11JNICallTypeP10_jmethodIDP18JNI_ArgumentPusherP10JavaThread >> + 796 >> 25 libjvm.dylib 0x0000000101caaf58 >> jni_CallVoidMethod + 312 >> 26 libglass.dylib 0x0000000101459d24 JNI_OnLoad + 1032 >> 27 CoreFoundation 0x0000000186511570 >> __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148 >> 28 CoreFoundation 0x00000001865af054 >> ___CFXRegistrationPost_block_invoke + 88 >> 29 CoreFoundation 0x00000001865aef9c >> _CFXRegistrationPost + 440 >> 30 CoreFoundation 0x00000001864e2b74 >> _CFXNotificationPost + 708 >> 31 Foundation 0x00000001873d072c >> -[NSNotificationCenter postNotificationName:object:userInfo:] + 88 >> 32 AppKit 0x000000018978fc24 -[NSApplication >> finishLaunching] + 248 >> 33 AppKit 0x000000018978f910 -[NSApplication >> run] + 252 >> 34 libglass.dylib 0x000000010145bb70 JNI_OnLoad + 8788 >> 35 Foundation 0x0000000187440b30 >> __NSThreadPerformPerform + 264 >> 36 CoreFoundation 0x000000018651ca18 >> __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 >> 37 CoreFoundation 0x000000018651c9ac >> __CFRunLoopDoSource0 + 176 >> 38 CoreFoundation 0x000000018651c71c >> __CFRunLoopDoSources0 + 244 >> 39 CoreFoundation 0x000000018651b320 __CFRunLoopRun + >> 836 >> 40 CoreFoundation 0x000000018651a888 >> CFRunLoopRunSpecific + 612 >> 41 libjli.dylib 0x00000001008a2fec >> CreateExecutionEnvironment + 400 >> 42 libjli.dylib 0x000000010089f1fc JLI_Launch + 1184 >> 43 java 0x00000001007ebba8 main + 408 >> 44 dyld 0x0000000186113e50 start + 2544 >> 1 HIToolbox 0x000000018fd8ad4c >> _ZN15MenuBarInstance21IsAutoShowHideAllowedEv + 284 >> 2 HIToolbox 0x000000018fc64230 >> _ZN15MenuBarInstance24UpdateAutoShowVisibilityE5Pointh + 40 >> 3 HIToolbox 0x000000018fc68380 >> _ZL19AutoShowHideHandlerP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv + 104 >> 4 HIToolbox 0x000000018fbc84c0 >> _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec >> + 1092 >> 5 HIToolbox 0x000000018fbc7940 >> _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec >> + 356 >> 6 HIToolbox 0x000000018fbc77d0 >> SendEventToEventTargetWithOptions + 44 >> 7 HIToolbox 0x000000018fc079cc >> _ZL29ToolboxEventDispatcherHandlerP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv >> + 472 >> 8 HIToolbox 0x000000018fbc8968 >> _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec >> + 2284 >> 9 HIToolbox 0x000000018fbc7940 >> _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec >> + 356 >> 10 HIToolbox 0x000000018fbddbb8 >> SendEventToEventTarget + 40 >> 11 AppKit 0x000000018979bad8 >> -[NSApplication(NSEvent) >> _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2044 >> 12 libglass.dylib 0x000000010145bd88 JNI_OnLoad + 9324 >> 13 libglass.dylib 0x000000010145c8bc >> Java_com_sun_glass_ui_mac_MacApplication__1enterNestedEventLoopImpl + 64 >> 14 ??? 0x0000000109e818ac 0x0 + 4461172908 >> 15 ??? 0x0000000109e7dd80 0x0 + 4461157760 >> 16 ??? 0x0000000109e7dd80 0x0 + 4461157760 >> 17 ??? 0x0000000109e7dd80 0x0 + 4461157760 >> 18 ??? 0x0000000109e7dd80 0x0 + 4461157760 >> 19 ??? 0x0000000109e7dfc8 0x0 + 4461158344 >> 20 ??? 0x0000000109e7dfc8 0x0 + 4461158344 >> 21 ??? 0x0000000109e78140 0x0 + 4461134144 >> 22 libjvm.dylib 0x0000000101c4cda8 >> _ZN9JavaCalls11call_helperEP9JavaValueRK12methodHandleP17JavaCallArgumentsP10JavaThread >> + 908 >> 23 libjvm.dylib 0x0000000101ca687c >> _ZL20jni_invoke_nonstaticP7JNIEnv_P9JavaValueP8_jobject11JNICallTypeP10_jmethodIDP18JNI_ArgumentPusherP10JavaThread >> + 796 >> 24 libjvm.dylib 0x0000000101caaf58 >> jni_CallVoidMethod + 312 >> 25 libglass.dylib 0x0000000101459d24 JNI_OnLoad + 1032 >> 26 CoreFoundation 0x0000000186511570 >> __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148 >> 27 CoreFoundation 0x00000001865af054 >> ___CFXRegistrationPost_block_invoke + 88 >> 28 CoreFoundation 0x00000001865aef9c >> _CFXRegistrationPost + 440 >> 29 CoreFoundation 0x00000001864e2b74 >> _CFXNotificationPost + 708 >> 30 Foundation 0x00000001873d072c >> -[NSNotificationCenter postNotificationName:object:userInfo:] + 88 >> 31 AppKit 0x000000018978fc24 -[NSApplication >> finishLaunching] + 248 >> 32 AppKit 0x000000018978f910 -[NSApplication >> run] + 252 >> 33 libglass.dylib 0x000000010145bb70 JNI_OnLoad + 8788 >> 34 Foundation 0x0000000187440b30 >> __NSThreadPerformPerform + 264 >> 35 CoreFoundation 0x000000018651ca18 >> __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 >> 36 CoreFoundation 0x000000018651c9ac >> __CFRunLoopDoSource0 + 176 >> 37 CoreFoundation 0x000000018651c71c >> __CFRunLoopDoSources0 + 244 >> 38 CoreFoundation 0x000000018651b320 __CFRunLoopRun + >> 836 >> 39 CoreFoundation 0x000000018651a888 >> CFRunLoopRunSpecific + 612 >> 40 libjli.dylib 0x00000001008a2fec >> CreateExecutionEnvironment + 400 >> 41 libjli.dylib 0x000000010089f1fc JLI_Launch + 1184 >> 42 java 0x00000001007ebba8 main + 408 >> 43 dyld 0x0000000186113e50 start + 2544 >> 1 HIToolbox 0x000000018fc645c8 >> _ZN15MenuBarInstance22EnsureAutoShowObserverEv + 120 >> 2 HIToolbox 0x000000018fc0727c >> SetMenuBarObscured + 224 >> 3 HIToolbox 0x000000018fc06ee8 >> _ZN13HIApplication15HandleActivatedEP14OpaqueEventRefhP15OpaqueWindowPtrh + >> 172 >> 4 HIToolbox 0x000000018fc00fcc >> _ZN13HIApplication13EventObserverEjP14OpaqueEventRefPv + 296 >> 5 HIToolbox 0x000000018fbc7cd0 >> _NotifyEventLoopObservers + 176 >> 6 HIToolbox 0x000000018fc0096c >> AcquireEventFromQueue + 432 >> 7 HIToolbox 0x000000018fbefc84 >> ReceiveNextEventCommon + 320 >> 8 HIToolbox 0x000000018fbefb2c >> _BlockUntilNextEventMatchingListInModeWithFilter + 72 >> 9 AppKit 0x000000018979c424 _DPSNextEvent + >> 632 >> 10 AppKit 0x000000018979b5b4 >> -[NSApplication(NSEvent) >> _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728 >> 11 libglass.dylib 0x000000010145bd88 JNI_OnLoad + 9324 >> 12 libglass.dylib 0x000000010145c8bc >> Java_com_sun_glass_ui_mac_MacApplication__1enterNestedEventLoopImpl + 64 >> 13 ??? 0x0000000109e818ac 0x0 + 4461172908 >> 14 ??? 0x0000000109e7dd80 0x0 + 4461157760 >> 15 ??? 0x0000000109e7dd80 0x0 + 4461157760 >> 16 ??? 0x0000000109e7dd80 0x0 + 4461157760 >> 17 ??? 0x0000000109e7dd80 0x0 + 4461157760 >> 18 ??? 0x0000000109e7dfc8 0x0 + 4461158344 >> 19 ??? 0x0000000109e7dfc8 0x0 + 4461158344 >> 20 ??? 0x0000000109e78140 0x0 + 4461134144 >> 21 libjvm.dylib 0x0000000101c4cda8 >> _ZN9JavaCalls11call_helperEP9JavaValueRK12methodHandleP17JavaCallArgumentsP10JavaThread >> + 908 >> 22 libjvm.dylib 0x0000000101ca687c >> _ZL20jni_invoke_nonstaticP7JNIEnv_P9JavaValueP8_jobject11JNICallTypeP10_jmethodIDP18JNI_ArgumentPusherP10JavaThread >> + 796 >> 23 libjvm.dylib 0x0000000101caaf58 >> jni_CallVoidMethod + 312 >> 24 libglass.dylib 0x0000000101459d24 JNI_OnLoad + 1032 >> 25 CoreFoundation 0x0000000186511570 >> __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148 >> 26 CoreFoundation 0x00000001865af054 >> ___CFXRegistrationPost_block_invoke + 88 >> 27 CoreFoundation 0x00000001865aef9c >> _CFXRegistrationPost + 440 >> 28 CoreFoundation 0x00000001864e2b74 >> _CFXNotificationPost + 708 >> 29 Foundation 0x00000001873d072c >> -[NSNotificationCenter postNotificationName:object:userInfo:] + 88 >> 30 AppKit 0x000000018978fc24 -[NSApplication >> finishLaunching] + 248 >> 31 AppKit 0x000000018978f910 -[NSApplication >> run] + 252 >> 32 libglass.dylib 0x000000010145bb70 JNI_OnLoad + 8788 >> 33 Foundation 0x0000000187440b30 >> __NSThreadPerformPerform + 264 >> 34 CoreFoundation 0x000000018651ca18 >> __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 >> 35 CoreFoundation 0x000000018651c9ac >> __CFRunLoopDoSource0 + 176 >> 36 CoreFoundation 0x000000018651c71c >> __CFRunLoopDoSources0 + 244 >> 37 CoreFoundation 0x000000018651b320 __CFRunLoopRun + >> 836 >> 38 CoreFoundation 0x000000018651a888 >> CFRunLoopRunSpecific + 612 >> 39 libjli.dylib 0x00000001008a2fec >> CreateExecutionEnvironment + 400 >> 40 libjli.dylib 0x000000010089f1fc JLI_Launch + 1184 >> 41 java 0x00000001007ebba8 main + 408 >> 42 dyld 0x0000000186113e50 start + 2544 >> Goodbye world >> >> BUILD SUCCESSFUL in 5s >> 5 actionable tasks: 5 executed >> ======================================================================================================================== >> >> >> <hitoolbox.zip> >