Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when running JAR through console on macOS #636

Open
TehBrian opened this issue Feb 25, 2023 · 11 comments
Open

Crash when running JAR through console on macOS #636

TehBrian opened this issue Feb 25, 2023 · 11 comments
Labels
3rd party problem A bug/problem but caused by a library JavaFX Bugs/Quirks related to JFX platform-specific-bug "It works on my machine!"

Comments

@TehBrian
Copy link

TehBrian commented Feb 25, 2023

Description

Recaf crashes when trying to run the JAR through the command line.

Some system information:

  • OpenJDK 19 installed through Homebrew
  • 14-inch 2021 MacBook Pro
  • macOS 13.2

Please let me know if you'd like me to provide any other information.

To Reproduce

Steps to reproduce the behavior:

  1. Download recaf-2.21.13-J8-jar-with-dependencies.jar.
  2. Run java -jar recaf-2.21.13-J8-jar-with-dependencies.jar.

Console Output

~/Desktop
❯ rm -rf ~/Library/Preferences/Recaf
~/Desktop
❯ java --version
openjdk 19.0.2 2023-01-17
OpenJDK Runtime Environment Homebrew (build 19.0.2)
OpenJDK 64-Bit Server VM Homebrew (build 19.0.2, mixed mode, sharing)
~/Desktop
❯ java -jar recaf-2.21.13-J8-jar-with-dependencies.jar
00:14:07.262 [main] INFO : Recaf-2.21.13
00:14:07.263 [main] INFO : - Java: 19.0.2 (OpenJDK 64-Bit Server VM)
Feb 25, 2023 12:14:07 AM com.sun.javafx.application.PlatformImpl startup
WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @5db54e92'
2023-02-25 00:14:08.458 java[1287:17121] *** Assertion failure in -[_NSTrackingAreaAKViewHelper removeTrackingRect:], _NSTrackingAreaAKManager.m:1613
2023-02-25 00:14:08.460 java[1287:17121] *** 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                      0x0000000180fd43e8 __exceptionPreprocess + 176
	1   libobjc.A.dylib                     0x0000000180b1eea8 objc_exception_throw + 60
	2   Foundation                          0x0000000181f17910 -[NSCalendarDate initWithCoder:] + 0
	3   AppKit                              0x00000001847930cc -[_NSTrackingAreaAKViewHelper removeTrackingRect:] + 200
	4   libglass.dylib                      0x000000010e8b6edc -[GlassViewDelegate setFrameSize:] + 360
	5   libglass.dylib                      0x000000010e8bc034 -[GlassView3D setFrameSize:] + 92
	6   AppKit                              0x0000000184217664 -[NSView setFrame:] + 304
	7   libglass.dylib                      0x000000010e8bc094 -[GlassView3D setFrame:] + 76
	8   AppKit                              0x00000001842255d8 -[NSView resizeWithOldSuperviewSize:] + 508
	9   AppKit                              0x0000000184224fc8 -[NSView resizeSubviewsWithOldSize:] + 360
	10  AppKit                              0x000000018420954c -[NSView setFrameSize:] + 1136
	11  AppKit                              0x0000000184217664 -[NSView setFrame:] + 304
	12  AppKit                              0x00000001842255d8 -[NSView resizeWithOldSuperviewSize:] + 508
	13  AppKit                              0x0000000184224fc8 -[NSView resizeSubviewsWithOldSize:] + 360
	14  AppKit                              0x000000018420954c -[NSView setFrameSize:] + 1136
	15  AppKit                              0x0000000184223c34 -[NSThemeFrame setFrameSize:] + 244
	16  AppKit                              0x000000018422357c -[NSWindow _oldPlaceWindow:fromServer:] + 540
	17  AppKit                              0x0000000184222680 -[NSWindow _setFrameCommon:display:fromServer:] + 1824
	18  libglass.dylib                      0x000000010e8ade64 -[GlassWindow(Java) _setBounds:y:xSet:ySet:w:h:cw:ch:] + 328
	19  libglass.dylib                      0x000000010e8c7050 Java_com_sun_glass_ui_mac_MacWindow__1setBounds2 + 416
	20  ???                                 0x0000000137548aac 0x0 + 5223254700
	21  ???                                 0x0000000137545548 0x0 + 5223241032
	22  ???                                 0x0000000137545548 0x0 + 5223241032
	23  ???                                 0x0000000137545548 0x0 + 5223241032
	24  ???                                 0x0000000137545a88 0x0 + 5223242376
	25  ???                                 0x0000000137545548 0x0 + 5223241032
	26  ???                                 0x0000000137545548 0x0 + 5223241032
	27  ???                                 0x0000000137545548 0x0 + 5223241032
	28  ???                                 0x0000000137545548 0x0 + 5223241032
	29  ???                                 0x0000000137545548 0x0 + 5223241032
	30  ???                                 0x0000000137545548 0x0 + 5223241032
	31  ???                                 0x0000000137545548 0x0 + 5223241032
	32  ???                                 0x0000000137545548 0x0 + 5223241032
	33  ???                                 0x0000000137545548 0x0 + 5223241032
	34  ???                                 0x0000000137545548 0x0 + 5223241032
	35  ???                                 0x0000000137545548 0x0 + 5223241032
	36  ???                                 0x0000000137545a88 0x0 + 5223242376
	37  ???                                 0x0000000137545300 0x0 + 5223240448
	38  ???                                 0x000000013041ed64 0x0 + 5104594276
	39  ???                                 0x0000000137545300 0x0 + 5223240448
	40  ???                                 0x0000000137545548 0x0 + 5223241032
	41  ???                                 0x0000000137545a88 0x0 + 5223242376
	42  ???                                 0x0000000137534140 0x0 + 5223170368
	43  libjvm.dylib                        0x00000001037a1df4 _ZN9JavaCalls11call_helperEP9JavaValueRK12methodHandleP17JavaCallArgumentsP10JavaThread + 564
	44  libjvm.dylib                        0x00000001037f789c _ZL20jni_invoke_nonstaticP7JNIEnv_P9JavaValueP8_jobject11JNICallTypeP10_jmethodIDP18JNI_ArgumentPusherP10JavaThread + 536
	45  libjvm.dylib                        0x00000001037fb3c4 jni_CallVoidMethod + 224
	46  libglass.dylib                      0x000000010e8b2828 -[GlassRunnable run] + 92
	47  Foundation                          0x0000000181e7f900 __NSThreadPerformPerform + 264
	48  CoreFoundation                      0x0000000180f59a08 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
	49  CoreFoundation                      0x0000000180f5999c __CFRunLoopDoSource0 + 176
	50  CoreFoundation                      0x0000000180f5970c __CFRunLoopDoSources0 + 244
	51  CoreFoundation                      0x0000000180f58310 __CFRunLoopRun + 836
	52  CoreFoundation                      0x0000000180f57878 CFRunLoopRunSpecific + 612
	53  HIToolbox                           0x000000018a637fa0 RunCurrentEventLoopInMode + 292
	54  HIToolbox                           0x000000018a637c30 ReceiveNextEventCommon + 236
	55  HIToolbox                           0x000000018a637b2c _BlockUntilNextEventMatchingListInModeWithFilter + 72
	56  AppKit                              0x00000001841dd838 _DPSNextEvent + 632
	57  AppKit                              0x00000001841dc9c8 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728
	58  AppKit                              0x00000001841d0df8 -[NSApplication run] + 464
	59  libglass.dylib                      0x000000010e8b49b0 -[GlassApplication runLoop:] + 1996
	60  Foundation                          0x0000000181e7f900 __NSThreadPerformPerform + 264
	61  CoreFoundation                      0x0000000180f59a08 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
	62  CoreFoundation                      0x0000000180f5999c __CFRunLoopDoSource0 + 176
	63  CoreFoundation                      0x0000000180f5970c __CFRunLoopDoSources0 + 244
	64  CoreFoundation                      0x0000000180f58310 __CFRunLoopRun + 836
	65  CoreFoundation                      0x0000000180f57878 CFRunLoopRunSpecific + 612
	66  libjli.dylib                        0x000000010243f094 CreateExecutionEnvironment + 400
	67  libjli.dylib                        0x000000010243b794 JLI_Launch + 1208
	68  java                                0x0000000102383bbc main + 392
	69  dyld                                0x0000000180b4fe50 start + 2544
)
libc++abi: terminating with uncaught exception of type NSException
[1]    1287 abort      java -jar recaf-2.21.13-J8-jar-with-dependencies.jar
@Col-E Col-E added JavaFX Bugs/Quirks related to JFX 3rd party problem A bug/problem but caused by a library platform-specific-bug "It works on my machine!" labels Feb 25, 2023
@TehBrian
Copy link
Author

