UE crashes after behavior tree tests

Hi guys,

I have a rather problematic issue. I currently work on a 2D arcade-style space shooter. The basics are working, you can move, shoot and destroy enemies, as well as recieve a score for destroying them. After implementing all of this (Blueprint only), I wanted to check out the behavior tree system and see whether this would be an option for enemy movement (or whether it would be over the top for a simple 2D game and easier to just implement the behavior by myself).

I got the behavior tree logic working and got to bed quite happy a few days ago. But when I opened up the project the next day, the whole engine just crashed. Not leaving me any other options, I restored the old versions from the autosaves and deleted any signs of and references to the behavior tree (including AI controllers). I could open the project again and even play the game in it’s current state, but now the engine crashes on me on several occations (sew below), which make it impossible to work on it anymore.

I initially created an own “Pawn” class for my game, which I called “Entity” and which has the original “Pawn” as Parent. Then I derived two childs from it (Characters and Shots). All the actors for the game should be based on either the character- or the shot-class. But when I now try to compile the “Entity” Blueprint, the Engine closes with an error.

You can find a pic of my “Entity” BP attached. As can be seen, there is not much in there. I tried to delete all the content, and it still crashes. Of course it is only a guess to think the behavior tree guilty for the problems. But could it be that there is some code left that I can not see in the Blueprint editor?

I also tried to recreate the Entity class from scratch, call it “EntityPawn” and parent the other BPs to the new class, but during the parenting process it crashed again. I am beginning to think that the whole project might be corrupted in some way (?).

I really don’t know how to proceed :confused: I don’t want to start all over again. Hopefully you guys can help me. If you need any more information, please let me know.

Here are the crash reports for…

Compiling the “Entity” BP:

!Id:7efc28d8ec74613e176067166e0c0275

We apologize for the inconvenience.
Please send this crash report to help
improve our software.

Reparenting the character BP:

!Id:7efc28d8ec74613e176067166e0c0275

Unknown exception - code 00000001
(first/second chance not available)

