malware-dev/MDK-Debug

Force Closes SE At Random

Opened this issue · 5 comments

Actual Behavior:

After a while of being open in a save, SE will freeze and then force close without any error message or any indication in the log to what happened. Only happens when this plugin is loaded into SE.

Expected Behavior:

Stay open until an actual exception is thrown or I close Space Engineers through the OS or by the SE UI.

It gets quite annoying because I tried taking several precautions to avoid crashes like this, such as unbinding the DLL before rebuilding the script. But sometimes, it freezes and force closes in the middle of actually testing the script.

Steps to Reproduce:

  1. Load the plugin into Space Engineers via launch argument as specified in the readme.
  2. Load a save
  3. (optional) Bind a DLL
  4. (optional) Attach a debugger
  5. <Required> This happens at any moment, but the game will freeze for about 1-3 seconds then force close without any indication of what just happened, not even in the log. Be patient, this happens from anywhere between 2-30 minutes before it happens.

NOTE: This random force closing only happens when this plugin is loaded into SE and doesn't necessarily need to have a DLL binded at all.

You will have to actually provide a test world for me. The plugin isn't doing anything during general runtime. Besides, any .NET exception (and this plugin is pure .NET) would cause a log entry. Hence my current working theory is that this isn't caused by the plugin, because the behavior you're describing sounds atypical. This doesn't mean I'm rejecting it out of hand, but I will need an actual reproduction.

@malware-dev is there an easy way to get an exit code from SE when it closes?

I'm not sure what you're asking. What kind of exit code? What do you expect to get out of it?

Well, you could try running it with a batch file and echoing the %ERRORLEVEL%.

Problem is, the game is run through Steam. So I'm not sure this will work as expected. But try it, it just might.

Also - do you have Visual Studio attached at the time it crashes? Because that might give you some information as well.