Declaring an enum in a mod crashes the game?
Posted: Fri Aug 30, 2019 7:08 am
So this is really weird. I don't know if you can do anything about it, but putting the following code in my mod will crash the live game (crashes DaggerfallUnity.exe, but works in the Unity Editor):
This crashes when running DaggerfallUnity.exe and clicking "Play"
This does not crash when running DaggerfallUnity.exe and clicking "Play"
I added that enum and a bunch of other changes before re-packaging the mod. In order to track down that crash, I had to delete all of my code and paste it back in snippet-by-snippet. The output log wasn't very helpful because it just shows an error at the mod compiler.
Is there a good way to track down a crash that a mod causes? This is the second time I've had to do so and it can be pretty time-consuming without any solid debug info to go with.
Also, is there a decent way to track down what invalidates a mod at runtime? I had an issue with a typo when trying to load one of my mod's settings and there was nothing useful in the log.
This crashes when running DaggerfallUnity.exe and clicking "Play"
Code: Select all
public enum IronmanSetting
{
DISABLE_PAUSING,
DISABLE_EXITING,
MODIFY_SHOP_BURGLARY,
MODIFY_LOAN_SYSTEM
}
Code: Select all
public static class IronmanSetting
{
public const int DISABLE_PAUSING = 0;
public const int DISABLE_EXITING = 1;
public const int MODIFY_SHOP_BURGLARY = 2;
public const int MODIFY_LOAN_SYSTEM = 3;
}
Is there a good way to track down a crash that a mod causes? This is the second time I've had to do so and it can be pretty time-consuming without any solid debug info to go with.
Also, is there a decent way to track down what invalidates a mod at runtime? I had an issue with a typo when trying to load one of my mod's settings and there was nothing useful in the log.