Sinple to answer for the veterans: I can't read the log entry of an error - Can someone help?

Yello,

I get this line:

Blueprint Runtime Error:
“Attempted to access BP_Pistols_B_Pickup_C_UAID_088FC365B286D41C02_1596624377
via property K2Node_DynamicCast_AsBPI_3rd_P_Pistol_Outline_Off, but BP_Pistols_B_Pickup_C_UAID_088FC365B286D41C02_1596624377
is not valid (pending kill or garbage)”.
Node: 3rd P Outline Off Graph: EventGraph Function: Execute Ubergraph BP Third Person Character Blueprint: BP_ThirdPersonCharacter

I read, that it has something to do with my blueprint interfaces. I show you what I have:


[This is part of an “If both actors overlap and player looks at item, them highlight item with a golden glow” thingy. I used 2 blueprint interfaces in order to communicate with the parent BP class of the item (parent, because I want every type of item to glow, not just that one)]


[This is part of the event graph of the parent BP class of the item blueprint class]

I use 2 separate BP interfaces to communicate from the third person character BP to the parent BP class to activate the glow overlay material or deactivate it again.

I suspect, that the error is caused by my use of the BP interfaces, but since the interfaces are unchanged and contain absolutely nothing whatsoever, aside from the purple node it already comes with, I don’t know what the problem could be. Does anyone have an idea?

Before calling Set Overlay Material do a isValid check on Pickup Object.

BP_Pistols_B_Pickup seems to probably be picked up and destroyed and it was probably the last thing pickup object was set to.

Or better yet check if the object is valid before calling the interface for on / off on the outline to save some CPU cycles.

I see. I was checking for the isValid thingy, but there are so many:

I’m sorry, I probably sound like the dumbest of them all. But my knowledge is not yet sitting on a tight saddle.

Like this?

Although, the error persists

Ok, I read your edit.

I now did this isValid thingy in the third person BP:

This did the trick. It puts out no error log at all. Thank you. I’m going to mark you as the answer.

1 Like