Open TehBrian opened 1 year ago
Any ideas on how I could go about seeking a fix for this? Should I report this to JavaFX (somehow)?
Try manually upgrading JFX version in pom.xml
to 19+ (check Maven for latest version) and build 2.x yourself.
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.
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.
I don't have OSX system to debug this. Try reporting this to openjfx maintainers.
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.
Any update on this issue?
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.
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
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?
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.
Description
Recaf crashes when trying to run the JAR through the command line.
Some system information:
Please let me know if you'd like me to provide any other information.
To Reproduce
Steps to reproduce the behavior:
recaf-2.21.13-J8-jar-with-dependencies.jar
.java -jar recaf-2.21.13-J8-jar-with-dependencies.jar
.Console Output