This question was created in reference to: [Render code crashes caused by ShaderMap mismatch in [Content removed]
We are experiencing this same issue as the other developer, however we have found a fix. The issue is because in ScalabilityCVarsSinkCallback(), when it creates the FGlobalComponentRecreateRenderStateContext, the constructor of it calls UpdateAllPrimitiveSceneInfosForScenes(). This launches a task on RenderThread which calls FPrimitiveSceneInfo::CacheMeshDrawCommands. This can then overlap with the assignment of GCachedScalabilityCVars which causes the issue.
We were able to fix this by adding another FlushRenderingCommands() between creating the FGlobalComponentRecreateRenderStateContext and assigning GCachedScalabilityCVars here to wait for the UpdateAllPrimitiveSceneInfosForScenes RT work to finish.
We wanted to pass this along since it seemed from the other thread that Epic didn’t have a reliable repro for the issue.
Thanks!