Accessed None error from Set node, after IsValid returns true

Hi all -

I am currently using UE 4.6.1

I am having an irritating issue with my Anim Blueprint. My objective is to pass over animation control variables (such as enumerations and IK target locations) from the pawn owner (whether it is a player or NPC) to my animation blueprint. As shown in the pictures below, I use “Try Get Pawn Owner” and verify it is valid. Then I cast it to my game’s character class to start retrieving the variables. Unfortunately every time I start the simulation, I get a set of four errors at the beginning, then they stop coming and everything works. Yet UE4 will pester me about the errors every time I exit simulation.

Here are the errors I speak of:

  • Error Accessed None ‘CallFunc_GetPlayerCharacter_ReturnValue’ from node Set Look At Rotation in blueprint robo1_AnimBlueprint
  • Error Accessed None from node Set Look At Rotation in blueprint robo1_AnimBlueprint
  • Error Accessed None ‘CallFunc_GetPlayerCharacter_ReturnValue’ from node Set Look At Rotation in blueprint robo1_AnimBlueprint
  • Error Accessed None from node Set Look At Rotation in blueprint robo1_AnimBlueprint

“Look At Rotation” is one of the control variables for rotating the head while aiming. And the variable works in simulation, the errors stop once 4 of them have occurred. I find that if I replace the accessor node for that variable with a duplicate of itself, the errors will switch to a different control variable. Yet when I keep doing that for the next variable, and the next, and the next, it will just go back to the original variable it took issue with. All the time when I click on the error, it will bring me to a “Set” node of the variable it had a problem with.

It is almost as if it is giving me the “pawn owner” and telling me it is valid, before it is actually ready to operate, giving me null data. Just the fact that it gives me null information, even after it promised validity, suggests buggyness.

I guess I will just have to wait for 4.7 to roll around. However if anyone could offer advice on this I would appreciate it.

28590-p1.png

My experience has been there is a bug in the error message reporting. You do have a bug accessing none somewhere, but the place it reports in the logs is usually(always?) wrong. It’s totally confusing and makes it even harder to track down your error by pointing you in the wrong direction. My best success so far is to just disconnect parts of my blueprints until the error goes away, and then progressively narrow it down from there.

Why they did not just give the debugger the option to auto-breakpoint on this error I’ll never know. Good luck!

Your methodology worked! I was able to narrow it down to a call to get the player, instead of the owner pawn, to get the rotation. I hooked it up to the casted owner pawn and it currently works like a charm! Thanks a ton!