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 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.
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.
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
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!
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.
thanks for your answer! 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.
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?