[Bug] macOS下启动游戏崩溃
平台 | Platform
macOS 14.5 (23F79)
问题描述 | Problem Description
点击启动游戏按钮,启动期崩溃。
启动器崩溃报告 / 启动器日志文件 | Launcher Crash Report / Launcher Log File
➜ Games java -jar HMCL-3.5.9.259.jar [21:03:05] [org.jackhuang.hmcl.util.SelfDependencyPatcher.patch/INFO] Missing JavaFX dependencies, attempting to patch in missing classes [21:03:05] [org.jackhuang.hmcl.util.SelfDependencyPatcher.loadFromCache/INFO] - Loading dependencies... [21:03:05] [org.jackhuang.hmcl.util.SelfDependencyPatcher.patch/INFO] - Done! [21:03:05] [org.jackhuang.hmcl.Launcher.main/INFO] *** HMCL 3.5.9.259 *** [21:03:05] [org.jackhuang.hmcl.Launcher.main/INFO] Operating System: Mac OS X 14.5 [21:03:05] [org.jackhuang.hmcl.Launcher.main/INFO] System Architecture: aarch64 [21:03:05] [org.jackhuang.hmcl.Launcher.main/INFO] Java Architecture: aarch64 [21:03:05] [org.jackhuang.hmcl.Launcher.main/INFO] Java Version: 22.0.1, Oracle Corporation [21:03:05] [org.jackhuang.hmcl.Launcher.main/INFO] Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode, sharing), Oracle Corporation [21:03:05] [org.jackhuang.hmcl.Launcher.main/INFO] Java Home: /Library/Java/JavaVirtualMachines/jdk-22.jdk/Contents/Home [21:03:05] [org.jackhuang.hmcl.Launcher.main/INFO] Current Directory: /Users/lolimaster/Games [21:03:05] [org.jackhuang.hmcl.Launcher.main/INFO] HMCL Directory: /Users/lolimaster/Library/Application Support/hmcl [21:03:05] [org.jackhuang.hmcl.Launcher.main/INFO] HMCL Jar Path: /Users/lolimaster/Games/HMCL-3.5.9.259.jar [21:03:05] [org.jackhuang.hmcl.Launcher.main/INFO] HMCL Log File: /Users/lolimaster/Library/Application Support/hmcl/logs/2024-10-28T21-03-05.log [21:03:05] [org.jackhuang.hmcl.Launcher.main/INFO] Memory: 9216MB [21:03:05] [org.jackhuang.hmcl.Launcher.main/INFO] Physical memory: 36864 MB [21:03:05] [org.jackhuang.hmcl.Launcher.main/INFO] Metaspace: 7MB objc[71933]: Class ButtonAccessibility is implemented in both /Library/Java/JavaVirtualMachines/jdk-22.jdk/Contents/Home/lib/libawt_lwawt.dylib (0x100d6caa0) and /Users/lolimaster/.openjfx/cache/17.0.13/libglass.dylib (0x14c4fe218). One of the two will be used. Which one is undefined. [21:03:05] [org.jackhuang.hmcl.Launcher.start/INFO] JavaFX Version: 17.0.13+2 [21:03:05] [org.jackhuang.hmcl.Launcher.start/INFO] Prism pipeline: com.sun.prism.es2.ES2Pipeline [21:03:05] [org.jackhuang.hmcl.setting.ConfigHolder.init/INFO] Config location: /Users/lolimaster/Games/.hmcl.json [21:03:05] [org.jackhuang.hmcl.auth.authlibinjector.AuthlibInjectorDownloader.checkUpdate/INFO] Checking update of authlib-injector [21:03:05] [org.jackhuang.hmcl.task.AsyncTaskExecutor.lambda$executeNormalTask$19/TRACE] Executing task: org.jackhuang.hmcl.game.GameRepository.refreshVersionsAsync(GameRepository.java:90) [21:03:05] [org.jackhuang.hmcl.task.AsyncTaskExecutor.lambda$executeNormalTask$19/TRACE] Executing task: org.jackhuang.hmcl.game.GameRepository.refreshVersionsAsync(GameRepository.java:90) [21:03:05] [org.jackhuang.hmcl.event.EventBus.fireEvent/INFO] RefreshingVersionsEvent [source=HMCLGameRepository [versions=null, baseDirectory=.minecraft]] gets fired [21:03:05] [org.jackhuang.hmcl.event.EventBus.fireEvent/INFO] RefreshingVersionsEvent [source=HMCLGameRepository [versions=null, baseDirectory=.minecraft]] gets fired [21:03:05] [org.jackhuang.hmcl.ui.Controllers.initialize/INFO] Start initializing application [21:03:05] [org.jackhuang.hmcl.event.EventBus.fireEvent/INFO] LoadedOneVersionEvent [source=HMCLGameRepository [versions=null, baseDirectory=.minecraft], version=Version [id=1.21.1 Neoforge]] gets fired [21:03:05] [org.jackhuang.hmcl.event.EventBus.fireEvent/INFO] LoadedOneVersionEvent [source=HMCLGameRepository [versions=null, baseDirectory=.minecraft], version=Version [id=1.20.1]] gets fired [21:03:05] [org.jackhuang.hmcl.event.EventBus.fireEvent/INFO] LoadedOneVersionEvent [source=HMCLGameRepository [versions=null, baseDirectory=.minecraft], version=Version [id=1.20.4 optifine]] gets fired [21:03:05] [org.jackhuang.hmcl.event.EventBus.fireEvent/INFO] LoadedOneVersionEvent [source=HMCLGameRepository [versions=null, baseDirectory=.minecraft], version=Version [id=1.21]] gets fired [21:03:05] [org.jackhuang.hmcl.event.EventBus.fireEvent/INFO] LoadedOneVersionEvent [source=HMCLGameRepository [versions=null, baseDirectory=.minecraft], version=Version [id=1.21.1 Neoforge]] gets fired [21:03:05] [org.jackhuang.hmcl.event.EventBus.fireEvent/INFO] LoadedOneVersionEvent [source=HMCLGameRepository [versions=null, baseDirectory=.minecraft], version=Version [id=1.21.1-Fabric]] gets fired [21:03:05] [org.jackhuang.hmcl.event.EventBus.fireEvent/INFO] LoadedOneVersionEvent [source=HMCLGameRepository [versions=null, baseDirectory=.minecraft], version=Version [id=1.21.1-Fabric_neo]] gets fired [21:03:05] [org.jackhuang.hmcl.event.EventBus.fireEvent/INFO] LoadedOneVersionEvent [source=HMCLGameRepository [versions=null, baseDirectory=.minecraft], version=Version [id=1.20.4]] gets fired [21:03:05] [org.jackhuang.hmcl.event.EventBus.fireEvent/INFO] LoadedOneVersionEvent [source=HMCLGameRepository [versions=[1.20.1, 1.20.4, 1.20.4 optifine, 1.21, 1.21.1 Neoforge, 1.21.1-Fabric, 1.21.1-Fabric_neo], baseDirectory=.minecraft], version=Version [id=1.20.1]] gets fired [21:03:05] [org.jackhuang.hmcl.event.EventBus.fireEvent/INFO] LoadedOneVersionEvent [source=HMCLGameRepository [versions=[1.20.1, 1.20.4, 1.20.4 optifine, 1.21, 1.21.1 Neoforge, 1.21.1-Fabric, 1.21.1-Fabric_neo], baseDirectory=.minecraft], version=Version [id=1.20.4 optifine]] gets fired [21:03:05] [org.jackhuang.hmcl.event.EventBus.fireEvent/INFO] LoadedOneVersionEvent [source=HMCLGameRepository [versions=[1.20.1, 1.20.4, 1.20.4 optifine, 1.21, 1.21.1 Neoforge, 1.21.1-Fabric, 1.21.1-Fabric_neo], baseDirectory=.minecraft], version=Version [id=1.21]] gets fired [21:03:05] [org.jackhuang.hmcl.event.EventBus.fireEvent/INFO] LoadedOneVersionEvent [source=HMCLGameRepository [versions=[1.20.1, 1.20.4, 1.20.4 optifine, 1.21, 1.21.1 Neoforge, 1.21.1-Fabric, 1.21.1-Fabric_neo], baseDirectory=.minecraft], version=Version [id=1.21.1-Fabric]] gets fired [21:03:05] [org.jackhuang.hmcl.event.EventBus.fireEvent/INFO] LoadedOneVersionEvent [source=HMCLGameRepository [versions=[1.20.1, 1.20.4, 1.20.4 optifine, 1.21, 1.21.1 Neoforge, 1.21.1-Fabric, 1.21.1-Fabric_neo], baseDirectory=.minecraft], version=Version [id=1.21.1-Fabric_neo]] gets fired [21:03:05] [org.jackhuang.hmcl.event.EventBus.fireEvent/INFO] LoadedOneVersionEvent [source=HMCLGameRepository [versions=[1.20.1, 1.20.4, 1.20.4 optifine, 1.21, 1.21.1 Neoforge, 1.21.1-Fabric, 1.21.1-Fabric_neo], baseDirectory=.minecraft], version=Version [id=1.20.4]] gets fired [21:03:05] [org.jackhuang.hmcl.event.EventBus.fireEvent/INFO] RefreshedVersionsEvent [source=HMCLGameRepository [versions=[1.20.1, 1.20.4, 1.20.4 optifine, 1.21, 1.21.1 Neoforge, 1.21.1-Fabric, 1.21.1-Fabric_neo], baseDirectory=.minecraft]] gets fired [21:03:05] [org.jackhuang.hmcl.event.EventBus.fireEvent/INFO] RefreshedVersionsEvent [source=HMCLGameRepository [versions=[1.20.1, 1.20.4, 1.20.4 optifine, 1.21, 1.21.1 Neoforge, 1.21.1-Fabric, 1.21.1-Fabric_neo], baseDirectory=.minecraft]] gets fired [21:03:05] [org.jackhuang.hmcl.task.AsyncTaskExecutor.lambda$executeNormalTask$29/TRACE] Task finished: org.jackhuang.hmcl.game.GameRepository.refreshVersionsAsync(GameRepository.java:90) [21:03:05] [org.jackhuang.hmcl.task.AsyncTaskExecutor.lambda$executeNormalTask$29/TRACE] Task finished: org.jackhuang.hmcl.game.GameRepository.refreshVersionsAsync(GameRepository.java:90) [21:03:06] [org.jackhuang.hmcl.auth.microsoft.MicrosoftService.lambda$new$0/INFO] Fetching properties of 0b036845-c18d-4349-be89-7f8705b5f65b [21:03:06] [org.jackhuang.hmcl.java.JavaManager.searchPotentialJavaExecutables/TRACE] Finished Java lookup, found 3
- JDK 22.0.1 (ARM64, Oracle Corporation): /Library/Java/JavaVirtualMachines/jdk-22.jdk/Contents/Home/bin/java
- JDK 22.0.1 (ARM64, Oracle Corporation): /usr/bin/java
- JDK 23.0.1 (ARM64, Homebrew): /opt/homebrew/Cellar/openjdk/23.0.1/libexec/openjdk.jdk/Contents/Home/bin/java
[21:03:06] [org.jackhuang.hmcl.auth.authlibinjector.AuthlibInjectorServer.refreshMetadata/INFO] authlib-injector server metadata refreshed: https://littleskin.cn/api/yggdrasil/
[21:03:06] [org.jackhuang.hmcl.upgrade.IntegrityChecker.isSelfVerified/INFO] Successfully verified current JAR
[21:03:06] [org.jackhuang.hmcl.setting.ConfigHolder.writeToConfig/INFO] Saving config
[21:03:06] [org.jackhuang.hmcl.util.Pack200Utils.
/WARNING] Pack200 not found [21:03:06] [org.jackhuang.hmcl.upgrade.UpdateChecker.lambda$requestCheckUpdate$2/INFO] Latest version (DEVELOPMENT) is [3.5.9.259 from http://mirrors.cloud.tencent.com/nexus/repository/maven-public/org/glavo/hmcl/hmcl-dev/3.5.9.259/hmcl-dev-3.5.9.259.jar] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ButtonAccessibility initWithEnv:accessible:]: unrecognized selector sent to instance 0x6000024fb540' *** First throw call stack: ( 0 CoreFoundation 0x0000000186a9f2ec __exceptionPreprocess + 176 1 libobjc.A.dylib 0x0000000186586788 objc_exception_throw + 60 2 CoreFoundation 0x0000000186b5156c -[NSObject(NSObject) __retain_OA] + 0 3 CoreFoundation 0x0000000186a08f3c forwarding + 1580 4 CoreFoundation 0x0000000186a08850 _CF_forwarding_prep_0 + 96 5 ??? 0x000000013753cd94 0x0 + 5223206292 6 ??? 0x00000001375391b0 0x0 + 5223190960 7 ??? 0x00000001375391b0 0x0 + 5223190960 8 ??? 0x00000001375391b0 0x0 + 5223190960 9 ??? 0x0000000137534154 0x0 + 5223170388 10 libjvm.dylib 0x0000000101d314a8 _ZN9JavaCalls11call_helperEP9JavaValueRK12methodHandleP17JavaCallArgumentsP10JavaThread + 984 11 libjvm.dylib 0x0000000101da265c _ZL20jni_invoke_nonstaticP7JNIEnv_P9JavaValueP8_jobject11JNICallTypeP10_jmethodIDP18JNI_ArgumentPusherP10JavaThread + 992 12 libjvm.dylib 0x0000000101da455c jni_CallLongMethod + 264 13 libglass.dylib 0x000000014c4d4fac jArrayToNSArray + 716 14 AppKit 0x000000018a30712c NSAccessibilityGetObjectForAttributeUsingLegacyAPI + 280 15 AppKit 0x000000018a90e098 ___NSAccessibilityEntryPointValueForAttribute_block_invoke.759 + 1992 16 AppKit 0x000000018a90999c NSAccessibilityPerformEntryPointObject + 44 17 AppKit 0x000000018a4d9cf4 _NSAccessibilityEntryPointValueForAttribute + 224 18 ??? 0x000000013753cd94 0x0 + 5223206292 19 ??? 0x00000001375391b0 0x0 + 5223190960 20 ??? 0x0000000137534154 0x0 + 5223170388 21 libjvm.dylib 0x0000000101d314a8 _ZN9JavaCalls11call_helperEP9JavaValueRK12methodHandleP17JavaCallArgumentsP10JavaThread + 984 22 libjvm.dylib 0x0000000101da265c _ZL20jni_invoke_nonstaticP7JNIEnv_P9JavaValueP8_jobject11JNICallTypeP10_jmethodIDP18JNI_ArgumentPusherP10JavaThread + 992 23 libjvm.dylib 0x0000000101da455c jni_CallLongMethod + 264 24 libglass.dylib 0x000000014c4d4fac jArrayToNSArray + 716 25 AppKit 0x000000018a30712c NSAccessibilityGetObjectForAttributeUsingLegacyAPI + 280 26 AppKit 0x000000018a90e098 ___NSAccessibilityEntryPointValueForAttribute_block_invoke.759 + 1992 27 AppKit 0x000000018a90999c NSAccessibilityPerformEntryPointObject + 44 28 AppKit 0x000000018a4d9cf4 _NSAccessibilityEntryPointValueForAttribute + 224 29 ??? 0x000000013753cd94 0x0 + 5223206292 30 ??? 0x00000001375391b0 0x0 + 5223190960 31 ??? 0x0000000137534154 0x0 + 5223170388 32 libjvm.dylib 0x0000000101d314a8 _ZN9JavaCalls11call_helperEP9JavaValueRK12methodHandleP17JavaCallArgumentsP10JavaThread + 984 33 libjvm.dylib 0x0000000101da265c _ZL20jni_invoke_nonstaticP7JNIEnv_P9JavaValueP8_jobject11JNICallTypeP10_jmethodIDP18JNI_ArgumentPusherP10JavaThread + 992 34 libjvm.dylib 0x0000000101da455c jni_CallLongMethod + 264 35 libglass.dylib 0x000000014c4d4fac jArrayToNSArray + 716 36 AppKit 0x000000018a30712c NSAccessibilityGetObjectForAttributeUsingLegacyAPI + 280 37 AppKit 0x000000018a90e098 ___NSAccessibilityEntryPointValueForAttribute_block_invoke.759 + 1992 38 AppKit 0x000000018a90999c NSAccessibilityPerformEntryPointObject + 44 39 AppKit 0x000000018a4d9cf4 _NSAccessibilityEntryPointValueForAttribute + 224 40 ??? 0x000000013753cd94 0x0 + 5223206292 41 ??? 0x00000001375391b0 0x0 + 5223190960 42 ??? 0x0000000137534154 0x0 + 5223170388 43 libjvm.dylib 0x0000000101d314a8 _ZN9JavaCalls11call_helperEP9JavaValueRK12methodHandleP17JavaCallArgumentsP10JavaThread + 984 44 libjvm.dylib 0x0000000101da265c _ZL20jni_invoke_nonstaticP7JNIEnv_P9JavaValueP8_jobject11JNICallTypeP10_jmethodIDP18JNI_ArgumentPusherP10JavaThread + 992 45 libjvm.dylib 0x0000000101da455c jni_CallLongMethod + 264 46 libglass.dylib 0x000000014c4d6d00 jStringToNSString + 1292 47 libglass.dylib 0x000000014c4cad70 Java_com_sun_glass_ui_mac_MacApplication__1getMacKey + 24548 48 AppKit 0x000000018ad58cc0 -[NSWindow(NSWindowAccessibility) accessibilityHitTest:] + 324 49 AppKit 0x000000018a6d8300 -[NSApplication(NSApplicationAccessibility) accessibilityHitTest:] + 256 50 AppKit 0x000000018a69b320 CopyElementAtPosition + 164 51 HIServices 0x000000018ce62a5c _AXXMIGCopyElementAtPosition + 384 52 HIServices 0x000000018ce87ef8 _XCopyElementAtPosition + 328 53 HIServices 0x000000018ce40340 mshMIGPerform + 208 54 CoreFoundation 0x0000000186a2aa6c CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 60 55 CoreFoundation 0x0000000186a2a98c __CFRunLoopDoSource1 + 524 56 CoreFoundation 0x0000000186a29350 __CFRunLoopRun + 2244 57 CoreFoundation 0x0000000186a28434 CFRunLoopRunSpecific + 608 58 HIToolbox 0x00000001911cc19c RunCurrentEventLoopInMode + 292 59 HIToolbox 0x00000001911cbfd8 ReceiveNextEventCommon + 648 60 HIToolbox 0x00000001911cbd30 _BlockUntilNextEventMatchingListInModeWithFilter + 76 61 AppKit 0x000000018a287d68 _DPSNextEvent + 660 62 AppKit 0x000000018aa7d808 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 700 63 libosxapp.dylib 0x000000010064f748 -[NSApplicationAWT nextEventMatchingMask:untilDate:inMode:dequeue:] + 136 64 AppKit 0x000000018a27b09c -[NSApplication run] + 476 65 libosxapp.dylib 0x000000010064f568 +[NSApplicationAWT runAWTLoopWithApp:] + 132 66 libawt_lwawt.dylib 0x0000000100d034e0 +[AWTStarter starter:headless:] + 376 67 libosxapp.dylib 0x0000000100650d88 +[ThreadUtilities invokeBlockCopy:] + 28 68 Foundation 0x0000000187b7a3f4 __NSThreadPerformPerform + 264 69 CoreFoundation 0x0000000186a2a4d8 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28 70 CoreFoundation 0x0000000186a2a46c __CFRunLoopDoSource0 + 176 71 CoreFoundation 0x0000000186a2a1dc __CFRunLoopDoSources0 + 244 72 CoreFoundation 0x0000000186a28dc8 __CFRunLoopRun + 828 73 CoreFoundation 0x0000000186a28434 CFRunLoopRunSpecific + 608 74 libjli.dylib 0x0000000100768eb4 CreateExecutionEnvironment + 404 75 libjli.dylib 0x0000000100764ac4 JLI_Launch + 1152 76 java 0x00000001002d7bbc main + 396 77 dyld 0x00000001865c20e0 start + 2360 ) libc++abi: terminating due to uncaught exception of type NSException [1] 71933 abort java -jar HMCL-3.5.9.259.jar
似乎是 JDK-8311806 导致的,我已经请求 OpenJFX 团队将对其修复 backport 到 jfx17u 上 ( https://github.com/openjdk/jfx17u/pull/209 )。
https://github.com/HMCL-dev/HMCL/commit/65bdb29e713c28d3f32f68a7469dff283deb350d
我先在 macOS 把 JavaFX 版本降级至 19.0.2.1 了。