updata crash report analysis (#2785)

* updata OUT_OF_MEMORY

* Update CrashReportAnalyzer.java

---------

Co-authored-by: Glavo <zjx001202@gmail.com>
This commit is contained in:
zkitefly
2024-02-12 23:31:29 +08:00
committed by GitHub
parent 59cc5b9114
commit 8db8693132
3 changed files with 11 additions and 1 deletions

View File

@@ -47,7 +47,7 @@ public final class CrashReportAnalyzer {
OPENGL_NOT_SUPPORTED(Pattern.compile("The driver does not appear to support OpenGL")), OPENGL_NOT_SUPPORTED(Pattern.compile("The driver does not appear to support OpenGL")),
GRAPHICS_DRIVER(Pattern.compile("(Pixel format not accelerated|GLX: Failed to create context: GLXBadFBConfig|Couldn't set pixel format|net\\.minecraftforge\\.fml.client\\.SplashProgress|org\\.lwjgl\\.LWJGLException|EXCEPTION_ACCESS_VIOLATION(.|\\n|\\r)+# C {2}\\[(ig|atio|nvoglv))")), GRAPHICS_DRIVER(Pattern.compile("(Pixel format not accelerated|GLX: Failed to create context: GLXBadFBConfig|Couldn't set pixel format|net\\.minecraftforge\\.fml.client\\.SplashProgress|org\\.lwjgl\\.LWJGLException|EXCEPTION_ACCESS_VIOLATION(.|\\n|\\r)+# C {2}\\[(ig|atio|nvoglv))")),
// Out of memory // Out of memory
OUT_OF_MEMORY(Pattern.compile("(java\\.lang\\.OutOfMemoryError|The system is out of physical RAM or swap space|Out of Memory Error)")), OUT_OF_MEMORY(Pattern.compile("(java\\.lang\\.OutOfMemoryError|The system is out of physical RAM or swap space|Out of Memory Error|Error occurred during initialization of VM\\RToo small maximum heap)")),
// Memory exceeded // Memory exceeded
MEMORY_EXCEEDED(Pattern.compile("There is insufficient memory for the Java Runtime Environment to continue")), MEMORY_EXCEEDED(Pattern.compile("There is insufficient memory for the Java Runtime Environment to continue")),
// Too high resolution // Too high resolution

View File

@@ -324,6 +324,13 @@ public class CrashReportAnalyzerTest {
CrashReportAnalyzer.Rule.OUT_OF_MEMORY); CrashReportAnalyzer.Rule.OUT_OF_MEMORY);
} }
@Test
public void outOfMemoryJVM1() throws IOException {
CrashReportAnalyzer.Result result = findResultByRule(
CrashReportAnalyzer.anaylze(loadLog("/logs/out_of_memory2.txt")),
CrashReportAnalyzer.Rule.OUT_OF_MEMORY);
}
@Test @Test
public void memoryExceeded() throws IOException { public void memoryExceeded() throws IOException {
CrashReportAnalyzer.Result result = findResultByRule( CrashReportAnalyzer.Result result = findResultByRule(

View File

@@ -0,0 +1,3 @@
Error occurred during initialization of VM
Too small maximum heap
[HMCL ProcessListener] Minecraft exit with code 1(0x1).