Procedural Dungeon Generation Crashing Problem

Hi,

I’m basically new to programing and am trying to make a game with procedural generation and found a neat plugin that does so. I’ve completely read their entire wiki and have a good understanding of how this plugin works and applied it to my game, but for some reason, the max number of rooms I can have is around 4-5 and anything greater will crash or rarely generate. I’ve used up all my energy trying to find out the problem and am stuck and in need of help!

Procedural Dungeon Plugin

Wiki

Crash Log
Assertion failed: GetFName() == NAME_None [File:D:/Build/++UE4+Licensee/Sync/Engine/Source/Runtime/CoreUObject/Private/UObject/UObjectBase.cpp] [Line: 130]

UE4Editor_Core
UE4Editor_Core
UE4Editor_CoreUObject
UE4Editor_ProceduralDungeon!URoom::`vector deleting destructor’()
UE4Editor_ProceduralDungeon!ADungeonGenerator::AddRoom() [C:\Users\WIN\Documents\Unreal Projects\MyProject\Plugins\ProceduralDungeon\Source\ProceduralDungeon\Private\DungeonGenerator.cpp:175]
UE4Editor_ProceduralDungeon!ADungeonGenerator::AddRoom() [C:\Users\WIN\Documents\Unreal Projects\MyProject\Plugins\ProceduralDungeon\Source\ProceduralDungeon\Private\DungeonGenerator.cpp:171]
UE4Editor_ProceduralDungeon!ADungeonGenerator::CreateDungeon() [C:\Users\WIN\Documents\Unreal Projects\MyProject\Plugins\ProceduralDungeon\Source\ProceduralDungeon\Private\DungeonGenerator.cpp:99]
UE4Editor_ProceduralDungeon!ADungeonGenerator::OnStateBegin() [C:\Users\WIN\Documents\Unreal Projects\MyProject\Plugins\ProceduralDungeon\Source\ProceduralDungeon\Private\DungeonGenerator.cpp:247]
UE4Editor_ProceduralDungeon!ADungeonGenerator::OnStateTick() [C:\Users\WIN\Documents\Unreal Projects\MyProject\Plugins\ProceduralDungeon\Source\ProceduralDungeon\Private\DungeonGenerator.cpp:319]
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Core
UE4Editor_Core
UE4Editor_Core
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll

Blueprints


Please let me know if I’m doing anything wrong and what I should do, it means a lot if you could help out!
Thanks, I appreciate it!

After digging around a little bit in that code, my recommendation is to simply not use it, but that’s not super helpful.

Most likely, the bug is coming from the fact that they are deleting newRoom during the loop. That’s really bad in general (newing and deleting is slow and will cause memory fragmentation), but from my understanding of UE4 it’s especially bad because you’re not supposed to manually delete any UCLASS objects. They’re meant to be handled by the GC. As a test, you could try simply commenting out the delete newRoom line. It might fix the issue for you.