adoptium-support
adoptium-support copied to clipboard
JDK 17.0.10+7 crashes on MacOS when launching JavaFX 19 application
Please provide a brief summary of the bug
On Mac OS 14.3.1 (Sonoma) my JavaFX-based (19) application crashes JVM upon application launch. 100% reproducible. JDK 17.0.8+7 and JavaFX 19 works, as does JDK 17.0.10+7 and JavaFX 20.
Crash triggered by Stage.show().
Did you test with the latest update version?
- [ ] Yes
Please provide steps to reproduce where possible
https://github.com/georgweiss/JavaFXCrash
Expected Results
I expect the JavaFX app to not crash :-)
Actual Results
See description
What Java Version are you using?
openjdk version "17.0.10" 2024-01-16
What is your operating system and platform?
Mac OS 14.3.1 on x86
How did you install Java?
tarball
Did it work before?
Works with 17.0.8 or JavaFX 20
Did you test with other Java versions?
17.0.8, 21.0.1
Relevant log output
2024-03-17 09:11:59.334 java[22169:215159] *** Assertion failure in -[_NSTrackingAreaAKViewHelper removeTrackingRect:], _NSTrackingAreaAKManager.m:1781
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '0x0 is an invalid NSTrackingRectTag. Common possible reasons for this are: 1. already removed this trackingRectTag, 2. Truncated the NSTrackingRectTag to 32bit at some point.'
*** First throw call stack:
(
0 CoreFoundation 0x00007ff80ade9d76 __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007ff80a8dc321 objc_exception_throw + 48
2 Foundation 0x00007ff80bdd2fc6 -[NSCalendarDate initWithCoder:] + 0
3 AppKit 0x00007ff80eb6cd82 -[_NSTrackingAreaAKViewHelper removeTrackingRect:] + 199
4 libglass.dylib 0x0000000132d75449 Java_com_sun_glass_ui_mac_MacApplication__1getMacKey + 3593
5 libglass.dylib 0x0000000132d7a038 Java_com_sun_glass_ui_mac_MacApplication__1getMacKey + 23032
6 AppKit 0x00007ff80e3c5752 -[NSView setFrame:] + 347
7 libglass.dylib 0x0000000132d7a095 Java_com_sun_glass_ui_mac_MacApplication__1getMacKey + 23125
8 AppKit 0x00007ff80e3d577e -[NSView resizeWithOldSuperviewSize:] + 827
9 AppKit 0x00007ff80e3d501f -[NSView resizeSubviewsWithOldSize:] + 503
10 AppKit 0x00007ff80e3b579b -[NSView setFrameSize:] + 1461
11 AppKit 0x00007ff80e3c5752 -[NSView setFrame:] + 347
12 AppKit 0x00007ff80e3d577e -[NSView resizeWithOldSuperviewSize:] + 827
13 AppKit 0x00007ff80e3d501f -[NSView resizeSubviewsWithOldSize:] + 503
14 AppKit 0x00007ff80e3b579b -[NSView setFrameSize:] + 1461
15 AppKit 0x00007ff80e3d3a80 -[NSThemeFrame setFrameSize:] + 466
16 AppKit 0x00007ff80e3d3186 -[NSWindow _oldPlaceWindow:fromServer:] + 811
17 AppKit 0x00007ff80e3d2053 -[NSWindow _setFrameCommon:display:fromServer:] + 3033
18 libglass.dylib 0x0000000132d6d27f getImage + 6799
19 libglass.dylib 0x0000000132d6ccec getImage + 5372
20 libglass.dylib 0x0000000132d6cf59 getImage + 5993
21 libglass.dylib 0x0000000132d842ce Java_com_sun_glass_ui_mac_MacWindow__1setBounds2 + 446
22 ??? 0x00000001207ea53a 0x0 + 4840138042
23 ??? 0x00000001207e642b 0x0 + 4840121387
24 ??? 0x00000001207e642b 0x0 + 4840121387
25 ??? 0x00000001207e642b 0x0 + 4840121387
26 ??? 0x00000001207e688f 0x0 + 4840122511
)
libc++abi: terminating due to uncaught exception of type NSException
@georgweiss To be clear, this is failing using Eclipse JDK 17.0.10 and OpenJFX 19?
Correct.
AFAIK - OpenJFX 19 is designed to work with Java 19+, you tend to need to match up the versions. I suspect you'll wan to migrate to Java 21 and OpenJFX 21.
Well, our project uses both Java 11 and Java 17 with OpenJFX 19. This is the first time we encounter a crash of this type. Reminding that 17.0.8 does not crash in our scenario.
Created this issue in case it indicates something more fundamental.
https://github.com/openjdk/jfx/blob/jfx21/doc-files/release-notes-19.md states "JavaFX 19 requires JDK 11 or later".
https://github.com/openjdk/jfx/blob/jfx21/doc-files/release-notes-21.md states "JavaFX 21 requires JDK 17 or later", and similar statements were in previous releases, so there is generally no exact version match required.
Fair enough, have you also submitted this at OpenJFX?
I have now, id 9076761. JavaFX bugs now handled by OpenJDK project.
Hey Guys, I am also having the same issue! @georgweiss were you able to fix this error? if so, could you please share how?
We decided to go update JavaFX to 21.
I'm going to be realistic here and say this is a combination that the Adoptium support team won't have capacity to track down and help resolve (especially if 21 works).
Bug still persists on openJDK-23 on mac (m1) ios15.0
Sep 23, 2024 8:36:29 P.M. com.sun.glass.ui.mac.MacApplication lambda$waitForReactivation$6 WARNING: Timeout while waiting for app reactivation *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '0x0 is an invalid NSTrackingRectTag. Common possible reasons for this are: 1. already removed this trackingRectTag, 2. Truncated the NSTrackingRectTag to 32bit at some point.' *** First throw call stack: ( 0 CoreFoundation 0x00000001841f8ec0 __exceptionPreprocess + 176 1 libobjc.A.dylib 0x0000000183cdecd8 objc_exception_throw + 88 2 Foundation 0x00000001853f5358 -[NSCalendarDate initWithCoder:] + 0 3 AppKit 0x00000001884ec7c4 -[_NSTrackingAreaAKViewHelper removeTrackingRect:] + 200 4 libglass.dylib 0x000000010faeaf7c Java_com_sun_glass_ui_mac_MacApplication__1getMacKey + 3456 5 libglass.dylib 0x000000010faf0074 RemoteLayerHostRemoteIdInLocal + 3620 6 AppKit 0x0000000187d0086c -[NSView setFrame:] + 304 7 libglass.dylib 0x000000010faf00d4 RemoteLayerHostRemoteIdInLocal + 3716 8 AppKit 0x0000000187d0d2a4 -[NSView resizeWithOldSuperviewSize:] + 488 9 AppKit 0x0000000187d0cc30 -[NSView resizeSubviewsWithOldSize:] + 360 10 AppKit 0x0000000187cf3074 -[NSView setFrameSize:] + 948 11 AppKit 0x0000000187d0086c -[NSView setFrame:] + 304 12 AppKit 0x0000000187d0d2a4 -[NSView resizeWithOldSuperviewSize:] + 488 13 AppKit 0x0000000187d0cc30 -[NSView resizeSubviewsWithOldSize:] + 360 14 AppKit 0x0000000187cf3074 -[NSView setFrameSize:] + 948 15 AppKit 0x0000000187d0be0c -[NSThemeFrame setFrameSize:] + 244 16 AppKit 0x0000000187d0b768 -[NSWindow _oldPlaceWindow:fromServer:] + 532 17 AppKit 0x0000000187d0ac1c -[NSWindow _setFrameCommon:display:fromServer:] + 1984 18 libglass.dylib 0x000000010fafb0c4 Java_com_sun_glass_ui_mac_MacWindow__1setBounds2 + 416 19 ??? 0x000000013753cfd4 0x0 + 5223206868 20 ??? 0x0000000137539110 0x0 + 5223190800 21 ??? 0x0000000137539110 0x0 + 5223190800 22 ??? 0x0000000137539110 0x0 + 5223190800 23 ??? 0x00000001375396b0 0x0 + 5223192240 24 ??? 0x0000000137539110 0x0 + 5223190800 25 ??? 0x0000000137539110 0x0 + 5223190800 26 ??? 0x0000000137539110 0x0 + 5223190800 27 ??? 0x0000000137539110 0x0 + 5223190800 28 ??? 0x0000000137539110 0x0 + 5223190800 29 ??? 0x0000000137539110 0x0 + 5223190800 30 ??? 0x0000000137539110 0x0 + 5223190800 31 ??? 0x0000000137539110 0x0 + 5223190800 32 ??? 0x0000000137539110 0x0 + 5223190800 33 ??? 0x0000000137539110 0x0 + 5223190800 34 ??? 0x0000000137539110 0x0 + 5223190800 35 ??? 0x00000001375396b0 0x0 + 5223192240 36 ??? 0x0000000137539110 0x0 + 5223190800 37 ??? 0x00000001375396b0 0x0 + 5223192240 38 ??? 0x0000000137538ea0 0x0 + 5223190176 39 ??? 0x0000000137539440 0x0 + 5223191616 40 ??? 0x0000000137538ea0 0x0 + 5223190176 41 ??? 0x0000000137538ea0 0x0 + 5223190176 42 ??? 0x0000000137539110 0x0 + 5223190800 43 ??? 0x00000001375396b0 0x0 + 5223192240 44 ??? 0x0000000137534114 0x0 + 5223170324 45 libjvm.dylib 0x0000000105e08e24 _ZN9JavaCalls11call_helperEP9JavaValueRK12methodHandleP17JavaCallArgumentsP10JavaThread + 984 46 libjvm.dylib 0x0000000105e79e1c _ZL20jni_invoke_nonstaticP7JNIEnv_P9JavaValueP8_jobject11JNICallTypeP10_jmethodIDP18JNI_ArgumentPusherP10JavaThread + 992 47 libjvm.dylib 0x0000000105e7e844 jni_CallVoidMethod + 284 48 libglass.dylib 0x000000010fae6998 JNI_OnLoad + 204 49 Foundation 0x0000000185360880 __NSThreadPerformPerform + 264 50 CoreFoundation 0x0000000184186414 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28 51 CoreFoundation 0x00000001841863a8 __CFRunLoopDoSource0 + 176 52 CoreFoundation 0x000000018418610c __CFRunLoopDoSources0 + 244 53 CoreFoundation 0x0000000184184cf8 __CFRunLoopRun + 840 54 CoreFoundation 0x0000000184184334 CFRunLoopRunSpecific + 572 55 HIToolbox 0x000000018f5bc0cc RunCurrentEventLoopInMode + 292 56 HIToolbox 0x000000018f5c1ebc ReceiveNextEventCommon + 636 57 HIToolbox 0x000000018f5c2020 _BlockUntilNextEventMatchingListInModeWithFilter + 76 58 AppKit 0x0000000187cc7a70 _DPSNextEvent + 660 59 AppKit 0x00000001885ed7b8 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688 60 AppKit 0x0000000187cbab7c -[NSApplication run] + 480 61 libglass.dylib 0x000000010fae8b20 JNI_OnLoad + 8788 62 Foundation 0x0000000185360880 __NSThreadPerformPerform + 264 63 CoreFoundation 0x0000000184186414 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28 64 CoreFoundation 0x00000001841863a8 __CFRunLoopDoSource0 + 176 65 CoreFoundation 0x000000018418610c __CFRunLoopDoSources0 + 244 66 CoreFoundation 0x0000000184184cf8 __CFRunLoopRun + 840 67 CoreFoundation 0x0000000184184334 CFRunLoopRunSpecific + 572 68 libjli.dylib 0x00000001048b4e84 CreateExecutionEnvironment + 404 69 libjli.dylib 0x00000001048b0984 JLI_Launch + 1152 70 java 0x000000010486bbb4 main + 404 71 dyld 0x0000000183d1c274 start + 2840 ) libc++abi: terminating due to uncaught exception of type NSException
Process finished with exit code 134 (interrupted by signal 6:SIGABRT)
Yes, issue seems to be still present:
[INFO] --- javafx:0.0.8:run (default-cli) @ refinery ---
Oct 03, 2024 2:16:18 PM com.sun.glass.ui.mac.MacApplication lambda$waitForReactivation$6
WARNING: Timeout while waiting for app reactivation
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '0x0 is an invalid NSTrackingRectTag. Common possible reasons for this are: 1. already removed this trackingRectTag, 2. Truncated the NSTrackingRectTag to 32bit at some point.'
*** First throw call stack:
(
0 CoreFoundation 0x000000019e12cec0 __exceptionPreprocess + 176
1 libobjc.A.dylib 0x000000019dc12cd8 objc_exception_throw + 88
2 Foundation 0x000000019f329358 -[NSCalendarDate initWithCoder:] + 0
3 AppKit 0x00000001a24207c4 -[_NSTrackingAreaAKViewHelper removeTrackingRect:] + 200
4 libglass.dylib 0x000000011761af7c Java_com_sun_glass_ui_mac_MacApplication__1getMacKey + 3456
5 libglass.dylib 0x0000000117620074 RemoteLayerHostRemoteIdInLocal + 3620
6 AppKit 0x00000001a1c3486c -[NSView setFrame:] + 304
7 libglass.dylib 0x00000001176200d4 RemoteLayerHostRemoteIdInLocal + 3716
8 AppKit 0x00000001a1c412a4 -[NSView resizeWithOldSuperviewSize:] + 488
9 AppKit 0x00000001a1c40c30 -[NSView resizeSubviewsWithOldSize:] + 360
10 AppKit 0x00000001a1c27074 -[NSView setFrameSize:] + 948
11 AppKit 0x00000001a1c3486c -[NSView setFrame:] + 304
12 AppKit 0x00000001a1c412a4 -[NSView resizeWithOldSuperviewSize:] + 488
13 AppKit 0x00000001a1c40c30 -[NSView resizeSubviewsWithOldSize:] + 360
14 AppKit 0x00000001a1c27074 -[NSView setFrameSize:] + 948
15 AppKit 0x00000001a1c3fe0c -[NSThemeFrame setFrameSize:] + 244
16 AppKit 0x00000001a1c3f768 -[NSWindow _oldPlaceWindow:fromServer:] + 532
17 AppKit 0x00000001a1c3ec1c -[NSWindow _setFrameCommon:display:fromServer:] + 1984
18 libglass.dylib 0x000000011762b0c4 Java_com_sun_glass_ui_mac_MacWindow__1setBounds2 + 416
19 ??? 0x0000000139dc4fd4 0x0 + 5265706964
20 ??? 0x0000000139dc1110 0x0 + 5265690896
21 ??? 0x0000000139dc1110 0x0 + 5265690896
22 ??? 0x0000000139dc1110 0x0 + 5265690896
23 ??? 0x0000000139dc16b0 0x0 + 5265692336
24 ??? 0x0000000139dc1110 0x0 + 5265690896
25 ??? 0x0000000139dc1110 0x0 + 5265690896
26 ??? 0x0000000139dc1110 0x0 + 5265690896
27 ??? 0x0000000139dc1110 0x0 + 5265690896
28 ??? 0x0000000139dc1110 0x0 + 5265690896
29 ??? 0x0000000139dc1110 0x0 + 5265690896
30 ??? 0x0000000139dc1110 0x0 + 5265690896
31 ??? 0x0000000139dc1110 0x0 + 5265690896
32 ??? 0x0000000139dc1110 0x0 + 5265690896
33 ??? 0x0000000139dc1110 0x0 + 5265690896
34 ??? 0x0000000139dc1110 0x0 + 5265690896
35 ??? 0x0000000139dc16b0 0x0 + 5265692336
36 ??? 0x0000000139dc1110 0x0 + 5265690896
37 ??? 0x0000000139dc16b0 0x0 + 5265692336
38 ??? 0x0000000139dc0ea0 0x0 + 5265690272
39 ??? 0x0000000139dc1440 0x0 + 5265691712
40 ??? 0x0000000139dc0ea0 0x0 + 5265690272
41 ??? 0x0000000139dc0ea0 0x0 + 5265690272
42 ??? 0x0000000139dc1110 0x0 + 5265690896
43 ??? 0x0000000139dc16b0 0x0 + 5265692336
44 ??? 0x0000000139dbc114 0x0 + 5265670420
45 libjvm.dylib 0x0000000103ee3408 _ZN9JavaCalls11call_helperEP9JavaValueRK12methodHandleP17JavaCallArgumentsP10JavaThread + 604
46 libjvm.dylib 0x0000000103f43504 _ZL20jni_invoke_nonstaticP7JNIEnv_P9JavaValueP8_jobject11JNICallTypeP10_jmethodIDP18JNI_ArgumentPusherP10JavaThread + 644
47 libjvm.dylib 0x0000000103f46e18 jni_CallVoidMethod + 212
48 libglass.dylib 0x0000000117616998 JNI_OnLoad + 204
49 Foundation 0x000000019f294880 __NSThreadPerformPerform + 264
50 CoreFoundation 0x000000019e0ba414 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
51 CoreFoundation 0x000000019e0ba3a8 __CFRunLoopDoSource0 + 176
52 CoreFoundation 0x000000019e0ba10c __CFRunLoopDoSources0 + 244
53 CoreFoundation 0x000000019e0b8cf8 __CFRunLoopRun + 840
54 CoreFoundation 0x000000019e0b8334 CFRunLoopRunSpecific + 572
55 HIToolbox 0x00000001a94f00cc RunCurrentEventLoopInMode + 292
56 HIToolbox 0x00000001a94f5ebc ReceiveNextEventCommon + 636
57 HIToolbox 0x00000001a94f6020 _BlockUntilNextEventMatchingListInModeWithFilter + 76
58 AppKit 0x00000001a1bfba70 _DPSNextEvent + 660
59 AppKit 0x00000001a25217b8 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688
60 AppKit 0x00000001a1beeb7c -[NSApplication run] + 480
61 libglass.dylib 0x0000000117618b20 JNI_OnLoad + 8788
62 Foundation 0x000000019f294880 __NSThreadPerformPerform + 264
63 CoreFoundation 0x000000019e0ba414 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
64 CoreFoundation 0x000000019e0ba3a8 __CFRunLoopDoSource0 + 176
65 CoreFoundation 0x000000019e0ba10c __CFRunLoopDoSources0 + 244
66 CoreFoundation 0x000000019e0b8cf8 __CFRunLoopRun + 840
67 CoreFoundation 0x000000019e0b8334 CFRunLoopRunSpecific + 572
68 libjli.dylib 0x0000000102bbb270 CreateExecutionEnvironment + 400
69 libjli.dylib 0x0000000102bb7354 JLI_Launch + 1128
70 java 0x0000000102b77bb4 main + 392
71 dyld 0x000000019dc50274 start + 2840
mvn -v
Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Maven home: /opt/homebrew/Cellar/maven/3.9.9/libexec
Java version: 23, vendor: Homebrew, runtime: /opt/homebrew/Cellar/openjdk/23/libexec/openjdk.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "15.0", arch: "aarch64", family: "mac"
Apple Silicon MacOS 15.0 (24A335) Sequoia
https://github.com/openjdk/jfx recommend filing the issue there