I released my game on Steam today (Title: Punch A Bunch) and some people are consistently seeing a freeze at a specific moment in the game.
I have never encountered this freeze while working on the game but I was magically able to reproduce the freeze when I launched the game through Steam. It doesn’t ALWAYS happen and only seems to affect some people.
Since it’s never happening in the editor, how can I go about debugging this issue? I’ve tried recreating the level which was crashing etc but I really cannot figure out what is causing the game to freeze.
Any suggestions would be very welcomed!
What exactly happens at this specific point in the game?
Nothing in particular - It’s a fighting game and I have a simple level with only UI displaying “next opponent” the UI is making a simple animation sliding in some images and it just freezes mid UI animation.
I tried recreating the entire level and UI widget. Removed all animations etc. Now it’s not freezing on this screen anymore - but when you click the button to proceed into the fight, it freezes here instead. So I guess when the game is trying to load the level? Weird thing is that it was freezing mid UI animation when really nothing was happening before.
The game just locks up and stops responding. The game music is still playing though. Is there any way to get a log from the game or anything at all to help me track down what is causing this freeze?
Here are the best I can come up with, in order of usefulness:
1: Do you get any warnings or errors during packaging? Please look at the whole log.
2: Apparently you can debug a packaged game with VS
3: Longshot. Are you using physics much? Are you fiddling with tick group settings? Are you specifically using async code? ( there is stuff online about problems with this ).
4: Apart from that, you have to put logging code in your game, and then get the users to send the logs to you. I also think it might be possible to enable logging by default, by setting verbosity levels in an engine ini file.
Thanks a lot for the suggestions. I will have a look at this. It is running physics but at the time of crash, the game is in a scene with nothing in it and just UI running. And it’s very inconsistent so maybe it’s a memory issue or similar.
Is it possible your UI hard-references other heavy classes and/or assets? You can check it with reference viewer.
Everything your UI uses will be loaded with this UI, even if it’s not used nor displayed.
To avoid this problem you can try to use soft references and resolve them only when needed, this way you will stretch loading of assets and they won’t load all at the same time.
Thanks for the suggestion but no there are no references to anything outside the level, only the game instance.