Frequent Crash: Assertion failed: CellIndex < CellIndexMax

The current build (5.4.2, EDIT: And also 5.4.3) has a bug that causes the editor to crash, when very large, partitioned environments with many actors are loaded.

There are some threads on this forum that discuss the issue, like:

The bug is easily reproducible. Make a large, partitioned world and load plenty of stuff into the editor. After it surpasses an unknown limit, it crashes. Some devs assume that it’s foliage related, but I can’t necessarily confirm that.

As we’re affected by this bug and pretty much cannot go on working on our project for as long as this sticks, I reported a bug more than two weeks ago, following these instructions:
https://www.unrealengine.com/en-US/support/report-a-bug

I instantly received an automatically generated mail with a case number, but that was it. The bug isn’t listed in the bug tracker and I haven’t heard anything back.

What am I (or people affected by this bug) supposed to do now? Does it make sense, to report it again? How long does it usually take until a bug is added to the bug tracker?

Hello, thanks for your post, maybe the bug is corrected in the new 5.4.3, I’m now migrating my project to test

For me it’s still crashing…

It’s charging more than before but nearly at the end it crash

yep, crash all the way… before 5.4.2 it did´t!

Yup. Good ol’ “Assertion failed: CellIndex < CellIndexMax” crash still there. Editor crashes when I try to load our world map.

Most worrying thing is the fact that it’s not even on their bug tracker yet. So this game breaking bug may stick around for a looooong time. :poop:

I think I’ve found a workaround that may be useful until it’s officially fixed.

From my understanding the crash occurs due to a limit being hit in the Nanite Scene Culling code, instead of each instance being culled individually the scene is parsed and grouped into cells so that less bounds checks need to be made. If more than 1048576 cells are created you get the crash.

Two ways you can avoid the crash are:

  1. Disable Nanite scene culling by setting r.SceneCulling 0 this will likely reduce performance so profile this yourself but it let me open my level without crashing to work on it. You can set this in DefaultEngine.ini with:
[ConsoleVariables]
r.SceneCulling=0
  1. Reduce the number of cells so they don’t hit the limit, I did this in my project by increasing the minimum cell size from the default of 4096cm to 16384cm with r.SceneCulling.MinCellSize, the command is read only so can’t be changed once the editor has launched. You can set this in DefaultEngine.ini with:
[ConsoleVariables]
r.SceneCulling.MinCellSize=16384

My level is large and mostly flying around at high altitudes so having less granular culling was pretty inconsequential for me.

You can use the command r.SceneCulling.DebugRenderMode 1 to view the cells and see how your meshes are being grouped and then increase or decrease r.SceneCulling.MinCellSize in the config restarting the editor each time until you find the best value that doesn’t crash and gives you enough culling granularity.

5 Likes

I can’t say “Thank you!!!” enough. This work-around finally allowed me to open our world map again. I wonder how anyone could hard-code a limit to the cells being used in an open world engine.

Yeah this also helped me out! You should mark as answered by The Quaggles!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.