I’m working on a game, think endless runner.
For environment meshes I’m using HISM. They get created in the Construction script. The basic loading logic is in the screenshot attached.
The game has a restart button that calls the Open Level (by name) node and restarts the same level.
This causes the game to crash both in the build and when playing in Standalone. It works perfectly in PIE and viewport.
This is the error
[2020.12.24-18.13.12:499][770]LogWindows: Windows GetLastError: La operación se completó correctamente. (0)
[2020.12.24-18.13.12:505][770]LogWindows: Error: === Critical error: ===
[2020.12.24-18.13.12:505][770]LogWindows: Error:
[2020.12.24-18.13.12:505][770]LogWindows: Error: Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/RenderCore/Private/RenderingThread.cpp] [Line: 907]
[2020.12.24-18.13.12:505][770]LogWindows: Error: Rendering thread exception:
[2020.12.24-18.13.12:505][770]LogWindows: Error: Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Windows/D3D11RHI/Private/D3D11Commands.cpp] [Line: 1431]
[2020.12.24-18.13.12:505][770]LogWindows: Error: Null SRV (resource 0 bind 0) on UB Layout FInstancedStaticMeshVertexFactoryUniformShaderParameters
[2020.12.24-18.13.12:505][770]LogWindows: Error:
[2020.12.24-18.13.12:505][770]LogWindows: Error:
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffd0d6ed759 KERNELBASE.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffcb47ac386 UE4Editor-Core.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffcb47afae8 UE4Editor-Core.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffcb44bdd5d UE4Editor-Core.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffca60da7af UE4Editor-D3D11RHI.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffca60d91d9 UE4Editor-D3D11RHI.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffca60eb8d3 UE4Editor-D3D11RHI.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffca61107bc UE4Editor-D3D11RHI.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffcbf95d971 UE4Editor-RHI.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffca895fd42 UE4Editor-Renderer.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffcbf967b73 UE4Editor-RHI.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffcbf96758c UE4Editor-RHI.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffcbf968271 UE4Editor-RHI.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffcbf95fb12 UE4Editor-RHI.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffcbf965315 UE4Editor-RHI.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffcbf967b73 UE4Editor-RHI.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffcbf96758c UE4Editor-RHI.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffcbf9688aa UE4Editor-RHI.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffcbf95aea7 UE4Editor-RHI.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffca8ffbe80 UE4Editor-Renderer.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffcd6054950 UE4Editor-RenderCore.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffcd60586ff UE4Editor-RenderCore.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffcd6053ef4 UE4Editor-RenderCore.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffca8a11f7c UE4Editor-Renderer.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffca901f806 UE4Editor-Renderer.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffca8fd8e7f UE4Editor-Renderer.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffca8ff945d UE4Editor-Renderer.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffca8ffd4f8 UE4Editor-Renderer.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffcb426ed11 UE4Editor-Core.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffcb426f0fe UE4Editor-Core.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffcd607a422 UE4Editor-RenderCore.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffcd6082af4 UE4Editor-RenderCore.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffcb47c7cdb UE4Editor-Core.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffcb47c0970 UE4Editor-Core.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffd0df27034 KERNEL32.DLL!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error: [Callstack] 0x00007ffd0fabd0d1 ntdll.dll!UnknownFunction []
[2020.12.24-18.13.12:505][770]LogWindows: Error:
[2020.12.24-18.13.12:505][770]LogWindows: Error:
[2020.12.24-18.13.12:505][770]LogWindows: Error:
[2020.12.24-18.13.12:505][770]LogWindows: Error:
[2020.12.24-18.13.12:517][770]LogExit: Executing StaticShutdownAfterError
[2020.12.24-18.13.12:520][770]LogWindows: Error: Error reentered: Assertion failed: (PreviousValue & Mask) == Mask [File:D:\Build\++UE4\Sync\Engine\Source\Runtime\RHI\Public\RHI.h] [Line: 1993]
RHIBeginTransitions has been called twice on this transition for at least one pipeline.
[2020.12.24-18.13.12:520][770]LogWindows: Error: HandleError re-entered.
[2020.12.24-18.13.12:520][770]LogWindows: FPlatformMisc::RequestExit(1)
[2020.12.24-18.13.12:520][770]LogCore: Engine exit requested (reason: Win RequestExit)
[2020.12.24-18.13.12:534][770]Log file closed, 12/24/20 15:13:12
This happens regardless of the type of mesh / shader (tried it with just a cube SM with the default shader) and it happens regardless of whether or not the meshes are moving. It does NOT happen if instead of HISM i use a ISM.
I have also tried the RestartGame node instead, loading a different level (also with HISMs), moving the logic from the Construction script to the BeginPlay event, all with the same result.
Spawning HISMs during runtime in the same level, via a SetTimer node works well, the problem only seems to happen when trying to load a new level or the same level.
Also tried adding instances both in world and relative space, clearing instances or not, etc.
I’m not sure if this is a bug or if I am missing something, since this is the first time I’ve used HISMs.
Thank you for any input you may give, and happy holidays!