• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

SOLVED [SOLVED] [GMS 2.3+] "Script_Free called" freezing issue

Hi! Recently, after GMS 2.3.2.558 release, I found an issue:
When I finish the game (by calling game_end() script or just closing the window), in IDE output I see the following -
1618414812397.png
After "Script_Free called" message was printed, IDE freezes (for about ~5 sec). The time of freezing depends on how long I have played my game.
What is that? What is the reason? And how can I fix it? Before this update, everything was alright...
Thanks in advance!!! 😄
P.S. : I have tested some thing - Freezing is not garbage collector dependent. And no - I'm using Clean Up event for all my sctructs etc.🙃
P.S.S: If there are spellings, I'm sorry, but I'm not a native english speaker...

Update 1: Okay, I have tested some thing again - if I call gc_collect() during the game, it will also freeze. I think, the reason is that the garbage collector collects a lot of garbage and doesn't clean it up very often...
 
Last edited:
I probably found several solutions to this problem:
1) Turning off garbage collector ( gc_enable(false) ). There are no any freezings after closing game window, but IDE still performed "Script_Free"
2) Increasing the garbage collector target frame time ( gc_target_frame_time(ms) ). Default value is 100 ms per frame. (Not so effective as first method)
The reason of freezings (I think so) - my game using a lot of methods, which cannot be deleted manually
There is gc_get_stats() results (when I call it at the end of my game):
1618421262417.png
Please, If anybody knows more about that issue, leave a comment.
I'm thinking of going back to the previous version of IDE... But so far the problem does not bother me much now
 

ZigZag

Member
Same here, I have freezing several times while running my application, I suspect it to be due to the garbage collecter too, since when I look at the graph memory usage is always dropping after a freeze.
I use Scribble for text rendering, it does some manual garbage collecting, and that is most likely causing this issue.

Have you reported this bug?
 

ZigZag

Member
I did some further testing comparing the new runtime 2.3.2.423 with the previous one 2.3.2.420(which does not have the issues), and one of the main differences I see is a steady memory increase on the new runtime, even if I just launch my application and do nothing, so the garbage collector needs to do some work all the time. The old runtime is "normal" where memory usage only gets increased when I do stuff but else constant.
 

Shavv

Member
This has become a issue for me since the latest 2-3 runtimes update.

With the both the steam and desktop version of GMS2
 
Top