TRASHCLASS Crashing after compiling Animation Blueprint

Hello. I have a serious issue: I created an Animation Blueprint for my character (It’s parent class is UE4’s Anim Instance), and i’ve been setting the basics for the Graph, and i detected a bug that directly crashes Unreal. So first I had this blueprint:

It was working perfectly and if i compiled everything was kept in order. But i wanted to add a bit of a code to it, just the following:

And boom! After writing this nodes when i compiled the program crashed and sent the crash message that i copied below. The worst is that even erasing the nodes it just broke and even if going back to the beggining it crashes everytime.
It says there’s a ‘boolProperty’ that for some reason is just broken, and makes it a Trashclass. I even rewrote the Animation Blueprint (copying what i had, and cleaning the references with the Redirector Fix) and the same thing happened: first it worked and after adding the extra line, it didn’t.

Any ideas why this is happening? Thanks in advance!

PS: I’m using a GitHub branch (might have some conflict with Epic’s Master one) but i’ve seen other people having similar issues in the original UE4 versions, so i decided to report it too, maybe the solution is easier that thought!

Greets.

Assertion failed: ((UObject*)ContainerPtr)->IsA((UClass*)GetOuter()) [File:E:\Apps\GitHub\UE4GitHub\UnrealEngineToonShading\Engine\Source\Runtime\CoreUObject\Public\UObject\UnrealType.h] [Line: 311]
‘AnimBP_Nera_C_0’ is of class ‘AnimBP_Nera_C’ however property ‘BoolProperty_81’ belongs to class ‘TRASHCLASS_AnimBP_Nera_47’

Hi again! I wrote the WHOLE Animation Blueprint from scratch and it the problem is apparently fixed now. Still, i’m a bit afraid it happens again -because there was no real reason for it to happen-, and i guess it is not out of scope to still look for a solution to it. Anyway i wanted to inform about it just in case anyone is doomed trying to think of a solution.

Okay, bad news again referring to this. I was modyfing one of the State Machines, adding it a functional logic of ‘less than this float value, set the bool to yes’, and after setting it i came back to tweak it and when compiling the program crashed again. And now the crash report talked about a ‘FloatProperty’ instead of a ‘BoolProperty’ becoming the Trashclass whatever.
I’m starting to get a hint of a pattern here: whenever -sometimes- i set something and later come to modify it, it crashes! If i want to change values for some reason i need to erase things and write them again (like changing the value makes it crash).

Hello,

If you are getting a crash, could you please provide your Machine ID from the Crash Reporter window and ensure that you hit send on the crash report?

Hello,

I am marking this post as resolved for tracking purposes, as we have not heard from you in a few days. If this issue persists, feel free to respond to this thread. For any new issues, please create a new Answerhub topic.

Have a great day

Ive been in this situation in 4.22.2 the same way and this really drives me crazy.
I bought a plugin that aftering creating new project,this appear randomly at first and after times it must come out certainly after compile a blueprint,or a associated blueprint.Like this:
LogWindows: Error: Assertion failed: ((UObject)ContainerPtr)->IsA((UClass)GetOuter()) [File:D:\Build++UE4\Sync\Engine\Source\Runtime\CoreUObject\Public\UObject/UnrealType.h] [Line: 363] LogWindows: Error: ‘ABP_WraithMain_AI_C_0’ is of class ‘ABP_WraithMain_AI_C’ however property ‘MoveRightScale_8’ belongs to class ‘TRASHCLASS_ABP_TPSKit_InstanceCustomAI_257’

There s no way to fix it whatever I did.Recreate,redirect parent,new critical error like this will show up,on New Anim Instance.

Ive been in this situation in 4.22.2 the same way and this really drives me crazy. I bought a plugin that aftering creating new project,this appear randomly at first and after times it must come out certainly after compile a blueprint,or a associated blueprint.Like this: LogWindows: Error: Assertion failed: ((UObject)ContainerPtr)->IsA((UClass)GetOuter()) [File:D:\Build++UE4\Sync\Engine\Source\Runtime\CoreUObject\Public\UObject/UnrealType.h] [Line: 363] LogWindows: Error: ‘ABP_WraithMain_AI_C_0’ is of class ‘ABP_WraithMain_AI_C’ however property ‘MoveRightScale_8’ belongs to class ‘TRASHCLASS_ABP_TPSKit_InstanceCustomAI_257’

There s no way to fix it whatever I did.Recreate,redirect parent,new critical error like this will show up,on New Anim Instance.

At start it show up randomly,the more time it shows up the more it becomes frequently.At last every compilation associated with AnimInstance will cause this crash.

And there’s no coming back, once it show up,never it ends.

Hello ycz, it’s a pitty you are having this issue, i posted the original question 2 years ago already! The problem was fixed for me when changing to the next engine version from the one there was back at that time. But in the meantime i had figured a way in which i could at least WORK without getting crashes.
What i did was UNHOOK the main, Final Animation node in the anim graph of the Anim BP → Then compile your new changes, etc (but this will be with no Final Animation; so just like a blank anim bp with a T-Pose), then HOOK it again to the Final Animation and compile again, and at least to me it worked; no crashes and my changes made.
I know it’s weird! But it’s what i got at the time. Also erase the “Intermediate” and “Saved” folders of your project; maybe some trash is affecting the cache (which you can also erase but you’ll have to wait for shaders to recompile from scratch again and etc).
Hope it helps you at least on keeping on working!
But remember to simply try another Engine Version further on.

Also before trying my weird solution that might not work, try this one first. It might be more solid… do the following:

Use the ON ANIMATION INITIALIZED EVENT to set your Pawn Owner as a referenced value (a variable). Make sure to use the Is Valid node before! And during update (tick), always use the referenced value you created at initialization.

As AnimBPs are part of the Game Framework for characters and skeletals, they are created following certain orders.

So maybe updating before initializing the ANIMATION itself in the skeletal mesh founds the error and calls it a trashclass (no reference for that pointer, in C++ terms). Use this node to just get the correct values during initialization! And i guess you had done it but make sure your character (that’s using this Anim BP) has it’s mesh set to use the anim bp! (Animation Mode, in the Mesh’s details inside the character).

Good luck!