# Rendererscene remove primitive crash on removing of primitive where the packed index is out of range

**URL:** <https://forums.unrealengine.com/t/rendererscene-remove-primitive-crash-on-removing-of-primitive-where-the-packed-index-is-out-of-range/460670>\
**Category:** Getting Started & Setup\
**Tags:** Renderer, unreal-engine, crash, question, CPP\
**Created:** [January 17, 2020, 3:12pm UTC](https://forums.unrealengine.com/t/rendererscene-remove-primitive-crash-on-removing-of-primitive-where-the-packed-index-is-out-of-range/460670 "2020-01-17T15:12:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Khoros](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Khoros](https://forums.unrealengine.com/u/Khoros)\
**Post date:** [January 17, 2020, 3:12pm UTC](https://forums.unrealengine.com/t/rendererscene-remove-primitive-crash-on-removing-of-primitive-where-the-packed-index-is-out-of-range/460670/1 "2020-01-17T15:12:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Toni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Toni](https://forums.unrealengine.com/u/Toni)\
**Post date:** [June 14, 2020, 12:34am UTC](https://forums.unrealengine.com/t/rendererscene-remove-primitive-crash-on-removing-of-primitive-where-the-packed-index-is-out-of-range/460670/2 "2020-06-14T00:34:49Z")

</div>

Hi! I am having a very similar problem. Did you solve it?

Thanks 🙂
