UE crashes after behavior tree tests

Hi guys,

I have a rather problematic issue. I currently work on a 2D arcade-style space shooter. 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 behavior tree system and see whether this would be an option for enemy movement (or whether it would be over top for a simple 2D game and easier to just implement behavior by myself).

I got behavior tree logic working and got to bed quite happy a few days ago. But when I opened up project next day, whole engine just crashed. Not leaving me any other options, I restored old versions from autosaves and deleted any signs of and references to behavior tree (including AI controllers). I could open project again and even play game in it’s current state, but now 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 original “Pawn” as Parent. Then I derived two childs from it (Characters and Shots). All actors for game should be based on either character- or shot-class. But when I now try to compile “Entity” Blueprint, 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 content, and it still crashes. Of course it is only a guess to think behavior tree guilty for problems. But could it be that there is some code left that I can not see in Blueprint editor?

I also tried to recreate Entity class from scratch, call it “EntityPawn” and parent other BPs to new class, but during parenting process it crashed again. I am beginning to think that 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 crash reports for…

Compiling “Entity” BP:

!Id:7efc28d8ec74613e176067166e0c0275

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

Reparenting 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 triple post, but I just remembered that I took another screenshot when 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 exact information of how I did it, but I could upload project, if you still need that repro.

From 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 problem still persists. I managed to fix it temporarily by replacing some BP classes with older versions, but project keeps crashing when I continue development. When adding new functionality to players and enemies, every now and then I have to replace PlayerController or other classes with older versions, because UE4 decides to crash when I try to open it. After finding and replacing BP containing unknown issue, I can go on, but only for a while before it happens again with another class.

Interestingly enough, 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 delay in response. I will contact framework team again with your information in case this got lost somehow. In meantime, please 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 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, data is thankfully not corrupted. crash is to prevent data corruption from happening. So, your project is fine, hopefully 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 ,

thanks for your answer! :slight_smile: You are right, we startet at 4.3 and I updated project to 4.4 a few days ago. Since then amount of crashes decreased noticeably! I think we can go on working on project now. If crashes should increase again in 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 logs, but it appears it might be related to a serialization mismatch for /Game/Blueprints/Weapons/TestShot. If you open up 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 last week.

I tried recompiling TestShot and it’s parents, but crash just appeared again when I closed and re-opened project (I do this every now and then, because it is currently only way to make crash occur). There are a lot of file-not-found errors in 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 trigger is?

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

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

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

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

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