diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/game/LauncherHelper.java b/HMCL/src/main/java/org/jackhuang/hmcl/game/LauncherHelper.java index e080641f9..e05e3fe80 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/game/LauncherHelper.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/game/LauncherHelper.java @@ -430,16 +430,21 @@ public final class LauncherHelper { } } + if (javaVersion.getPlatform() != Architecture.CURRENT.getPlatform()) { + Controllers.dialog(i18n("launch.advice.different_platform"), i18n("message.warning"), MessageType.ERROR, continueAction); + suggested = true; + } + // 32-bit JVM cannot make use of too much memory. if (javaVersion.getPlatform() == org.jackhuang.hmcl.util.platform.Platform.BIT_32 && setting.getMaxMemory() > 1.5 * 1024) { // 1.5 * 1024 is an inaccurate number. // Actual memory limit depends on operating system and memory. - Controllers.confirm(i18n("launch.advice.too_large_memory_for_32bit"), i18n("message.error"), continueAction, null); - return null; + Controllers.confirm(i18n("launch.advice.too_large_memory_for_32bit"), i18n("message.error"), continueAction, breakAction); + suggested = true; } - if (violatedSuggestedConstraint != null) { + if (!suggested && violatedSuggestedConstraint != null) { suggested = true; switch (violatedSuggestedConstraint) { case MODDED_JAVA_7: @@ -454,11 +459,6 @@ public final class LauncherHelper { } } - if (!suggested && javaVersion.getPlatform() != Architecture.CURRENT.getPlatform()) { - Controllers.dialog(i18n("launch.advice.different_platform"), i18n("message.warning"), MessageType.ERROR, continueAction); - suggested = true; - } - // Cannot allocate too much memory exceeding free space. if (!suggested && OperatingSystem.TOTAL_MEMORY > 0 && OperatingSystem.TOTAL_MEMORY < setting.getMaxMemory()) { Controllers.confirm(i18n("launch.advice.not_enough_space", OperatingSystem.TOTAL_MEMORY), i18n("message.error"), continueAction, null); diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/game/CrashReportAnalyzer.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/game/CrashReportAnalyzer.java index 745af8c3d..6640e110e 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/game/CrashReportAnalyzer.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/game/CrashReportAnalyzer.java @@ -37,7 +37,7 @@ public final class CrashReportAnalyzer { OPENJ9(Pattern.compile("(Open J9 is not supported|OpenJ9 is incompatible)")), TOO_OLD_JAVA(Pattern.compile("java\\.lang\\.UnsupportedClassVersionError: (.*?) version (?\\d+)\\.0"), "expected"), - JVM_32BIT(Pattern.compile("Could not reserve enough space for 1048576KB object heap")), + JVM_32BIT(Pattern.compile("Could not reserve enough space for (.*?) object heap")), // Some mods/shader packs do incorrect GL operations. GL_OPERATION_FAILURE(Pattern.compile("1282: Invalid operation")),