feat(crash): UnsatisfiedLinkError.
This commit is contained in:
@@ -362,6 +362,7 @@ game.crash.reason.resolution_too_high=Game cannot run because you are using a re
|
||||
game.crash.reason.stacktrace=Unknown. You can look into details by clicking "Logs" button.\nThere are some keywords that may represent Mod ID. You can search them online to figure out the reason.\n%s
|
||||
game.crash.reason.too_old_java=Game cannot run because the Java virtual machine version is too low.\nYou need to switch to a newer version (%1$s) of Java virtual machine in the game settings and restart the game. If not, you can download it online.
|
||||
game.crash.reason.unknown=Unknown. You can look into details by clicking "Logs" button.
|
||||
game.crash.reason.unsatisfied_link_error=Game cannot run because the required native libraries are missing.\nThe missing native library: %1$s。\nIf you have modified the native library path option in game settings, you'd better switch back to standard mode.\nIf it's already standard mode, please check if the missing native library belongs to a mod or the game. If you are sure that it's caused by HMCL, you can give feedback to us.\nIf you do really need to customize native library path, you should place all the native libraries the the game requires in the directory.
|
||||
game.crash.title=Game crashed
|
||||
game.directory=Game Directory
|
||||
game.version=Game version
|
||||
|
||||
@@ -362,6 +362,7 @@ game.crash.reason.resolution_too_high=當前遊戲因為材質包解析度過高
|
||||
game.crash.reason.stacktrace=原因未知,請點擊日誌按鈕查看詳細訊息。\n下面是一些關鍵字,其中可能包含 Mod 名稱,你可以透過搜索的方式查找有關訊息。\n%s
|
||||
game.crash.reason.too_old_java=當前遊戲因為 Java 虛擬機版本過低,無法繼續運行。\n你需要在遊戲設置中更換 %1$s 或更新版本的 Java 虛擬機,並重新啟動遊戲。如果沒有下載安裝,你可以在網路上自行下載。
|
||||
game.crash.reason.unknown=原因未知,請點擊日誌按鈕查看詳細訊息。
|
||||
game.crash.reason.unsatisfied_link_error=當前遊戲因為缺少本地庫,無法繼續運行。\n這些本地庫缺失:%1$s。\n如果你在遊戲設置中修改了本地庫路徑選項,請你修改回預設模式。\n如果已經在預設模式下,請檢查本地庫缺失是否是 Mod 引起的,或由 HMCL 引起的。如果你確定是 HMCL 引起的,建議你向我們回饋。\n如果你確實需要自訂本地庫路徑,你需要保證其中包含缺失的本地庫。
|
||||
game.crash.title=遊戲意外退出
|
||||
game.directory=遊戲路徑
|
||||
game.version=遊戲版本
|
||||
|
||||
@@ -362,6 +362,7 @@ game.crash.reason.resolution_too_high=当前游戏因为材质包分辨率过高
|
||||
game.crash.reason.stacktrace=原因未知,请点击日志按钮查看详细信息。\n下面是一些关键词,其中可能包含 Mod 名称,你可以通过搜索的方式查找有关信息。\n%s
|
||||
game.crash.reason.too_old_java=当前游戏因为 Java 虚拟机版本过低,无法继续运行。\n你需要在游戏设置中更换 Java %1$s 或更新版本的 Java 虚拟机,并重新启动游戏。如果没有下载安装,你可以在 https://adoptopenjdk.net 上自行下载。
|
||||
game.crash.reason.unknown=原因未知,请点击日志按钮查看详细信息。
|
||||
game.crash.reason.unsatisfied_link_error=当前游戏因为缺少本地库,无法继续运行。\n这些本地库缺失:%1$s。\n如果你在游戏设置中修改了本地库路径选项,请你修改回预设模式。\n如果已经在预设模式下,请检查本地库缺失是否是 Mod 引起的,或由 HMCL 引起的。如果你确定是 HMCL 引起的,建议你向我们反馈。\n如果你确实需要自定义本地库路径,你需要保证其中包含缺失的本地库。
|
||||
game.crash.title=游戏意外退出
|
||||
game.directory=游戏路径
|
||||
game.version=游戏版本
|
||||
|
||||
@@ -81,7 +81,9 @@ public final class CrashReportAnalyzer {
|
||||
// Game crashed when ticking entity
|
||||
ENTITY(Pattern.compile("Entity Type: (?<type>.*)[\\w\\W\\n\\r]*?Entity's Exact location: (?<location>.*)"), "type", "location"),
|
||||
// Game crashed when tesselating block model
|
||||
BLOCK(Pattern.compile("Block: (?<type>.*)[\\w\\W\\n\\r]*?Block location: (?<location>.*)"), "type", "location");
|
||||
BLOCK(Pattern.compile("Block: (?<type>.*)[\\w\\W\\n\\r]*?Block location: (?<location>.*)"), "type", "location"),
|
||||
// Cannot find native libraries
|
||||
UNSATISFIED_LINK_ERROR(Pattern.compile("java.lang.UnsatisfiedLinkError: Failed to locate library: (?<name>.*)"), "name");
|
||||
|
||||
private final Pattern pattern;
|
||||
private final String[] groupNames;
|
||||
|
||||
@@ -208,6 +208,14 @@ public class CrashReportAnalyzerTest {
|
||||
Assert.assertEquals("prefab", result.getMatcher().group("id"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void unsatisfiedLinkError() throws IOException {
|
||||
CrashReportAnalyzer.Result result = findResultByRule(
|
||||
CrashReportAnalyzer.anaylze(loadLog("/logs/unsatisfied_link_error.txt")),
|
||||
CrashReportAnalyzer.Rule.UNSATISFIED_LINK_ERROR);
|
||||
Assert.assertEquals("lwjgl.dll", result.getMatcher().group("name"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void outOfMemoryMC() throws IOException {
|
||||
CrashReportAnalyzer.Result result = findResultByRule(
|
||||
|
||||
35
HMCLCore/src/test/resources/logs/unsatisfied_link_error.txt
Normal file
35
HMCLCore/src/test/resources/logs/unsatisfied_link_error.txt
Normal file
@@ -0,0 +1,35 @@
|
||||
2021-10-09 00:17:06,325 main WARN Advanced terminal features are not available in this environment
|
||||
[00:17:06] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, 95_bx, --version, 1.16.4, --gameDir, C:\Users\69510\Desktop\.minecraft, --assetsDir, C:\Users\69510\Desktop\.minecraft\assets, --assetIndex, 1.16, --uuid, 960e00a7ed553d53b6d1e9cfac5fe6e2, --accessToken, ????????, --userType, mojang, --versionType, HMCL 3.4.202, --width, 854, --height, 480, --tweakClass, optifine.OptiFineTweaker, --launchTarget, fmlclient, --fml.forgeVersion, 35.1.37, --fml.mcVersion, 1.16.4, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20201102.104115]
|
||||
[00:17:06] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 8.0.9+86+master.3cf110c starting: java version 1.8.0_151 by Oracle Corporation
|
||||
[00:17:06] [main/WARN] [cp.mo.mo.SecureJarHandler/]: LEGACY JDK DETECTED, SECURED JAR HANDLING DISABLED
|
||||
[00:17:06] [main/INFO] [op.OptiFineTransformationService/]: OptiFineTransformationService.onLoad
|
||||
[00:17:06] [main/INFO] [op.OptiFineTransformationService/]: OptiFine ZIP file: C:\Users\69510\Desktop\.minecraft\libraries\optifine\OptiFine\1.16.4_HD_U_G7\OptiFine-1.16.4_HD_U_G7.jar
|
||||
[00:17:06] [main/INFO] [op.OptiFineTransformer/]: Target.PRE_CLASS is available
|
||||
[00:17:07] [main/INFO] [ne.mi.fm.lo.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust
|
||||
[00:17:07] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.2 Source=file:/C:/Users/69510/Desktop/.minecraft/libraries/org/spongepowered/mixin/0.8.2/mixin-0.8.2.jar Service=ModLauncher Env=CLIENT
|
||||
[00:17:07] [main/INFO] [op.OptiFineTransformationService/]: OptiFineTransformationService.initialize
|
||||
[00:17:07] [main/INFO] [STDERR/]: [org.lwjgl.system.Library:printError:424]: [LWJGL] Failed to load a library. Possible solutions:
|
||||
a) Add the directory that contains the shared library to -Djava.library.path or -Dorg.lwjgl.librarypath.
|
||||
b) Add the JAR that contains the shared library to the classpath.
|
||||
[00:17:07] [main/INFO] [STDERR/]: [org.lwjgl.system.Library:printError:426]: [LWJGL] Enable debug mode with -Dorg.lwjgl.util.Debug=true for better diagnostics.
|
||||
[00:17:07] [main/INFO] [STDERR/]: [org.lwjgl.system.Library:printError:428]: [LWJGL] Enable the SharedLibraryLoader debug mode with -Dorg.lwjgl.util.DebugLoader=true for better diagnostics.
|
||||
[00:17:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: java.lang.UnsatisfiedLinkError: Failed to locate library: lwjgl.dll
|
||||
[00:17:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at org.lwjgl.system.Library.loadSystem(Library.java:147)
|
||||
[00:17:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at org.lwjgl.system.Library.loadSystem(Library.java:67)
|
||||
[00:17:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at org.lwjgl.system.Library.<clinit>(Library.java:50)
|
||||
[00:17:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at org.lwjgl.system.MemoryUtil.<clinit>(MemoryUtil.java:97)
|
||||
[00:17:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at org.lwjgl.system.Pointer$Default.<clinit>(Pointer.java:67)
|
||||
[00:17:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at org.lwjgl.system.Callback.<clinit>(Callback.java:40)
|
||||
[00:17:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at net.minecraftforge.fml.loading.progress.ClientVisualization.initWindow(ClientVisualization.java:66)
|
||||
[00:17:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at net.minecraftforge.fml.loading.progress.ClientVisualization.start(ClientVisualization.java:317)
|
||||
[00:17:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at net.minecraftforge.fml.loading.progress.EarlyProgressVisualization.accept(EarlyProgressVisualization.java:43)
|
||||
[00:17:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at net.minecraftforge.fml.loading.FMLLoader.setupLaunchHandler(FMLLoader.java:190)
|
||||
[00:17:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at net.minecraftforge.fml.loading.FMLServiceProvider.initialize(FMLServiceProvider.java:94)
|
||||
[00:17:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at cpw.mods.modlauncher.TransformationServiceDecorator.onInitialize(TransformationServiceDecorator.java:68)
|
||||
[00:17:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at cpw.mods.modlauncher.TransformationServicesHandler.lambda$initialiseTransformationServices$7(TransformationServicesHandler.java:107)
|
||||
[00:17:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at java.util.HashMap$Values.forEach(Unknown Source)
|
||||
[00:17:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at cpw.mods.modlauncher.TransformationServicesHandler.initialiseTransformationServices(TransformationServicesHandler.java:107)
|
||||
[00:17:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at cpw.mods.modlauncher.TransformationServicesHandler.initializeTransformationServices(TransformationServicesHandler.java:59)
|
||||
[00:17:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at cpw.mods.modlauncher.Launcher.run(Launcher.java:76)
|
||||
[00:17:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at cpw.mods.modlauncher.Launcher.main(Launcher.java:66)
|
||||
Exception in thread "main"
|
||||
Reference in New Issue
Block a user