Assertion failed: ChildBP->ParentClass
== ClassToReinstance || ChildBP->ParentClass ==
DuplicatedClass
[File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.3\Engine\Source\Editor\UnrealEd\Private\Kismet2\KismetReinstanceUtilities.cpp]
[Line: 4

KERNELBASE + 37901 bytes
UE4Editor_Core + 3009507 bytes
UE4Editor_Core + 1775850 bytes
UE4Editor_Core + 1703584 bytes
UE4Editor_UnrealEd + 8900331 bytes
UE4Editor_UnrealEd + 8615313 bytes
UE4Editor_UnrealEd + 8733539 bytes
UE4Editor_Kismet + 565767 bytes
UE4Editor_Kismet + 1238497 bytes
UE4Editor_Kismet + 1047384 bytes
UE4Editor_Kismet + 794184 bytes
UE4Editor_Kismet + 813725 bytes
UE4Editor_ClassViewer + 354998 bytes
UE4Editor_ClassViewer + 272225 bytes
UE4Editor_ClassViewer + 275302 bytes
UE4Editor_ClassViewer + 273745 bytes
UE4Editor_ClassViewer + 400949 bytes
UE4Editor_ClassViewer + 375715 bytes
UE4Editor_Slate + 653625 bytes
UE4Editor_Slate + 612793 bytes
UE4Editor_Core + 2986717 bytes
UE4Editor_Core + 2919937 bytes
UE4Editor_Core + 2991007 bytes
UE4Editor_Core + 2908962 bytes user32

  • 105425 bytes user32 + 104666 bytes UE4Editor_Core + 2992022 bytes
    UE4Editor!FEngineLoop::Tick() + 2990
    bytes
    [d:\buildfarm\buildmachine_++depot+ue4-releases+4.3\engine\source\runtime\launch\private\launchengineloop.cpp:2066]
    UE4Editor!GuardedMain() + 476 bytes
    [d:\buildfarm\buildmachine_++depot+ue4-releases+4.3\engine\source\runtime\launch\private\launch.cpp:133]
    UE4Editor!GuardedMainWrapper() + 26
    bytes
    [d:\buildfarm\buildmachine_++depot+ue4-releases+4.3\engine\source\runtime\launch\private\windows\launchwindows.cpp:125]
    UE4Editor!WinMain() + 249 bytes
    [d:\buildfarm\buildmachine_++depot+ue4-releases+4.3\engine\source\runtime\launch\private\windows\launchwindows.cpp:207]
    UE4Editor!__tmainCRTStartup() + 329
    bytes
    [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]

Sorry for the triple post, but I just remembered that I took another screenshot when the first error came up. At that time I could still compile “Entity”, but got an InternalCompilerError (see picture).

I’m afraid I can’t provide you with the exact information of how I did it, but I could upload the project, if you still need that repro.

From the data you provided I can say your problems have nothing to do with Behavior Trees. I’ve notified framework people about this. They will answer as soon as possible.

–mieszko

Dear framework team,

as I have not yet recieved an answer, I would like to point out that the problem still persists. I managed to fix it temporarily by replacing some BP classes with older versions, but the project keeps crashing when I continue development. When adding new functionality to players and enemies, every now and then I have to replace the PlayerController or other classes with older versions, because UE4 decides to crash when I try to open it. After finding and replacing the BP containing the unknown issue, I can go on, but only for a while before it happens again with another class.

Interestingly enough, the project always works fine until I close it and try to open it up again.

Any suggestions? This is really hindering development :confused:

Hey Artax,

Sorry for the delay in response. I will contact the framework team again with your information in case this got lost somehow. In the meantime, please zip and attach your crash log files for this project after a fresh crash. Thanks!

Hey Artax -

It sounds like you have a cyclic dependency crash. Which version of the engine are you on? We’ve been attacking these, and lots of fixes have gone in to 4.3 and 4.4. If you try opening up your project in one of those, it may already be fixed.

With these types of errors, the data is thankfully not corrupted. The crash is to prevent the data corruption from happening. So, your project is fine, hopefully the later version will be able to open it.

If it doesn’t work in those cases, we’ll need to get your project to debug locally here.

Hey Nick,

thanks for your answer! :slight_smile: You are right, we startet at 4.3 and I updated the project to 4.4 a few days ago. Since then the amount of crashes decreased noticeably! I think we can go on working on the project now. If the crashes should increase again in the future, I will get back to you.

They are, however, not completely gone. Attached are two log files from different crashes, just in case they might be of any help to you guys.

Hard to tell from the logs, but it appears it might be related to a serialization mismatch for /Game/Blueprints/Weapons/TestShot. If you open up the editor, and compile and resave that BP, and it’s parents, does that help at all?

This time my answer is late, sorry for that. I had to work on a different project over the last week.

I tried recompiling the TestShot and it’s parents, but the crash just appeared again when I closed and re-opened the project (I do this every now and then, because it is currently the only way to make the crash occur). There are a lot of file-not-found errors in the log, however I don’t know how to make any sense of them.

Log file

Might this still be this cyclical dependency crash? Is there a way to avoid it, maybe a workaround? Or maybe a way to find out what exactly the trigger is?

Okay, I have now found a way to reproduce the crash. Or at least one of them, I am not sure whether there is only one such issue.

The cast-to node you can see in the attached screenshot always starts unconnected when I open the project. When I wire it to the surrounding nodes, I can compile it, but the next time I save and close the editor, it unlinks itself again. However, when I delete the node, create it anew and klick on compile, the InternalCompilerError occurs and the next time I try to re-open the project, it crashes on startup, producing the filename-not-found log file (see above).

In my opinion it is unlikely that the NTTController itself is the problem, as it can be easily casted in every other BP. I tried to just delete the whole commented area and recreate it, that seemed to solve the problem, although of course I don’t know if it really did. Would you like me to upload the project?

In any case, thanks a lot for your time, guys!

We submitted a fix for this today in CL 2292615. Thanks for the repro!