TehBrian commented Mar 5, 2023

Any ideas on how I could go about seeking a fix for this? Should I report this to JavaFX (somehow)?

@xxDark
Copy link
Collaborator

xxDark commented Mar 5, 2023

Try manually upgrading JFX version in pom.xml to 19+ (check Maven for latest version) and build 2.x yourself.

@TehBrian
Copy link
Author

TehBrian commented Mar 6, 2023

With JFX set to 21-ea+5, building on Java 17, tests pass. (Building on Java 19 results in an unholy amount of failing tests.) Running on Java 17 gives this error.

JFX 21-ea+5 Log
13:10:20.786 [main] INFO : Recaf-2.21.13
13:10:20.787 [main] INFO : - Java: 17.0.6 (OpenJDK 64-Bit Server VM)
13:10:20.846 [main] TRACE: Loading configuration
Mar 06, 2023 1:10:21 PM com.sun.javafx.application.PlatformImpl startup
WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @4069fa9c'
2023-03-06 13:10:21.814 java[4096:42778] *** Assertion failure in -[_NSTrackingAreaAKViewHelper removeTrackingRect:], _NSTrackingAreaAKManager.m:1613
2023-03-06 13:10:21.817 java[4096:42778] *** 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                      0x000000019a6083e8 __exceptionPreprocess + 176
	1   libobjc.A.dylib                     0x000000019a152ea8 objc_exception_throw + 60
	2   Foundation                          0x000000019b54b910 -[NSCalendarDate initWithCoder:] + 0
	3   AppKit                              0x000000019ddc70cc -[_NSTrackingAreaAKViewHelper removeTrackingRect:] + 200
	4   libglass.dylib                      0x000000010f656edc -[GlassViewDelegate setFrameSize:] + 360
	5   libglass.dylib                      0x000000010f65c034 -[GlassView3D setFrameSize:] + 92
	6   AppKit                              0x000000019d84b664 -[NSView setFrame:] + 304
	7   libglass.dylib                      0x000000010f65c094 -[GlassView3D setFrame:] + 76
	8   AppKit                              0x000000019d8595d8 -[NSView resizeWithOldSuperviewSize:] + 508
	9   AppKit                              0x000000019d858fc8 -[NSView resizeSubviewsWithOldSize:] + 360
	10  AppKit                              0x000000019d83d54c -[NSView setFrameSize:] + 1136
	11  AppKit                              0x000000019d84b664 -[NSView setFrame:] + 304
	12  AppKit                              0x000000019d8595d8 -[NSView resizeWithOldSuperviewSize:] + 508
	13  AppKit                              0x000000019d858fc8 -[NSView resizeSubviewsWithOldSize:] + 360
	14  AppKit                              0x000000019d83d54c -[NSView setFrameSize:] + 1136
	15  AppKit                              0x000000019d857c34 -[NSThemeFrame setFrameSize:] + 244
	16  AppKit                              0x000000019d85757c -[NSWindow _oldPlaceWindow:fromServer:] + 540
	17  AppKit                              0x000000019d856680 -[NSWindow _setFrameCommon:display:fromServer:] + 1824
	18  libglass.dylib                      0x000000010f64de64 -[GlassWindow(Java) _setBounds:y:xSet:ySet:w:h:cw:ch:] + 328
	19  libglass.dylib                      0x000000010f667050 Java_com_sun_glass_ui_mac_MacWindow__1setBounds2 + 416
	20  ???                                 0x000000014753d8ac 0x0 + 5491644588
	21  ???                                 0x0000000147539fc8 0x0 + 5491630024
	22  ???                                 0x0000000147539fc8 0x0 + 5491630024
	23  ???                                 0x0000000147539fc8 0x0 + 5491630024
	24  ???                                 0x000000014753a508 0x0 + 5491631368
	25  ???                                 0x0000000147539fc8 0x0 + 5491630024
	26  ???                                 0x0000000147539fc8 0x0 + 5491630024
	27  ???                                 0x0000000147539fc8 0x0 + 5491630024
	28  ???                                 0x0000000147539fc8 0x0 + 5491630024
	29  ???                                 0x0000000147539fc8 0x0 + 5491630024
	30  ???                                 0x0000000147539fc8 0x0 + 5491630024
	31  ???                                 0x0000000147539fc8 0x0 + 5491630024
	32  ???                                 0x0000000147539fc8 0x0 + 5491630024
	33  ???                                 0x0000000147539fc8 0x0 + 5491630024
	34  ???                                 0x0000000147539fc8 0x0 + 5491630024
	35  ???                                 0x0000000147539fc8 0x0 + 5491630024
	36  ???                                 0x000000014753a508 0x0 + 5491631368
	37  ???                                 0x0000000147539d80 0x0 + 5491629440
	38  ???                                 0x000000014753a2c0 0x0 + 5491630784
	39  ???                                 0x0000000147539d80 0x0 + 5491629440
	40  ???                                 0x0000000147539d80 0x0 + 5491629440
	41  ???                                 0x0000000147539fc8 0x0 + 5491630024
	42  ???                                 0x000000014753a508 0x0 + 5491631368
	43  ???                                 0x0000000147534140 0x0 + 5491605824
	44  libjvm.dylib                        0x00000001014b5ec0 _ZN9JavaCalls11call_helperEP9JavaValueRK12methodHandleP17JavaCallArgumentsP10JavaThread + 564
	45  libjvm.dylib                        0x0000000101505c88 _ZL20jni_invoke_nonstaticP7JNIEnv_P9JavaValueP8_jobject11JNICallTypeP10_jmethodIDP18JNI_ArgumentPusherP10JavaThread + 508
	46  libjvm.dylib                        0x0000000101509834 jni_CallVoidMethod + 224
	47  libglass.dylib                      0x000000010f652828 -[GlassRunnable run] + 92
	48  Foundation                          0x000000019b4b3900 __NSThreadPerformPerform + 264
	49  CoreFoundation                      0x000000019a58da08 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
	50  CoreFoundation                      0x000000019a58d99c __CFRunLoopDoSource0 + 176
	51  CoreFoundation                      0x000000019a58d70c __CFRunLoopDoSources0 + 244
	52  CoreFoundation                      0x000000019a58c310 __CFRunLoopRun + 836
	53  CoreFoundation                      0x000000019a58b878 CFRunLoopRunSpecific + 612
	54  HIToolbox                           0x00000001a3c6bfa0 RunCurrentEventLoopInMode + 292
	55  HIToolbox                           0x00000001a3c6bc30 ReceiveNextEventCommon + 236
	56  HIToolbox                           0x00000001a3c6bb2c _BlockUntilNextEventMatchingListInModeWithFilter + 72
	57  AppKit                              0x000000019d811838 _DPSNextEvent + 632
	58  AppKit                              0x000000019d8109c8 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728
	59  AppKit                              0x000000019d804df8 -[NSApplication run] + 464
	60  libglass.dylib                      0x000000010f6549b0 -[GlassApplication runLoop:] + 1996
	61  Foundation                          0x000000019b4b3900 __NSThreadPerformPerform + 264
	62  CoreFoundation                      0x000000019a58da08 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
	63  CoreFoundation                      0x000000019a58d99c __CFRunLoopDoSource0 + 176
	64  CoreFoundation                      0x000000019a58d70c __CFRunLoopDoSources0 + 244
	65  CoreFoundation                      0x000000019a58c310 __CFRunLoopRun + 836
	66  CoreFoundation                      0x000000019a58b878 CFRunLoopRunSpecific + 612
	67  libjli.dylib                        0x00000001002ff36c CreateExecutionEnvironment + 400
	68  libjli.dylib                        0x00000001002fba68 JLI_Launch + 1208
	69  java                                0x000000010023fbb0 main + 396
	70  dyld                                0x000000019a183e50 start + 2544
)
libc++abi: terminating with uncaught exception of type NSException
[1]    4096 abort      java -jar target/recaf-2.21.13-J8-jar-with-dependencies.jar

