Merge 4d54b3f88a
into c8c448894a
This commit is contained in:
commit
648a998fff
1 changed files with 43 additions and 1 deletions
|
@ -37,6 +37,9 @@ pub async fn find(log: &str, data: &Data) -> Result<Vec<(String, String)>> {
|
||||||
linux_openal,
|
linux_openal,
|
||||||
flatpak_crash,
|
flatpak_crash,
|
||||||
spark_macos,
|
spark_macos,
|
||||||
|
xrandr,
|
||||||
|
folder_name,
|
||||||
|
corrupted_instance,
|
||||||
];
|
];
|
||||||
|
|
||||||
let mut res: Vec<(String, String)> = issues.iter().filter_map(|issue| issue(log)).collect();
|
let mut res: Vec<(String, String)> = issues.iter().filter_map(|issue| issue(log)).collect();
|
||||||
|
@ -328,7 +331,7 @@ fn locked_jar(log: &str) -> Issue {
|
||||||
.to_string(),
|
.to_string(),
|
||||||
);
|
);
|
||||||
|
|
||||||
let found = log.contains("Couldn't extract native jar");
|
let found = log.contains("Couldn't extract native jar") && !log.contains("(missing)\n");
|
||||||
found.then_some(issue)
|
found.then_some(issue)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -470,3 +473,42 @@ fn spark_macos(log: &str) -> Issue {
|
||||||
let found = log.contains("~StubRoutines::SafeFetch32");
|
let found = log.contains("~StubRoutines::SafeFetch32");
|
||||||
found.then_some(issue)
|
found.then_some(issue)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn xrandr(log: &str) -> Issue {
|
||||||
|
let issue = (
|
||||||
|
"Missing xrandr".to_string(),
|
||||||
|
"This crash is caused by not having xrandr installed on Linux on Minecraft versions that use LWJGL 2."
|
||||||
|
.to_string(),
|
||||||
|
);
|
||||||
|
|
||||||
|
let found = log.contains("at org.lwjgl.opengl.LinuxDisplay.getAvailableDisplayModes");
|
||||||
|
found.then_some(issue)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn folder_name(log: &str) -> Issue {
|
||||||
|
let issue = (
|
||||||
|
"`!` in folder name".to_string(),
|
||||||
|
"Having a `!` in any folder is known to cause issues. If it's in your instance name, make sure to rename the actual instance folder, **not** the instance name in Prism."
|
||||||
|
.to_string(),
|
||||||
|
);
|
||||||
|
|
||||||
|
let found = Regex::new(r"Minecraft folder is:\n.*!/")
|
||||||
|
.unwrap()
|
||||||
|
.is_match(log);
|
||||||
|
|
||||||
|
found.then_some(issue)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn corrupted_instance(log: &str) -> Issue {
|
||||||
|
let issue = (
|
||||||
|
"Corrupted instance files".to_string(),
|
||||||
|
"Your instance's `mmc-pack.json` appears to be corrupted. Make a new instance and copy over your data between `.minecraft` folders. To prevent this in the future, ensure your system has sufficient disk space and avoid forcefully shutting down your PC."
|
||||||
|
.to_string(),
|
||||||
|
);
|
||||||
|
|
||||||
|
let found = Regex::new(r"mmc-pack.json.*illegal value")
|
||||||
|
.unwrap()
|
||||||
|
.is_match(log);
|
||||||
|
|
||||||
|
found.then_some(issue)
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue