Logs will probably be worthless for a desktop crash. Here's a guide that should help.
============================================
When a game exported for Windows crashes, it often leaves no information. In order to see the cause of a crash, it's helpful to run the game inside an IDE with debugging information. Here's how to do it in Visual Studio on Windows.
[In Stencyl]
- Go to Game > Settings > Advanced > Haxe Flags
- Add the following flag: -D HXCPP_DEBUG_LINK
Including the above flag will generate some extra files when you compile. Enabling or disabling the flag will cause a full recompile, so I usually keep the flag enabled.
- Compile for desktop with the HXCPP_DEBUG_LINK flag enabled.
[Visual Studio]
Visual Studio, or Visual C++, is installed by Stencyl when you build a windows game. If you've never used it before, you'll need to register for a free account. Find this program and open it, then proceed to the following steps.
- File > Open Project... > [stencyl workspace]/games-generated/[mygame]/Export/windows/cpp/bin/[mygame].exe
- Start (button with green arrow)
If the game encounters an error while running, instead of immediately closing, it will show a dialog box in Visual Studio.
Tell it to "break execution", and it should open a code file and select the line that it stopped running at.
Pertinent info to provide would be:
- the name of the code file it opened.
- copy the line it stopped on.
- if you see a function like HX_STACK_LINE(xx) near it, let us know what number is in it.
- The content of the "Call Stack" pane.
It would probably mention the type of error as well in the dialog that pops up, but I don't have a compiled broken game on-hand to test with and see exactly what info it provides.
>>>> If your app crashes immediately from Stencyl, but not in visual studio
https://technet.microsoft.com/en-gb/sysinternals/dd996900.aspxGrab that download, ProcDump
Save and extract it
Open a command window in the extracted folder
And run the following command
procdump -e 1 -ma -w "Stencyl Project Name"
-e 1 immediately crashes on first chance exceptions
-ma is a full dump instead of a minidump
-w waits for the process to be created
Then, when you test the game from within Stencyl and it crashes, it should automatically create a full dump of the program's memory (this can be a huge file)
It'll put the dump in the procdump folder
Then you open Visual C++
File > Open File > open the .dmp file it generated
And then press the "Debug with Native Only" button