From 86488a0964891aa2a411807e316c2b5777eda95c Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Mon, 12 Feb 2024 18:09:36 -0500 Subject: [PATCH 1/2] Ensure the CrashHandler ALWAYS initializes first so we have stack traces. --- source/Main.hx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/source/Main.hx b/source/Main.hx index 754d0732f..a40fda29d 100644 --- a/source/Main.hx +++ b/source/Main.hx @@ -33,8 +33,10 @@ class Main extends Sprite public static function main():Void { - haxe.Log.trace = funkin.util.logging.AnsiTrace.trace; - funkin.util.logging.AnsiTrace.traceBF(); + // We need to make the crash handler LITERALLY FIRST so nothing EVER gets past it. + CrashHandler.initialize(); + CrashHandler.queryStatus(); + Lib.current.addChild(new Main()); } @@ -42,7 +44,12 @@ class Main extends Sprite { super(); - // TODO: Replace this with loadEnabledMods(). + // Initialize custom logging. + haxe.Log.trace = funkin.util.logging.AnsiTrace.trace; + funkin.util.logging.AnsiTrace.traceBF(); + + // Load mods to override assets. + // TODO: Replace with loadEnabledMods() once the user can configure the mod list. funkin.modding.PolymodHandler.loadAllMods(); if (stage != null) @@ -82,10 +89,6 @@ class Main extends Sprite * -Eric */ - CrashHandler.initialize(); - - CrashHandler.queryStatus(); - initHaxeUI(); fpsCounter = new FPS(10, 3, 0xFFFFFF); From 4346214dc8f099265a9ccbef53ee79b4e5254665 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Mon, 12 Feb 2024 18:18:50 -0500 Subject: [PATCH 2/2] Update Polymod to resolve a crash thrown when no mods are installed. --- hmm.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hmm.json b/hmm.json index 4a0895034..43cbbb08a 100644 --- a/hmm.json +++ b/hmm.json @@ -149,7 +149,7 @@ "name": "polymod", "type": "git", "dir": null, - "ref": "6cec79e4f322fbb262170594ed67ab72b4714810", + "ref": "0b53e478bc375ec51b760b650201ac7a965d2ef4", "url": "https://github.com/larsiusprime/polymod" }, {