I fixed the garbage collector crashes:
All you need to do is:
1. disable garbage collector
2. do gc_collect() manually all 6 steps, but before u call gc_collect() u need to log gc_get_stats() to see how much garbage exists
. !!!!!The goal is to make the garbage small as possible, bacause if there is more work for the garbage collector, then it also means there can be a crash!!!!
3. Startup the debugger and go into a "level" of your game, where a lot is going on.
4. Start the profiler and select bottom up as sorting
5. Look for @@NewGMLArray@@ or other garbage creating things (see
@Nocturne post in this thread:
https://forum.yoyogames.com/index.p...reference-on-physics-object.79508/post-472667)
--> 6. Now you know which code sections of your game create a lot of garbage, for me it was for example:
STEP Event: variable1 = [abc, def, ghi];
--> I changed it to:
variable1[0] = abc;
variable1[1] = def;
variable1[2] = ghi;
to avoid creating a new GML Array every step.
7. check if your change was fine by checking gc_get_stats(). This should now be smaller (num_objects_in_generation)