Can you tell me why this bug appeared? I’ve been looking all over and I still don’t know.
Can you link the bug?
Hi all,
https://issues.unrealengine.com/issue/UE-146893
The first thing I wonder is if this would be reproducible in Lyra. It may be marked as won’t fix because ShooterGame is considered “Legacy” at this point.
Also it feels like early days for Epic Online Services, so maybe this bug is encapsulated in another report, or made irrelevant by current/future development.
If you can reproduce this in Lyra, I think it would be worth submitting a bug report.
Found the problem. Using SeamlessTravel will cause the same problem as above.
Let’s create a simple countdown to start the game. Here’s how it should work: The server initiates the game by pressing the ‘Start Game’ button. The gamemode function notifies all player controllers (using a ‘foreach’ loop on the player controller array) that the game is about to begin. The clients display a loading screen and disable input, particularly the ‘V’ key. Additionally, we can enhance the experience by adding a cool sound and a countdown animation. After a 1-second delay, the gamemode performs a server travel, transitioning to the game scene.
By adding a sound and countdown animation, we can make the game start more engaging and immersive for the players. And the bug is gone, too.
For me it’s a good workaround for now.
It works fine in GG-Party
Hi! The solution proposed above is not a real solution, It relays on time, which is unpredictable and it will fix it some times, and won’t fix it other times.
Today I encountered the same exact issue in UE 5.5. It’s still present and I found the fix for it. The reason for the error is as follows:
Explanation
When a client is replicated into our view, Unreal will create UVoipListenerSynthComponent for this client. This component is responsible for synthesizing the raw audio information that Unreal received over the network from the talking client using voice chat. This synth component created UAudioComponent inside it, which is responsible for actually pushing the synthesized sound into your headphones/speakers etc. It’s the regular Unreal’s audio component.
Issue
So the problem is that when we do the seamless travel, for whatever reason, Unreal does NOT cleanup the UVoipListenerSynthComponent(s) it has created for clients, and it also does not cleanup their associated audio components. So when the change of the map happens, the destruction of the scene checks if there is some leftover components that were not destroyed, which is wrong if that happens, and there is an assertion in the engine to check against that. It’s a logic issue if this happens.
Workaround/Fix
Unfortunately, the fix is only possible in the C++.
I am using some UWorldSubsystem for that, so you can do the same. In my world subsystem class, I have overridden the Deinitialize function from the UWorldSubsystem. In that function I simply call the below code:
TArray<UVoipListenerSynthComponent*> SynthComponents;
for(TObjectIterator<UVoipListenerSynthComponent> It; It; ++It)
{
UVoipListenerSynthComponent* SynthComponent = *It;
if(IsValid(SynthComponent))
{
SynthComponents.Add(SynthComponent);
}
}
for(UVoipListenerSynthComponent* SynthComponent : SynthComponents)
{
if(UAudioComponent* AudioComponent = SynthComponent->GetAudioComponent())
{
AudioComponent->DestroyComponent();
}
SynthComponent->DestroyComponent();
}
What it does is basically finding all the synth components and their associated audio components and exclusively destroying them. Since it’s a world subsystem, the deinitialization happens very early during the world destruction, so this fits it really well. Cheers!