Not sure how to debug this. I cannot figure out where its coming from. It doesn’t seem to effect the game. Thoughts?
the other form of IsValid()
has the branch built in, and should remove that error
And you are right it is the point of doing an IsValid()
test (this is the equivalent to in C++ writing if(MyPointer != nullptr)
) which ensure that it is “safe” to read the data the pointer (in blueprints you call them references, but they are pointers in the C++) points to; which avoids a “NULL REFERENCE EXCEPTION” being thrown by the runtime and the realistic best case scenario the program crashing. (yes, I mean what I just wrote)
the reason for it to show up as an Error
, but not a crash, in the blueprint output has to do with the safeguards blueprints have in place (by virtue of the Virtual Machine that Blueprint scripts get run through).
Because the graphical nature of blueprints unless the user can see the Error; it might not be reasonable for the Editor/Engine to show you the thing that would/did lead to a crash in a full build (in C++ we get: a file name, a line number, and maybe a “meaningful” error message)
this is probably to do with the version of IsValid() you are calling, because the No-Exec version tries to do a bit more then just a check against null pointer.
Thanks for the writeup and explanation. This is actually not my blueprint its epic blueprint. I suspect it has something to do with the physical animation component but unsure.
In anycase very much appreciate the explanation.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.