Assertion failed: IsValid() [File:...\UObject\WeakInterfacePtr.h] [Line: 133]

Hi!

I’d like to ask for help with a recent problem of mine. Keep in mind that iam still a noob and only using blueprints so far.

Recently i started to get a crash with the following message when playtesting:

Assertion failed: IsValid() [File:D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Public\UObject\WeakInterfacePtr.h] [Line: 133]

Probably its connected to my AI character or to my AI Controller or both. But it might be something totally different, Iam not sure, but it seems like it happens when I have AI in my test level. Sometimes it happens after 2-3 seconds after pressing play other time it didn’t even happen during the whole playtest.

I had a simple Collision sphere component that activated the AI with Begin Overlap, which i wanted to change to AI Perception with Detection by Affiliation (by Tags as its the BP only way currently). I created an AI Controller with almost only AIPerception in it. My AI was blueprint only before without my own controller, but worked well* so far, with all the logic in it.

Crash log:

UECC-Windows-971B094B419B108183C167AD48319A81_0000.rar (188.2 KB)

For now, I’d just like to solve the crashing and later I’ll improve the things further. I know there’s a lot to do.

My AI controller:

Soldier AI Controller posted by anonymous | blueprintUE | PasteBin For Unreal Engine

My BP Solider starts like this (and Begin play sets many variables of mine):

BP_Soldier posted by anonymous | blueprintUE | PasteBin For Unreal Engine

I hope you can enlighten me.

Regards,

Patrik

ok, I see that on the BP_Soldier i Set the variable even with the Failed. I removed that, but the crash still happens with the same message.

I am not really sure that this is the problem but let’s fix it anyway and try again.

  1. Self can never be invalid. If it is, the blueprint you are using will have been stopped already.
  2. I think the default pawns get registered automatically so you don’t need that node if you’ve derived from a pawn.

Just nuke the whole thing to humor me and tell if it fixes your crash.