Does anybody know why my following code sometimes (usually after some inactive time) gives a Renderer crash on clients (no issue on Listen Server), more specifically a:
Rendering thread exception:
Assertion failed: UniformBufferRHI.GetReference() [File:D:\Build\++UE4\Sync\Engine\Source\Runtime\RenderCore\Public\UniformBuffer.h] [Line: 87]
Attempted to access UniformBufferRHI on a TUniformBuffer that was never filled in with anything
0x00007ffb9b63478c KERNELBASE.dll!UnknownFunction []
0x00007ffb1d010216 UE4Editor-Core.dll!UnknownFunction []
0x00007ffb1d014218 UE4Editor-Core.dll!UnknownFunction []
0x00007ffb1cd3242d UE4Editor-Core.dll!UnknownFunction []
0x00007ffb1cc86a45 UE4Editor-Core.dll!UnknownFunction []
0x00007ffb1cc880a0 UE4Editor-Core.dll!UnknownFunction []
0x00007ffac5d604b3 UE4Editor-Engine.dll!UnknownFunction []
0x00007ffac5d58102 UE4Editor-Engine.dll!UnknownFunction []
0x00007ffac5d53803 UE4Editor-Engine.dll!UnknownFunction []
0x00007ffacbac3b1c UE4Editor-Renderer.dll!UnknownFunction []
0x00007ffacbab51c6 UE4Editor-Renderer.dll!UnknownFunction []
0x00007ffacbac8619 UE4Editor-Renderer.dll!UnknownFunction []
0x00007ffacb459339 UE4Editor-Renderer.dll!UnknownFunction []
0x00007ffacba6f875 UE4Editor-Renderer.dll!UnknownFunction []
0x00007ffacba45f8f UE4Editor-Renderer.dll!UnknownFunction []
0x00007ffacba58f6d UE4Editor-Renderer.dll!UnknownFunction []
0x00007ffacba5cd3c UE4Editor-Renderer.dll!UnknownFunction []
0x00007ffb1ca92398 UE4Editor-Core.dll!UnknownFunction []
0x00007ffb1ca927ce UE4Editor-Core.dll!UnknownFunction []
0x00007ffb1c7b9c67 UE4Editor-RenderCore.dll!UnknownFunction []
0x00007ffb1c7c2f34 UE4Editor-RenderCore.dll!UnknownFunction []
0x00007ffb1d02ff0b UE4Editor-Core.dll!UnknownFunction []
0x00007ffb1d027050 UE4Editor-Core.dll!UnknownFunction []
0x00007ffb9cb154e0 KERNEL32.DLL!UnknownFunction []
0x00007ffb9e00485b ntdll.dll!UnknownFunction []
if (IsValid(GetTemplateWeaponData()->MuzzleFlashEffect))
{
// Muzzle flash effect.
UGameplayStatics::SpawnEmitterAttached(
GetTemplateWeaponData()->MuzzleFlashEffect,
GetItemMesh_D(),
GetTemplateWeaponData()->MuzzleSocket,
FVector::ZeroVector, FRotator::ZeroRotator, FVector::OneVector,
EAttachLocation::SnapToTargetIncludingScale,
true,
EPSCPoolMethod::AutoRelease,
true);
}
The code is being run client-side and it happens with different particle systems.
For now, I’m going to try to replace it with a single Emitter since it shouldn’t be an issue in the case of a muzzle flash but there may be other situations where I want to spawn Emitters at run-time.
EDIT: Nevermind, even when using a single emitter and using ActivateSystem, it still causes the crash. Is there something about Particle Systems I am not aware of?