One part of my script that can cause the crash:
{
_classes pushback _x;
} foreach configproperties [missionconfigfile >> "loadout_define" >> _equip_side >> _equip_faction >> _typeofunit, "isclass _x"];
Where _equip_side, _equip_faction, and _typeofunit are supposed to be strings. If one of these variables is nil when configproperties executes, the game will crash immediately.
Particularly annoying when typing this command into one of the debug console's monitoring fields.