With JFX set to 19.0.2, building on Java 17, tests pass. Running on Java 17 gives this error, which is pretty similar to that of JFX 21-ea+5 but not identical.

JFX 19.0.2 Log
13:11:48.946 [main] INFO : Recaf-2.21.13
13:11:48.947 [main] INFO : - Java: 17.0.6 (OpenJDK 64-Bit Server VM)
13:11:49.005 [main] TRACE: Loading configuration
Mar 06, 2023 1:11:49 PM com.sun.javafx.application.PlatformImpl startup
WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @4069fa9c'
2023-03-06 13:11:49.959 java[4207:44562] *** Assertion failure in -[_NSTrackingAreaAKViewHelper removeTrackingRect:], _NSTrackingAreaAKManager.m:1613
2023-03-06 13:11:49.961 java[4207:44562] *** 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                      0x000000019a6083e8 __exceptionPreprocess + 176
	1   libobjc.A.dylib                     0x000000019a152ea8 objc_exception_throw + 60
	2   Foundation                          0x000000019b54b910 -[NSCalendarDate initWithCoder:] + 0
	3   AppKit                              0x000000019ddc70cc -[_NSTrackingAreaAKViewHelper removeTrackingRect:] + 200
	4   libglass.dylib                      0x000000012c3c2edc -[GlassViewDelegate setFrameSize:] + 360
	5   libglass.dylib                      0x000000012c3c8034 -[GlassView3D setFrameSize:] + 92
	6   AppKit                              0x000000019d84b664 -[NSView setFrame:] + 304
	7   libglass.dylib                      0x000000012c3c8094 -[GlassView3D setFrame:] + 76
	8   AppKit                              0x000000019d8595d8 -[NSView resizeWithOldSuperviewSize:] + 508
	9   AppKit                              0x000000019d858fc8 -[NSView resizeSubviewsWithOldSize:] + 360
	10  AppKit                              0x000000019d83d54c -[NSView setFrameSize:] + 1136
	11  AppKit                              0x000000019d84b664 -[NSView setFrame:] + 304
	12  AppKit                              0x000000019d8595d8 -[NSView resizeWithOldSuperviewSize:] + 508
	13  AppKit                              0x000000019d858fc8 -[NSView resizeSubviewsWithOldSize:] + 360
	14  AppKit                              0x000000019d83d54c -[NSView setFrameSize:] + 1136
	15  AppKit                              0x000000019d857c34 -[NSThemeFrame setFrameSize:] + 244
	16  AppKit                              0x000000019d85757c -[NSWindow _oldPlaceWindow:fromServer:] + 540
	17  AppKit                              0x000000019d856680 -[NSWindow _setFrameCommon:display:fromServer:] + 1824
	18  libglass.dylib                      0x000000012c3b9e64 -[GlassWindow(Java) _setBounds:y:xSet:ySet:w:h:cw:ch:] + 328
	19  libglass.dylib                      0x000000012c3d3050 Java_com_sun_glass_ui_mac_MacWindow__1setBounds2 + 416
	20  ???                                 0x0000000111a298ac 0x0 + 4590835884
	21  ???                                 0x0000000111a25fc8 0x0 + 4590821320
	22  ???                                 0x0000000111a25fc8 0x0 + 4590821320
	23  ???                                 0x0000000111a25fc8 0x0 + 4590821320
	24  ???                                 0x0000000111a26508 0x0 + 4590822664
	25  ???                                 0x0000000111a25fc8 0x0 + 4590821320
	26  ???                                 0x0000000111a25fc8 0x0 + 4590821320
	27  ???                                 0x0000000111a25fc8 0x0 + 4590821320
	28  ???                                 0x0000000111a25fc8 0x0 + 4590821320
	29  ???                                 0x0000000111a25fc8 0x0 + 4590821320
	30  ???                                 0x0000000111a25fc8 0x0 + 4590821320
	31  ???                                 0x0000000111a25fc8 0x0 + 4590821320
	32  ???                                 0x0000000111a25fc8 0x0 + 4590821320
	33  ???                                 0x0000000111a25fc8 0x0 + 4590821320
	34  ???                                 0x0000000111a25fc8 0x0 + 4590821320
	35  ???                                 0x0000000111a25fc8 0x0 + 4590821320
	36  ???                                 0x0000000111a26508 0x0 + 4590822664
	37  ???                                 0x0000000111a25d80 0x0 + 4590820736
	38  ???                                 0x000000010a7dcc64 0x0 + 4470983780
	39  ???                                 0x0000000111a25d80 0x0 + 4590820736
	40  ???                                 0x0000000111a25fc8 0x0 + 4590821320
	41  ???                                 0x0000000111a26508 0x0 + 4590822664
	42  ???                                 0x0000000111a20140 0x0 + 4590797120
	43  libjvm.dylib                        0x0000000101fd9ec0 _ZN9JavaCalls11call_helperEP9JavaValueRK12methodHandleP17JavaCallArgumentsP10JavaThread + 564
	44  libjvm.dylib                        0x0000000102029c88 _ZL20jni_invoke_nonstaticP7JNIEnv_P9JavaValueP8_jobject11JNICallTypeP10_jmethodIDP18JNI_ArgumentPusherP10JavaThread + 508
	45  libjvm.dylib                        0x000000010202d834 jni_CallVoidMethod + 224
	46  libglass.dylib                      0x000000012c3be828 -[GlassRunnable run] + 92
	47  Foundation                          0x000000019b4b3900 __NSThreadPerformPerform + 264
	48  CoreFoundation                      0x000000019a58da08 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
	49  CoreFoundation                      0x000000019a58d99c __CFRunLoopDoSource0 + 176
	50  CoreFoundation                      0x000000019a58d70c __CFRunLoopDoSources0 + 244
	51  CoreFoundation                      0x000000019a58c310 __CFRunLoopRun + 836
	52  CoreFoundation                      0x000000019a58b878 CFRunLoopRunSpecific + 612
	53  HIToolbox                           0x00000001a3c6bfa0 RunCurrentEventLoopInMode + 292
	54  HIToolbox                           0x00000001a3c6bc30 ReceiveNextEventCommon + 236
	55  HIToolbox                           0x00000001a3c6bb2c _BlockUntilNextEventMatchingListInModeWithFilter + 72
	56  AppKit                              0x000000019d811838 _DPSNextEvent + 632
	57  AppKit                              0x000000019d8109c8 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728
	58  AppKit                              0x000000019d804df8 -[NSApplication run] + 464
	59  libglass.dylib                      0x000000012c3c09b0 -[GlassApplication runLoop:] + 1996
	60  Foundation                          0x000000019b4b3900 __NSThreadPerformPerform + 264
	61  CoreFoundation                      0x000000019a58da08 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
	62  CoreFoundation                      0x000000019a58d99c __CFRunLoopDoSource0 + 176
	63  CoreFoundation                      0x000000019a58d70c __CFRunLoopDoSources0 + 244
	64  CoreFoundation                      0x000000019a58c310 __CFRunLoopRun + 836
	65  CoreFoundation                      0x000000019a58b878 CFRunLoopRunSpecific + 612
	66  libjli.dylib                        0x0000000100e2336c CreateExecutionEnvironment + 400
	67  libjli.dylib                        0x0000000100e1fa68 JLI_Launch + 1208
	68  java                                0x0000000100d63bb0 main + 396
	69  dyld                                0x000000019a183e50 start + 2544
)
libc++abi: terminating with uncaught exception of type NSException
[1]    4207 abort      java -jar target/recaf-2.21.13-J8-jar-with-dependencies.jar

