From my experience, as this happens often to me - it seems to happen when there are for-loops with temp variables in code, and you update it several times (but it crashes randomly - sometimes after half minute, sometimes after 10 minutes). As I'm unable to find one easy way to reproduce it, I didn't reported it yet, as I know what to report in fact... this error message doesn't help.
Viewing post in [Fixed in GMS2.3.1+] Runner randomly exits with non-zero status
Hmm, that could very well be it.
I started a fresh new project and have GMLive set up and everything. The only thing I have there is a function that sets the current draw color, font, etc
Something along the line of
function draw_set(_alpha, _font, _color) {
draw_set_alpha(_alpha);
draw_set_font(_font);
draw_set_color(_color);
}
Then I simply executed that function 3 times in my Step/Draw event
draw_set(1, fn_SegoeUI_14, c_white);
draw_set(1, fn_SegoeUI_14, c_white);
draw_set(1, fn_SegoeUI_14, c_white);
This causes a crash after a while.
Removing these 3 lines allowed the game to run indefinitely. Since the function arguments are treated like local vars, that could be it.
I was gonna suggest memory issues too. I wonder if increasing the RAM would fix this (or at least extend the running time before the crash). My PC is on a limited motherboard platform, so upgrading means I have to throw 2 sticks away - heck I'd be fine with doing this if that fixes the problem.
It's even more apparent when doing things like drawing inventory items in the form of grids, since you have to constantly nest for loops together.
Here it is: https://gmclan.org/up23_18_gms_23_GMLIVE_crash.html (with GMLIVE cut, need to be re-added).
To crash, I just need to run it and wait about 60-120 seconds (you can watch memory usage in Task Manager, for me it crashes around 1.5 GB used).
This is how memory usage looks on my side, the moment of crash is easily visible: https://i.imgur.com/PP5RVF6.png
Edit: here is a chart from GM debugger for above example: