Editor crash on Get PC from Pawn Owner in AnimGraph
I'm putting this under bug report, though I don't know if that's the case or if it's my own stupid mistake. Also, I imagine this is the same on 4.13, but I haven't updated yet to check.
On 4.12, when trying to get the player character using the owner pawn for its world context in an AnimGraph, trying to compile will crash the editor. To be clear, I use the "Try Get Pawn Owner" and pass the result to "Get Player Character", then ideally use that to grab a value I need to check. I also cast the result of that to my character, but that doesn't seem to be causing any issues. Also, using the plain "Get Player Character" without input works fine and causes no crashes.
The worst part of this is that, if the above is done and saved before a compile and the crash, the editor will crash on start-up until the offending AnimBP is removed, with no chance to fix the issue or even get a crash report.
To begin, I still dont crash with what you said about the moving Get Player Controller references. But, with that in mind, I do want to explain something to you because the way you are using these nodes makes me think that you don't fully understand what they are for.
This as example is going to try and get the Pawn owner and then use that as the reference point to try and get the Player Character. Which, simply, you do not need to do and if you do, may cause issues as to what you are seeing. To further explain, this is the function for TryGetPawnOwner:
This is going to try and get the PawnOwner from a SkeletalMesh reference. So, as an example, if there is no SkeletalMesh reference, the function will return NULL then NULL will be used as the World Context Object, resulting it a crash because NULL won't be able to find anything.
Try to use these nodes for what they are and don't try to connect one to another just because they can be. Look into the use cases for these different nodes and read on what they do.
I do not believe that the crash you are experiencing is a bug with the Unreal Engine. Instead, I suggest going through your project and tracking down instances where Blueprint or C++ is being used in a way that is either deprecated (out of date) or where you could be use a NULL reference to try and do something else.
Good luck with your project.
I am not sure how you are able to compile your project. I am using 4.12.5 and these were the issues I had to fix before the game would launch:
[DefaultCharacter.cpp] line 29:
[DefaultCharacter.cpp] line 38:
[DefaultCharacter.cpp] line 98:
[DefaultInteractable.cpp] line 13:
[EquipmentProjectile.cpp] line 16:
And, in regards to your crash, I ran through your game for 5-10 minutes and didn't experience any errors or crashes. With that said, I am not sure what else I can do unless you can give me some more information as to why you think the crash happens.
Please let me know.
answered Sep 20 '16 at 06:00 PM
ImVawx ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here