diff --git a/Project.xml b/Project.xml
index 6fe117a386..5782ae0ca0 100644
--- a/Project.xml
+++ b/Project.xml
@@ -101,6 +101,8 @@
+
+
diff --git a/crash-dialog/Main.exe b/crash-dialog/Main.exe
new file mode 100644
index 0000000000..8ef1f093f1
Binary files /dev/null and b/crash-dialog/Main.exe differ
diff --git a/crash-dialog/icon.ico b/crash-dialog/icon.ico
new file mode 100644
index 0000000000..143fe4d1fb
Binary files /dev/null and b/crash-dialog/icon.ico differ
diff --git a/crash-dialog/lime.ndll b/crash-dialog/lime.ndll
new file mode 100644
index 0000000000..1bfc4b1b3b
Binary files /dev/null and b/crash-dialog/lime.ndll differ
diff --git a/crash-dialog/manifest/default.json b/crash-dialog/manifest/default.json
new file mode 100644
index 0000000000..b035758f54
--- /dev/null
+++ b/crash-dialog/manifest/default.json
@@ -0,0 +1 @@
+{"name":null,"assets":"aoy4:pathy19:assets%2Fbanner.pngy4:sizei1182105y4:typey5:IMAGEy2:idR1goR0y22:assets%2Fmain-view.xmlR2i1631R3y4:TEXTR5R6goR2i5794R3y5:SOUNDy9:classNamey31:__ASSET__flixel_sounds_beep_oggR5y26:flixel%2Fsounds%2Fbeep.ogggoR2i33629R3R8R9y33:__ASSET__flixel_sounds_flixel_oggR5y28:flixel%2Fsounds%2Fflixel.ogggoR2i15744R3y4:FONTR9y35:__ASSET__flixel_fonts_nokiafc22_ttfR5y30:flixel%2Ffonts%2Fnokiafc22.ttfgoR2i29724R3R14R9y36:__ASSET__flixel_fonts_monsterrat_ttfR5y31:flixel%2Ffonts%2Fmonsterrat.ttfgoR2i519R3R4R9y36:__ASSET__flixel_images_ui_button_pngR5y33:flixel%2Fimages%2Fui%2Fbutton.pnggoR2i3280R3R4R9y39:__ASSET__flixel_images_logo_default_pngR5y36:flixel%2Fimages%2Flogo%2Fdefault.pnggh","rootPath":"../","version":2,"libraryArgs":[],"libraryType":null}
\ No newline at end of file
diff --git a/source/Main.hx b/source/Main.hx
index c3d0ad8adb..fcd88c4da4 100644
--- a/source/Main.hx
+++ b/source/Main.hx
@@ -1,5 +1,6 @@
package;
+import sys.io.Process;
import haxe.Exception;
import sys.io.File;
import sys.FileSystem;
@@ -29,7 +30,25 @@ class Main extends Sprite
public static function main():Void
{
- Lib.current.addChild(new Main());
+ try {
+ Lib.current.addChild(new Main());
+ }
+ catch (e:Exception)
+ {
+ var fileStr:String = "";
+
+ fileStr += "CRASH REASON:" + e.message + "\n\n";
+
+ fileStr += e.stack.toString();
+
+ File.saveContent("./CRASHDUMP.txt", fileStr);
+ #if windows
+ var process = new Process('start .\\crash-dialog\\Main.exe ".\\CRASHDUMP.txt"');
+ #else
+ Application.current.window.alert("FNF# Crashed!\nCRASH REASON:" + e.message + "\nMORE INFO IN CRASHDUMP.TXT!", "FNF# Crashed!");
+ #end
+ Sys.exit(1);
+ }
}
public function new()
diff --git a/source/states/debug/ChartingState.hx b/source/states/debug/ChartingState.hx
index 4008f7b203..bdb5555ab7 100644
--- a/source/states/debug/ChartingState.hx
+++ b/source/states/debug/ChartingState.hx
@@ -271,7 +271,7 @@ class ChartingState extends MusicBeatState
chars = CoolUtil.coolTextFile(Paths.txt('characterList'));
for (mod in Modding.api.loaded)
{
- var shit:CharJSON = Json.parse(Modding.api.txt("/chars.json", mod.meta.modID));
+ var shit:CharJSON = Json.parse(Modding.api.json("chars", mod.meta.modID));
for (char in shit.chars)
{
chars.push(char.name);