So, I have encountered an issue with Unity crashing, and I can’t figure out exactly why. Well, after some time I isolated it to a particular function call, but I don’t know why the function call is crashing. For background, I’m crashing in a call executed during the Awake() call on an otherwise empty object.
Here’s where it happens:
List<string> t_str = new List<string>()
{
"difficulty",
"bonusLevelFollows",
"rewardForCompletion",
"startMessage",
"gameGoalMessage",
};
throw new System.Exception( "LAWLER" );
Dictionary<string, ParseResult> res = parser.ExtractElements( t_str );
for parser.ExtractElements :
public Dictionary<string, ParseResult> ExtractAttributes( List<string> attributes )
{
throw new System.Exception( "=O" );
//...
As written, this fails with the exception “LAWLER” as expected. However, if I uncomment that exception, Unity hangs. It does not end with an exception “=O”, but just hangs. This appears to me to suggest that either I’ve reached some stack height limit that just makes Unity freak out, or there’s some other obscure bug in Unity. Worse, further down in the stack, I call this same function without issue, catch the exception, and continue just fine.
I’m at a loss, and unable to proceed.