JDK-8206133 : [Accessibility, macOS] Native assertion errors in glass on JavaFX application shutdown
  • Type: Bug
  • Component: javafx
  • Sub-Component: accessibility
  • Affected Version: jfx11
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • OS: os_x
  • Submitted: 2018-07-02
  • Updated: 2024-04-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Relates :  
Description
With Voiceover enabled, JavaFX application crashes when Platform.exit() method is called on macOS.

Java has been detached already, but someone is still trying to use it at -[GlassAccessible accessibilityAttributeValue:]:/Users/AGHAISAS/prem/jfx-dev/rt/modules/javafx.graphics/src/main/native-glass/mac/GlassAccessible.m:74
0 libglass.dylib 0x000000012d64f4cb -[GlassAccessible accessibilityAttributeValue:] + 123
1 AppKit 0x00007fff2a9ee523 NSAccessibilityGetObjectForAttributeUsingLegacyAPI + 371
2 AppKit 0x00007fff2af9fe37 NSAccessibilityPerformEntryPointObject.llvm.734619A0 + 16
3 AppKit 0x00007fff2afa0003 _NSAccessibilityEntryPointValueForAttribute.llvm.734619A0 + 182
4 AppKit 0x00007fff2ad47811 -[NSObject(NSAccessibilityInternal) _accessibilityValueForAttribute:clientError:] + 351
5 AppKit 0x00007fff2ad4e474 CopyAppKitUIElementAttributeValueNoCatch + 98
6 AppKit 0x00007fff2ad4c0ae CopyAttributeValue + 172
7 HIServices 0x00007fff2bc4c231 _AXXMIGCopyAttributeValue + 282
8 HIServices 0x00007fff2bc561ac _XCopyAttributeValue + 455
9 HIServices 0x00007fff2bc2e939 mshMIGPerform + 212
10 CoreFoundation 0x00007fff2d356219 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 41
11 CoreFoundation 0x00007fff2d356165 __CFRunLoopDoSource1 + 533
12 CoreFoundation 0x00007fff2d34dd50 __CFRunLoopRun + 2848
13 CoreFoundation 0x00007fff2d34cfa3 CFRunLoopRunSpecific + 483
14 java 0x000000010459fbc3 CreateExecutionEnvironment + 401
15 java 0x000000010459bebc JLI_Launch + 1568
16 java 0x000000010459ad4c main + 384
17 java 0x000000010459abc4 start + 52

Use the test attached with JDK-8203345, to reproduce this issue.
Comments
I still see this occasionally when doing macOS accessibility testing. I am changing the title, since this is *not* a crash, but an assertion message with a native stack trace logged to the console.
02-04-2024

This is similar to JDK-8231558, in that a native method is being called after the JVM has been detached, and that method is trying to make a JNI upcall. We need to evaluate whether a similar fix (using GET_MAIN_JENV_NOWARN for the native a11y calls) might be the right solution here, too.
28-07-2022

I can reproduce it intermittently on my Mac OS X 10.12.6 system
03-07-2018

I can't reproduce the crash on MacOS X 10.13.5 I run the test as a standalone application (using its main class).
02-07-2018