@xxDark
Copy link
Collaborator

xxDark commented Mar 8, 2023

I don't have OSX system to debug this. Try reporting this to openjfx maintainers.

@gsquaredxc
Copy link

This bug seems to only be associated with certain jdk distributions or more likely however homebrew does it. Zulu18 and AdoptOpenJDK-16 worked for me, but ymmv.

@7homasSutter
Copy link

Any update on this issue?

@TehBrian
Copy link
Author

TehBrian commented Jan 28, 2024

Any update on this issue?

I still haven't managed to get Recaf working on my M1 Pro, but I can't recall if I ended up testing AdoptOpenJDK or Zulu as per gsquaredxc's suggestion.

I'm guessing it has something to do with JavaFX being absent from OpenJDK's build (even though Recaf bundles it in ????) as MCASelector runs into that same issue. See https://github.com/Querz/mcaselector/wiki/Installation.

@Col-E
Copy link
Owner

Col-E commented Jan 29, 2024

Its not related to JavaFX being absent. You can see in the crash log mentions of the JFX natives.

Since you're on 2x, try seeing if updating JFX will solve the issue. You can bump up the version here https://github.com/Col-E/Recaf/blob/master/pom.xml#L22 to one of the later versions

@TehBrian
Copy link
Author

TehBrian commented Jan 30, 2024

