i’m getting the error ‘‘Blueprint Runtime Error: “Attempted to access TRASH_FloatingPawnMovement_6 via property FloatingPawnMovement, but TRASH_FloatingPawnMovement_6 is not valid (pending kill or garbage)”. Node: Set Speed Graph: EventGraph Function: Execute Ubergraph ABPlittlehover Blueprint: ABPlittlehover’’ after i close the game in engine.
Use IsValid node to check FloatingPawnMovement variable before use it…
(the same for ABPlittlehover variable)
I think it’s a multiplayer thing
Can you replicate that variable?
try it and see what happens
and if not, use it only when it is valid and do not worry about the other
Hey there @saitkayhan! Are you setting the AsBPLittlehover variable there every tick? This could contribute to multiple readings. Alternatively you may have to place some breakpoints along each point and step through it to see when and where it reflects as invalid.
First check you are printing strings from 1 actor and not from 2 (Editor).
is the editor an actor?..i was thinking one was client side and one was server side…i’m still a complete newbie
how to do that check? I’m very intrigued by it
i don’t know why but when i restart the engine same blueprint show NOT VALID all the time.
and when i quit the game is still gives me same error.
no it’s not a multiplayer thing. yes i could use it only when it’s valid but it’s not valid all the time now
i wonder this too @Roy_Wierer.Seda145
Could you check if the cast successful? You could use a print statement on both success and failure or breakpoints. (I’d recommend a breakpoint since your other print strings for the animation is going to fire constantly).
i disconnected the other print strings
in the animation blueprint viewport:
when i start the game(on the top left corner):
@SupportiveEntity
The man has the same animation instance as the jet skis?
Some nodes run in the editor. you should try to connect the input pin of “self” on the blueprint into the PrintString node and see if it prints multiple actor names during pie. Then you know.
Thank you very much for teaching this.
I think the connection is correct.
How many actors execute the anim instance?
I think the reason why the Casting fails is because there are several actors running that anim instance and they are of different types.
I had a situation where an IsValid on the world (UWorld) itself was flipflopping from true to false and I was certain there was a single actor. It was during Tick. Sorry I can’t be of more help on that one . In some context it is valid, in some it is not somehow the moment the method is called… My case this was PIE, offline and one player. As far as I know the Tick on such thing should never run in the editor so that rules that out.
Oh I found my issue by scanning some old code. This was back on 4.27.1
void USomeGameInstanceSubsystem::Tick(float DeltaSeconds) {
// Bug: the World variable switches between Valid and Invalid for some reason every tick (engine bug?).
// Getting the pause state is only possible with a valid world, so assume the world is paused unless we can get a valid state.
bool IsPaused = true;
if (GEngine) {
if (GetWorld()) {
if (!UGameplayStatics::IsGamePaused(this)) {
IsPaused = false;
}
}
}
if (IsPaused) {
return;
}
// DoStuff
}