What to do when SCP coders cannot reproduce your fs2 open crashes?
(copied from the original post created by Fury)
So you have encountered frequent problems with fs2_open that leads to crashes? You have already provided debug log for support people and coders, but it wasn't enough and no coder can reproduce these crashes to fix the problem? Don't worry, you can help the coders out by providing important information needed to track it down.
This however involves downloading and installing Visual Studio 2015 Community Edition, and the fs2_open repository. All of this has been instructed in detail below, so be sure to follow them to letter and ask for help when needed. It's not hard at all, but it does require some time and effort.
What you however can't do is track down non-crash related problems. Such problems will require more or less knowledge about the code and coding itself.
- Go to , click "Download Community Free" and install it. The newer Visual Studio include tools for Android development, you don't need this for this guide so deselect that to speed up the installation a bit.
- Download the source code and unpack it into a directory of your choice.
- Create a new user environment value where variable name is FS2PATH and variable value is full path to your Freespace 2 folder, by default C:\Games\FreeSpace2. This applies too all Windows OS', not just XP.
- Restart your computer. This step is REQUIRED for step 3 to take effect! Visual Studio also requires a restart so you could add this variable before doing that restart to save a bit of time.
- This step is only relevant if you have been instructed to apply a patch file, if you are unsure, skip this step.
- Go to fs2_open folder (or the clone of it if you followed step 5), open projects\MSVC_2015 folder. From there open file called Freespace2.sln. Select Visual Studio 2015 as the application to open it in if asked to choose an application.
- On left side you see a small window called solution explorer. Right click on "Freespace2" and select Properties.
- Again on left of the newly opened window you see "common properties" and "configuration properties", under "configuration properties" select "debugging".
- Change "Command" to: $(FS2PATH)\$(TargetFileName)
- Click OK.
- Look up to the toolbar row. Under "Help" you see a green triangle and to right a dropdown menu. Select "Debug SSE2" from the dropdown menu.
- Press F7 on your keyboard. A small "Output" window opens. Wait until it finishes, this probably takes a few minutes on most computers.
- When text in the "Output" window stops rolling, last three lines should be more or less as follows:
6> Freespace2.vcxproj -> C:\Games\FreeSpace2\fs2_open\projects\MSVC_2010\Debug SSE2\fs2_open_3_7_2_SSE2.exe 6> 1 file(s) copied. ========== Build: 6 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
In third to last line you will see the name of the exe file that has been copied to your Freespace2 folder. If a file of same name already existed, it has been overwritten.
In second to last line you will see whether copying has been succeeded or failed, this needs to say succeeded for us to continue. If this says failed, seek assistance on the forums or irc, alternatively browser based irc link.
Now we need to change a few settings in the launcher before debugging:
- From your Freespace2 folder, open launcher. We need to run FSO in windowed mode, so first lower your resolution from video tab. Then go to features tab, select dev tool from under list type. Select windowed mode. Also ensure other settings such as active mod are suitable for your bug hunting. Click OK.
- Go back to the Visual Studio window and make sure it is active. Press F5.
- In a moment you will see FSO window opening up. Note that running FSO in this mode is significantly slower than it would be normally, you just have to bear with it.
- Now play FSO normally until you encounter the crash bug.
Now we can actually do the important part of this guide:
- You have encountered the crash you were looking for. Now, there are two types or crashes. First is straight crash to desktop (CTD) which doesn't produce anything more than regular Windows error message about "this application has closed". Second is an error or assert message given by fs2_open and it gives you two options - OK and Cancel. Click OK.
- Now regardless of whether you got a CTD or fs2_open error/assert message, you should now have "fs2_open_3_7_2_DEBUG_SSE2.exe has triggered a breakpoint" message in your Visual Studio window. Click Break.
- You see a small window in lower right corner, it has three tabs - call stack, break point and output. Select call stack.
- After selecting call stack tab, make sure the small window is active. Press Ctrl + A to select all text, then copy and paste that text to Pastebin.
- Now you need to give a link to your pastebinned text to a coder, either in the forums or irc, alternatively browser based irc link.
- Follow instructions a coder may give you to further troubleshoot your crash if it is needed.