Alrighty, I changed JFX to version 21 and built it using ./build (without tests, as a ton of the tests were failing).

❯  java --version
openjdk 21.0.2 2024-01-16
OpenJDK Runtime Environment Homebrew (build 21.0.2)
OpenJDK 64-Bit Server VM Homebrew (build 21.0.2, mixed mode, sharing)
❯ java -jar target/recaf-2.21.13-J8-jar-with-dependencies.jar
20:56:04.070 [main] INFO : Recaf-2.21.13
20:56:04.071 [main] INFO : - Java: 21.0.2 (OpenJDK 64-Bit Server VM)
20:56:04.135 [main] TRACE: Loading configuration
Jan 29, 2024 8:56:04 PM com.sun.javafx.application.PlatformImpl startup
WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @4d5804c6'
2024-01-29 20:56:07.169 java[14392:407972] WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.
2024-01-29 20:56:09.070 java[14392:407972] *** Assertion failure in -[_NSTrackingAreaAKViewHelper removeTrackingRect:], _NSTrackingAreaAKManager.m:1729
*** 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                      0x0000000180d92800 __exceptionPreprocess + 176
	1   libobjc.A.dylib                     0x0000000180889eb4 objc_exception_throw + 60
	2   Foundation                          0x0000000181ed947c -[NSCalendarDate initWithCoder:] + 0
	3   AppKit                              0x0000000184bd3414 -[_NSTrackingAreaAKViewHelper removeTrackingRect:] + 200
	4   libglass.dylib                      0x0000000103e96edc -[GlassViewDelegate setFrameSize:] + 360
	5   libglass.dylib                      0x0000000103e9c034 -[GlassView3D setFrameSize:] + 92
	6   AppKit                              0x000000018452f2c4 -[NSView setFrame:] + 304
	7   libglass.dylib                      0x0000000103e9c094 -[GlassView3D setFrame:] + 76
	8   AppKit                              0x000000018453c950 -[NSView resizeWithOldSuperviewSize:] + 488
	9   AppKit                              0x000000018453c354 -[NSView resizeSubviewsWithOldSize:] + 360
	10  AppKit                              0x000000018452145c -[NSView setFrameSize:] + 1136
	11  AppKit                              0x000000018452f2c4 -[NSView setFrame:] + 304
	12  AppKit                              0x000000018453c950 -[NSView resizeWithOldSuperviewSize:] + 488
	13  AppKit                              0x000000018453c354 -[NSView resizeSubviewsWithOldSize:] + 360
	14  AppKit                              0x000000018452145c -[NSView setFrameSize:] + 1136
	15  AppKit                              0x000000018453b538 -[NSThemeFrame setFrameSize:] + 244
	16  AppKit                              0x000000018453ae9c -[NSWindow _oldPlaceWindow:fromServer:] + 532
	17  AppKit                              0x0000000184539f68 -[NSWindow _setFrameCommon:display:fromServer:] + 1832
	18  libglass.dylib                      0x0000000103e8de64 -[GlassWindow(Java) _setBounds:y:xSet:ySet:w:h:cw:ch:] + 328
	19  libglass.dylib                      0x0000000103ea7050 Java_com_sun_glass_ui_mac_MacWindow__1setBounds2 + 416
	20  ???                                 0x0000000114b18a88 0x0 + 4642146952
	21  ???                                 0x0000000114b1517c 0x0 + 4642132348
	22  ???                                 0x0000000114b1517c 0x0 + 4642132348
	23  ???                                 0x0000000114b1517c 0x0 + 4642132348
	24  ???                                 0x0000000114b1562c 0x0 + 4642133548
	25  ???                                 0x0000000114b1517c 0x0 + 4642132348
	26  ???                                 0x0000000114b1517c 0x0 + 4642132348
	27  ???                                 0x0000000114b1517c 0x0 + 4642132348
	28  ???                                 0x0000000114b1517c 0x0 + 4642132348
	29  ???                                 0x0000000114b1517c 0x0 + 4642132348
	30  ???                                 0x0000000114b1517c 0x0 + 4642132348
	31  ???                                 0x0000000114b1517c 0x0 + 4642132348
	32  ???                                 0x0000000114b1517c 0x0 + 4642132348
	33  ???                                 0x0000000114b1517c 0x0 + 4642132348
	34  ???                                 0x0000000114b1517c 0x0 + 4642132348
	35  ???                                 0x0000000114b1517c 0x0 + 4642132348
	36  ???                                 0x0000000114b14f70 0x0 + 4642131824
	37  ???                                 0x0000000114b1517c 0x0 + 4642132348
	38  ???                                 0x0000000114b1562c 0x0 + 4642133548
	39  ???                                 0x0000000114b14f70 0x0 + 4642131824
	40  ???                                 0x000000010d995298 0x0 + 4523119256
	41  ???                                 0x0000000114b14f70 0x0 + 4642131824
	42  ???                                 0x0000000114b1517c 0x0 + 4642132348
	43  ???                                 0x0000000114b1562c 0x0 + 4642133548
	44  ???                                 0x0000000114b10140 0x0 + 4642111808
	45  libjvm.dylib                        0x000000010441f6fc _ZN9JavaCalls11call_helperEP9JavaValueRK12methodHandleP17JavaCallArgumentsP10JavaThread + 604
	46  libjvm.dylib                        0x000000010447c6e8 _ZL20jni_invoke_nonstaticP7JNIEnv_P9JavaValueP8_jobject11JNICallTypeP10_jmethodIDP18JNI_ArgumentPusherP10JavaThread + 536
	47  libjvm.dylib                        0x000000010447ffac jni_CallVoidMethod + 212
	48  libglass.dylib                      0x0000000103e92828 -[GlassRunnable run] + 92
	49  Foundation                          0x0000000181e422d8 __NSThreadPerformPerform + 264
	50  CoreFoundation                      0x0000000180d1dcfc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
	51  CoreFoundation                      0x0000000180d1dc90 __CFRunLoopDoSource0 + 176
	52  CoreFoundation                      0x0000000180d1da00 __CFRunLoopDoSources0 + 244
	53  CoreFoundation                      0x0000000180d1c5f0 __CFRunLoopRun + 828
	54  CoreFoundation                      0x0000000180d1bc5c CFRunLoopRunSpecific + 608
	55  HIToolbox                           0x000000018b298448 RunCurrentEventLoopInMode + 292
	56  HIToolbox                           0x000000018b2980d8 ReceiveNextEventCommon + 220
	57  HIToolbox                           0x000000018b297fdc _BlockUntilNextEventMatchingListInModeWithFilter + 76
	58  AppKit                              0x00000001844f6c54 _DPSNextEvent + 660
	59  AppKit                              0x0000000184cccebc -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
	60  AppKit                              0x00000001844ea100 -[NSApplication run] + 476
	61  libglass.dylib                      0x0000000103e949b0 -[GlassApplication runLoop:] + 1996
	62  Foundation                          0x0000000181e422d8 __NSThreadPerformPerform + 264
	63  CoreFoundation                      0x0000000180d1dcfc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
	64  CoreFoundation                      0x0000000180d1dc90 __CFRunLoopDoSource0 + 176
	65  CoreFoundation                      0x0000000180d1da00 __CFRunLoopDoSources0 + 244
	66  CoreFoundation                      0x0000000180d1c5f0 __CFRunLoopRun + 828
	67  CoreFoundation                      0x0000000180d1bc5c CFRunLoopRunSpecific + 608
	68  libjli.dylib                        0x0000000103097290 CreateExecutionEnvironment + 400
	69  libjli.dylib                        0x00000001030934f0 JLI_Launch + 1128
	70  java                                0x0000000102c0fbac main + 392
	71  dyld                                0x00000001808c50e0 start + 2360
)
libc++abi: terminating due to uncaught exception of type NSException
[1]    14392 abort      java -jar target/recaf-2.21.13-J8-jar-with-dependencies.jar

Should I be using a different Java version than 21?

@Col-E
Copy link
Owner

Col-E commented Jan 30, 2024

Well, the Java version shouldn't matter much, so long as its compatible with JavaFX.

The issue looks like https://bugs.openjdk.org/browse/JDK-8296654 which is why I recc'd updating JavaFX since the ticket has since been closed and marked as fixed. Odd that it didn't resolve the issue. Maybe try a specific version that is mentioned on the ticket instead of the latest, though I assumed the latest would have the fix.

@EastLord
Copy link

crash.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd party problem A bug/problem but caused by a library JavaFX Bugs/Quirks related to JFX platform-specific-bug "It works on my machine!"
Projects
None yet
Development

No branches or pull requests

6 participants