What can cause the array index problem in a packaged build?

The problem occurs when starting the game in the packed version (message copied from the packaging logfile):

Message dialog closed, result: Ok, title: The UE5-DF5 Game has crashed and will close, text: Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 691]
Array index out of bounds: 0 from an array of size 0

Background:
The game is running well in Unreal4.27.2 both in editor and packaged.
It is created in blueprints.

The migration to Inreal5 was nearly perfect. There are some warnings about UIWS, but everythings worked fine. The game is running well in the editor.

I solved the usual packaging problem (copying a visual studio file).

Now the packaged game always crashed on start.

I can package it in debug version and write text to the logfile via prints.
These logs then make visible that my code in the game instance (Init) is completed. Afterwards the player character etc should be allocated by the system. But then it crashes.

So the array that is empty (this is what the message says) isn’t one of my arrays.


To solve that I created a new project (just ThirdPerson). That tiny project can be packed and works of course.
I then migrated the map of my game into that new project.
I then changed the starting map.
Until here it works.
When I replace the GameInstance with my Blueprint the packaged version crashes.

Some ideas what this could cause?

additional information:
I removed all UIWS objects (lakes, rivers, manager) and the packaged game is running.
Therefore it is a UIWS problem. I’ll ask the publisher of that tool.

Hey, did you ever find a solution? I am having the same issue and would love to know what the cause is! Thank you in advance and kind regards, Eric

in my case removing the UIWS water system solved the problem.
They pretend it is ready for Unreal 5, but obviously it’s not.
I never revceived an answer from them.

1 Like

I’m getting the exact same error and it’s due to this bug. If you have a Spline Mesh Component with collision enabled, you’ll get this error in a packaged build.

1 Like

thx, I replaced it