Fixed infinite-recursion

This commit is contained in:
huangyuhui 2016-03-04 12:59:37 +08:00
parent afde41135a
commit 1818b3575c
4 changed files with 10 additions and 4 deletions

View File

@ -31,9 +31,7 @@ import org.jackhuang.hellominecraft.launcher.core.service.IMinecraftProvider;
import org.jackhuang.hellominecraft.launcher.core.service.IMinecraftService;
import org.jackhuang.hellominecraft.util.system.FileUtils;
import org.jackhuang.hellominecraft.launcher.core.MCUtils;
import org.jackhuang.hellominecraft.util.tasks.DecompressTask;
import org.jackhuang.hellominecraft.util.tasks.TaskWindow;
import org.jackhuang.hellominecraft.util.tasks.download.FileDownloadTask;
import org.jackhuang.hellominecraft.util.system.IOUtils;
import org.jackhuang.hellominecraft.util.MessageBox;
import org.jackhuang.hellominecraft.util.StrUtils;

View File

@ -124,8 +124,10 @@ public class LaunchingUIDaemon {
};
private static void checkExit(LauncherVisibility v) {
if (v != LauncherVisibility.KEEP && !LogWindow.INSTANCE.isVisible())
if (v != LauncherVisibility.KEEP && !LogWindow.INSTANCE.isVisible()) {
HMCLog.log("Launcher will exit now.");
System.exit(0);
}
}
private static final Event<List<String>> LAUNCH_SCRIPT_FINISHER = (sender, str) -> {

View File

@ -48,7 +48,7 @@ public class CrashReporter implements Thread.UncaughtExceptionHandler {
put("MessageBox", "");
put("AWTError", "");
put("JFileChooser", "Has your operating system been installed completely or is a ghost system? ");
put("JceSecurityManager", "Has your operating system been installed completely or is a ghost system? ");
put("JceSecurity", "Has your operating system been installed completely or is a ghost system? ");
put("couldn't create component peer", "Fucking computer!");
put("sun.awt.shell.Win32ShellFolder2", "crash.user_fault");
put("UnsatisfiedLinkError", "crash.user_fault");

View File

@ -67,6 +67,12 @@ public class HMCLMinecraftService extends IMinecraftService {
}
private void checkModpack() {
int show = 0;
for (StackTraceElement e : Thread.currentThread().getStackTrace())
if ("checkModpack".equals(e.getMethodName()))
++show;
if (show > 2)
return;
if (version().getVersionCount() == 0) {
File modpack = new File("modpack.zip");
if (modpack.exists()) {