verse SpawnParticleSystem to spawn vfx freezes game

Summary

I never used SpawnParticleSystem. I just tried it out and it is unusable. It sometimes freezes all the players game when spawning the vfx for the first time. I can confirm this happens with any vfx, I created the most basic vfx using the template and it happens. I think it also has to do with how far from 0,0,0 the vfx spawns in the world and where the players are. But this is speculation. On lower end devices like the switch it may cause a crash.

It the clip I started the game and pressed the button, that time it did not happpen. Then I played 5m on the main island and after that teleported back to spawn. I pressed the button again and the lag happened.

I have other vfx in my map but those I do not spawn with verse, for example I have a siphon vfx that I play using a vfx powerup device. This has no issue. It is just the verse part here.

Please select what you are reporting on:

Creative

What Type of Bug are you experiencing?

Verse

Steps to Reproduce

Not sure, I think it is map specific.

Expected Result

There is no freeze when spawning vfx through verse

Observed Result

A freeze

Platform(s)

Any

Island Code

6570-5231-1418

Upload an image

Additional Notes

Relevant code:
SpawnVFX(VFX:particle_system,Pos:vector3,TimeAlive:float,?Rotation:rotation=IdentityRotation()):void={
ActiveVFX := SpawnParticleSystem(VFX,Pos,?Rotation:=Rotation)
Sleep(Abs(TimeAlive))
ActiveVFX.Cancel()
}
OnButtonPressed(Agent:agent):void={
spawn{SpawnVFX(PanelVFX, B1.GetTransform().Translation, 2.0, ?Rotation := B1.GetTransform().Rotation)}
}

FORT-1023310 changed to ‘Needs More Info’. We’re missing information that would help us determine the source of the issue.

1 Like

Any updates? This issue is still happening.

Hi, are you able to elaborate on what information you need? We will provide.

Hey folks, looking into this issue. A couple of questions

Does this occur in a blank project? Or is this solely project specific?

Is this a looping VFX or a oneshot? It sounds like it’s likely a oneshot and not looping

From the post it sounds like there is severe hitching when spawning the VFX for the first time within a session or that it might have to do with how far from the world origin the VFX is spawned compared to the players location.

The repro from the orignal post appears to be:
Start a game

Call SpawnParticleSystem to spawn a particle_system near the player

Move some far distance away from the spawned particle_system

Teleport or move back to the location of the previously spawned particle_system

Attempt to call SpawnParticleSystem to spawn a particle_system near the player again

Result

A severe server hitch occurs and the particle_system spawns

1 Like

Hi, we are currently working on full repro steps for you, we will get back to you shortly

2 Likes

Hi Vath,

It did not occur in a blank project, solely on this project. At first we thought our own vfx had an issue but then we were able to repro it with a template niagara effect by epic called directional burst, seen in the video. I am not an expert but loop behavior is set to infinite for the template by epic and our other simple yellow vfx (not shown in this thread), so not a one shot.

At first I thought this issue only happens once per game, for first spawn, but this is NOT the case. I do not think location or distance are key requirements to trigger this bug but it may increase the bug frequency. I have just tested on this project together with Manu for 20m. We found some very interesting info. We were standing in spawn for 10m pressing the button that spawns the vfx. We first waited 2m to press the button, when we did it froze both our screen. Then we waited 1m and pressed it, it froze again. Then 30. Another freeze. When the time in between button presses became 20s the freezes start to stop.

It seems like if there is no vfx triggered for 30s some kind of niagara engine in the editor shuts off, and then when you spawn in another vfx it reboots this niagara egnine code in unreal engine and that causes a freeze, that is our theory. For this 10m of testing we did not teleport, we were simply next to the button. It also sometimes is the case where it freezes for one player but not the other, happens like 30% of the time. In other cases both players. Weirdly enough sometimes it happens that when I press the button and there is no freeze and then I wait 10s, I also get the freeze. Maybe there is some kind of global 30s timer? (the 30 here is aprox)

I have also been testing 8h today trying to find more info. I removed 10000 actors from my map and was only left with the spawn area, no change in the bug. Then disabled verse device by verse device until I had only one left that seemed to trigger the hitch. Then when I removed line 23-25 in the final active verse device I was not able to repro the hitch anymore.

The hitch was gone however there was still another effect present, a 0.3s delay on the vfx spawning (which is present every 30s, see video). When the hitch or delays appears it takes another 30s to get the the bug again.

Adding the 3 lines back caused the hitch bug to return. This code sets the material for a prop using verse.

image


I then removed those 3 lines again and tested this code. This was the only verse device enabled. Note that I also have a few hundred fortnite devices in my map that probably run code.
This code did not cause any hitches ever but did cause the 0.3s delay to appear.

The repro steps are correct, thought I could not confirm any of this on a blank project. It is not needed to move far way though after spawning it, in my map I can repro it by just spawning players at world origin. Then just spawning the vfx there and it freezes. Sometimes you might need to wait like 30s.

Thank you for your time, we remain available for more details if needed!

1 Like