I can't get that specific error to pop up no matter what so I can only assume that it is a combination of factors causing GM to end up in an unusual state after something goes wrong - cases like this will get rarer as GMS2 moves toward built-in exception support (recently announced), which will leave the extension to catch anything that the game code didn't.