BenPyton / ProceduralDungeon

This is an Unreal Engine 4/5 plugin to generate procedural dungeon.
MIT License
513 stars 61 forks source link

Crashing when generating #7

Closed WiseMatthack closed 3 years ago

WiseMatthack commented 3 years ago

When trying to generate a level, UE4 crashes and prints out this log :



UE4Editor_ProceduralDungeon!ADungeonGenerator::OnStateTick() [R:\PD Packages\4_26\ProceduralDungeon\HostProject\Plugins\ProceduralDungeon\Source\ProceduralDungeon\Private\DungeonGenerator.cpp:418]
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Core
UE4Editor_Core
UE4Editor_Core
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll```
BenPyton commented 3 years ago

Hello WiseMatthack,

Can you provide more informations please ?

Also, did you managed to implement your generation logic ? (about your post before the edit)

WiseMatthack commented 3 years ago

Hey, thanks for your quick answer Yes, I did manage to implement the generation logic! I didn't read the documentation carefully enough. I'm using UE4 version 4.26.2, I'm using the latest version of the plugin (1.2.1) that is matching my UE4 version. Just in case, here are my 3 rooms, each one has its own data file assigned: First room: image

Second room: image

Third room: image

There is a starting level where the player (on a cube so as not to fall), as well as the blueprint DungeonGenerator actor are. image

Here is the configuration of my DungeonGenerator: image image image image image image

Thanks again for your help!

BenPyton commented 3 years ago

Sorry for the late reply... Thank you for the details, it helps me a lot :) Did you tried to check the ReturnValue of the ContinueToAddRoom function ? If the return value of this function is always false, then it will never generate the dungeon (only the first room). If this does not help you, then can you give me a minimal repro project ? (or your project directly if it isn't too big and you don't mind sharing it to me).

CheddarBear commented 3 years ago

I had the exact same print log when mine crashed, but it turns out i missed a step in the room creation so check if you added the corresponding level to your level parameter in the room data. image

WiseMatthack commented 3 years ago

I had the exact same print log when mine crashed, but it turns out i missed a step in the room creation so check if you added the corresponding level to your level parameter in the room data. image

I double checked that, but it still crashes... :(

WiseMatthack commented 3 years ago

Sorry for the late reply... Thank you for the details, it helps me a lot :) Did you tried to check the ReturnValue of the ContinueToAddRoom function ? If the return value of this function is always false, then it will never generate the dungeon (only the first room). If this does not help you, then can you give me a minimal repro project ? (or your project directly if it isn't too big and you don't mind sharing it to me).

I'm very sorry for the late answer too! I've been really busy recently... Here are my project files: https://drive.google.com/drive/folders/1oO7kNGX32peWcy8Di_3exTRLesv6fELl?usp=sharing

Acroviu commented 3 years ago

Sorry for the late reply... Thank you for the details, it helps me a lot :) Did you tried to check the ReturnValue of the ContinueToAddRoom function ? If the return value of this function is always false, then it will never generate the dungeon (only the first room). If this does not help you, then can you give me a minimal repro project ? (or your project directly if it isn't too big and you don't mind sharing it to me).

I'm very sorry for the late answer too! I've been really busy recently... Here are my project files: https://drive.google.com/drive/folders/1oO7kNGX32peWcy8Di_3exTRLesv6fELl?usp=sharing

I just fix your problem, you need to create a variable for the end room using different Data or it will crash: https://we.tl/t-09atG8CBIm I don't have space on my drive, the link will only be available for 7 days Hope this is helpful

BenPyton commented 3 years ago

Sorry for the too late reply, I didn't have the time to work on it...

I published a new release where I fixed the crashes, and instead log some explicit errors.

Your issue was you returned None in ChooseFirstRoomData (you linked your SpawnRoom variable to the return node of this function, but you didn't set it to a value other than None)

So to fix your issue you just need to fill your variables in your DungeonGenerator actor.