So i have a massive problem with a crash in unreal right now. For some reason it mixes up some of the primitives and when reloading a level it attempts to remove a FPrimitiveSceneInfo from the Primitives array on the renderthread but the packed index assigned to the object is out of range of the primitives. So either its attempting to remove the same primitive twice or the Primitives array was modified incorrectly. I have been stuck on this for days now as there is no link between the primitive crashing the thread and what is most likely the actual cause of the issue.
Anyone have any idea where to look? ill mention in addition that while it usually crashes on mapload, crashing during play is also actively happening. During sceneload is just more common since it needs to remove all assets from the renderthread. which brings me back to “why is it attempting to remove this FPrimitiveSceneInfo if it was most likely already removed”.
The call stack points me towards RemovePrimitiveSceneInfo_RenderThread. Since this is inside a lambda and on another thread it doesn’t provide me much info.