Lagging when starting a level

Here is a strange lag bug that I can’t seem to find the cause of… Any suggestions on how I would even begin to debug this? It seems to have suddenly started happening on all levels. It works fine when testing from the editor in standalone mode, but lags like this when I release it…

Here is a video of the gameplay demonstrating the lag spike. It seems to happen regardless of graphics settings (epic or lowest). It only acts up near the beginning of a level’s play, and then works fine after that. Sometimes it lags a few times, sometimes once, sometimes none. It happens at 9 seconds this time.

https://youtu.be/AYCiG6r654M

The player is being repositioned, no?

No repositioning, it lags, and then the camera looks off in a random direction, often times really far in the direction I am turning.

Ok, it’s really hard to tell, just by looking at it.

Presumably something is hitting the CPU suddenly and pretty hard. You have the scene, which ‘look’ innocent enough, but what else is happening?

Anything heavy in the level BP or character?

You could always try console command stat unit, which will at least tell you what part of the computer is having the issue.

From there, you could use stat game, stat engine, or stat GPU, depending on which one is having the issue. Here is a whole list of debugging stat commands that may also be helpful.

You mentioned the issue is only happening after packaging, so it could get tricky to do this. You would have to make sure you are still packaging as development and attach Execute Console Command nodes to begin play or maybe an input node.

Not anything in particular I can think of, there is a lot of stuff going on, but not anything with a delay of multiple seconds. One thought was a physics issue - e.g. a rock rolls into something, but it happens on other levels without physics objects. Apex destructible windows could be as well, but they don’t get destroyed during the lag spikes. There is a lot of initialization, but that seems to happen within the first fraction of a second. Will have to try experimenting with console commands and the dev build.

Can’t really recommend much from here. If you can’t find answers, maybe post a level ( or just as much as you need ) somewhere so I can download and take a look.

PS I’m on 4.25…

Is there a way to upload just a level? I wonder if it might have something to do with Apex destruction? I added destructible windows fairly recently.

You just make a new empty project and migrate the level to that. Then zip that project and put it online somewhere like google docs.

Thanks all for the help! It isn’t doing it now, and I can’t seem to duplicate it anymore - I was able to readily when it was happening, between game starts. Perhaps it was just something causing lag spikes on my computer? If I ever see it again, I would like to confirm by trying with another game and see if the same thing happens. Thanks all for the help!