Project with a C++ class crashes (fatal error) when I run the .exe but not in editor

I am trying to make a procedural level generator in a C++ class, that I named ProceduralLevelGenerator. I created a blueprint named MyProceduralLevelGenerator from it which spawns a room for now. When I compile the class and add a room in the TArray inside the blueprint it spawns a room in the editor. But when I run the game .exe it crashes with a fatal error. If I remove the level gen blueprint actor from the level it runs correctly. I dont know what is causing problems but it has to do with the C++ class for sure.

Thanks.

The spawned room in the editor:

The class .h file:

The class .cpp file:

And MyProceduralLevelGenerator blueprint with the room added in TArray “RoomActors”:

When I run the debugger I get a crash error: “Corrupt data found, please verify your installation” with “Serialization Error: Action Needed”. I verified my installation and it’s OK. No clue what is going on…

Debugger output:

Assertion failed: CurrentPos + Count <= TotalSizeOrMaxInt64IfNotReady() [File:D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading.cpp] [Line: 7791]
Seeked past end of file /Game/FirstPerson/Maps/FirstPersonMap (1952556478 / 13830)
A breakpoint instruction (__debugbreak() statement or a similar call) was executed in TestProject.exe.

Found the fix, I deleted Build and Windows folders and recreated the project and it works now.

1 Like