I have some issues with understanding the cause of freezes in my game. Every several frames there's a freeze for 2-6 seconds, but when I look into profiler I see some confusing stuff, like UpdateFunction.Invoke() [Invoke], doing nothing? for like 4 seconds. empty or almost empty Update functions in my scripts taking 3 seconds, shadows redraw taking 4, executing render graph for 5 sec. All this is strange because it happens by itself, even if nothing happens in the game, engine decides to do this stuff for unreasonably long time, because in all other frames such things take like 0.05 ms. So what's really going on and what can I do about it?
#Troubleshooting freezes with Profiler
1 messages · Page 1 of 1 (latest)
It's hard to tell without more details. Maybe you can provide profiler screenshot of several of these cases?
Of course! Here's some examples.
Here's a really confusing example. These are two neighboring frames, in both of them there's one function that in frame on left take basically nothing, but in other strangely take 7 seconds. This is a one time thing and it never happened again and nothing happened in that frame, player, RBs and other things stood still.
Hmm... Try using deep profiling and also look at the hierarchy view instead of the timeline.
Okay, I will build a new version and profile with deep profiling and will send results here, thank you for trying to help!
The first screenshot here might be due to the render thread. Perhaps a context switch? What cpu do you have/how many cores?
6 core (AMD Ryzen 5 2600 Six-Core Processor 3.40 GHz). And what exactly is context switch?
Basically, when a thread stops in the middle to let another higher priority thread run instead. This shouldn't happen if you have enough cores for all the high priority threads though.
Unless you're running some custom threads with high priorities.
nope, not doing such stuff (as I know 😅)
Is it a webgl build by any chance?
no, windows build
Going to sleep now, but will have a look at any extra info you share in the morning.
Thank you, good night
I... don't think deep profiling should do this...
It generally should add some overhead, but not that much. Can you use the hierarchy mode?
This feels a lot like a hardware problem. Or perhaps your PC being busy with something else at the same time. If check the task manager to make sure.
Sure. If that will help, I saved the profiler data multiple times, so you can take a look
could be the case, but we've tested on multiple pc with different specs, almost same thing on all of them
Upload the profiling data somewhere then.
here's largest example with deep profiling https://drive.google.com/file/d/1wm2Da06GKA9lRTK6MgnHwXllNTbPg7hH/view?usp=sharing
Google Docs
Hm...
The only thing common about all these freezes is that it seems to happen on accessing the C++ side.
Any chance you can share the build of the game so that I can test the issue on my pc?
sure thing: https://store.steampowered.com/app/3802540/Stop_The_F_Demo/
The build is on beta testing branch, I will send code you in DMs
Plunge into the adventure of the bowels of a huge scientific and industrial complex, revealing the secrets. Why are you alone? Who is this mysterious voice? Where are all the employees? You will have to answer these questions and many others. However, be vigilant, your curiosity can lead to dangerous unforeseen consequences.…