A quick test suggests that max call depth in GM:S is measured in thousands of calls, so I don’t think this is an “optimization problem” of any sort.

If the game hangs before it crashes, you can try running it in debug mode and pausing it when it hangs to see where exactly it is getting stuck.