GPU lightmass crash: Assertion failed: (Index >= 0) & (Index < ArrayNum) ...

When baking using GPU Lightmass, the editor crashes when it’s completed with the bake, right when the denoising starts.
I tried disabling the denoiser, but the editor still crashes.
This is the error I get:
Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 763] Array index out of bounds: 2496 from an array of size 0

got the same error, have you found a way to fix it?

It somehow fixed itself. The things I did before it worked were: removing a few objects from the scene, baking using CPU. You can try these too but I’m not sure if these were the cause of it working again. It very much feels like it magically decided to work this time.

I got this same error.

When this kind of error appear, I follow these steps:

  1. Go to project folder and renamethe folders “Saved”, “Intermediate” and “Binaries” in the project foltder (to Saved_, Intermediate_ and Binaries_, for instance);

  2. Generate new VS project files clicking with right button on the unreal engine project file → Generate Visual Studies project files (sometimes, it is necessary go to more options). It will be recreated the “Saved” and “Intermediate” folders

  3. Double left click the unreal project file and click yes to rebuld. It will be recreated the folder “Binaries”. After few seconds (or minutes, depending of your machine), the project will run.

  4. Delete Saved_, Intermediate_ and Binaries_.

It has been working for me. Hope it gonna be helpful.

2 Likes

Please, note: I’m not sure if it is the best approach.