TRASHCLASS BTTask after recompiling player pawn

Hey guys,

I understand it’s a poor habit and does not serve the community well, but I’m reposting my answerhub question here, partially out of desperation:

Please read the question in the link above. This is clearly an engine bug (which I could not find on Unreal’s issues tracker, though), and it’s currently seriously undermining our development process: we have to alter the player pawn blueprint code, then restart the project, and only then we can test the altered player pawn code.

I have read that the TRASHCLASS issue is connected to circular dependencies, however I can not figure out why our player pawn class, which does indeed has a lot of code in it but has no references to skeleton class, after recompiling it in the editor makes skeleton’s AI BTTask blueprints TRASHCLASSes.

If you require additional info, such as stack traces or whatnot, I would be happy to provide it.


UPD: I have made another Behavior Tree asset, copying the nodes from the old one. Same crash with new beh tree! :frowning:

Ok, the issue has been fixed.

My BTTask_Attack was taking BB entry, getting actor out of it, casting actor to PlayerCharacter pawn and then calling method of that pawn class.

And that’s what caused a cyclic reference error

I replaced casting with interface call. Works fine now.

Pls fix this kind of stuff ASAP, it’s annoying :frowning: