I’m trying to solve a relatively rare crash that has been reported by our graphics artists. I wasn’t able to debug the crash in natura, but we did get the call stacks.
It appears to me that:
- Nanite::BuildShadingCommands()
- spawns ShadingCommands.SetupTask
- spawns ShadingCommands.BuildCommandsTask
- which modifies ShadingCommands.Commands
- Nanite::DispatchBasePass
- waits for ShadingCommands.SetupTask
- DOES NOT wait for ShadingCommands.BuildCOmmandsTask
- reads ShadingCommands.Commands
My fix: at the beginning of Nanite::DispatchBasePass, right after
ShadingCommands.SetupTask.Wait();
I have added
ShadingCommands.BuildCommandsTask.Wait();
That seems to have fixed the problem, however due to the relative rarity of the crash I can’t be sure.
Can you confirm that this fix makes sense and eventually integrate it?
<