# Cache crash

**URL:** <https://forums.unrealengine.com/t/cache-crash/480042>\
**Category:** Getting Started & Setup\
**Tags:** unreal-engine, crash, cache, simulation, question\
**Created:** [March 10, 2021, 2:22pm UTC](https://forums.unrealengine.com/t/cache-crash/480042 "2021-03-10T14:22:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeremycouillard](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jeremycouillard](https://forums.unrealengine.com/u/jeremycouillard)\
**Post date:** [March 10, 2021, 2:22pm UTC](https://forums.unrealengine.com/t/cache-crash/480042/1 "2021-03-10T14:22:16Z")

</div>

I am trying to run an endless simulation across 15 levels. When a level opens up, cameras fly around, a song plays, when the song is done, another level opens up, repeat above.  
This works for around 14 hours, for around 330 instances of opening levels.

I get a crash usually around the 330th level opening. I am not able to google this problem:

Assertion Failed  
Slot Index \< CachSlotCapcity  
FileCache.cpp line 367

I thought that by opening a new level every 3-4 minutes I’d clear out everything and start fresh each new level. Why would a building up of opening levels cause a crash like this?

Any ideas how I could avoid this issue? I’ve been optimizing the game, I have no circular dependencies. I’ve done numerous builds, deleted /Saved /Intermediate /DerivedDataCache…

---

<div class="post-metadata">

**Author:** ![LanGuofeng](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LanGuofeng](https://forums.unrealengine.com/u/LanGuofeng)\
**Post date:** [May 19, 2021, 9:03pm UTC](https://forums.unrealengine.com/t/cache-crash/480042/2 "2021-05-19T21:03:32Z")

</div>

I also have this issue if I set bShareMaterialShaderCode true

---

<div class="post-metadata">

**Author:** ![DGrouse](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DGrouse](https://forums.unrealengine.com/u/DGrouse)\
**Post date:** [July 13, 2021, 6:32am UTC](https://forums.unrealengine.com/t/cache-crash/480042/3 "2021-07-13T06:32:43Z")

</div>

I’m also having the same problem, happens consistently after the loading level 252 times, in our case we switch back and forth between a lobby level and a gameplay level. Our project is on 4.25, it looks like FileCache had some big changes around this time. Unfortunately our project isn’t compatible with 4.26 so we can’t tell if upgrading will help.

---

<div class="post-metadata">

**Author:** ![DGrouse](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DGrouse](https://forums.unrealengine.com/u/DGrouse)\
**Post date:** [July 13, 2021, 7:52am UTC](https://forums.unrealengine.com/t/cache-crash/480042/4 "2021-07-13T07:52:20Z")

</div>

Yeah setting it to false seemed to fix it for me. Add this to DefaultGame.ini

```
[/Script/UnrealEd.ProjectPackagingSettings]
bShareMaterialShaderCode=False
```

---

<div class="post-metadata">

**Author:** ![egowei](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@egowei](https://forums.unrealengine.com/u/egowei)\
**Post date:** [January 31, 2023, 9:24am UTC](https://forums.unrealengine.com/t/cache-crash/480042/5 "2023-01-31T09:24:25Z")

</div>

I’m also have this issue on both ios/andriod device,is there any commit solve this problem?
