updata crash report analysis (#2785)
* updata OUT_OF_MEMORY * Update CrashReportAnalyzer.java --------- Co-authored-by: Glavo <zjx001202@gmail.com>
This commit is contained in:
@@ -47,7 +47,7 @@ public final class CrashReportAnalyzer {
|
||||
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))")),
|
||||
// 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(Pattern.compile("There is insufficient memory for the Java Runtime Environment to continue")),
|
||||
// Too high resolution
|
||||
|
||||
@@ -324,6 +324,13 @@ public class CrashReportAnalyzerTest {
|
||||
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
|
||||
public void memoryExceeded() throws IOException {
|
||||
CrashReportAnalyzer.Result result = findResultByRule(
|
||||
|
||||
3
HMCLCore/src/test/resources/logs/out_of_memory2.txt
Normal file
3
HMCLCore/src/test/resources/logs/out_of_memory2.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
Error occurred during initialization of VM
|
||||
Too small maximum heap
|
||||
[HMCL ProcessListener] Minecraft exit with code 1(0x1).
|
||||
Reference in New Issue
Block a user