TRASHCLASS error on editor load

I’m having a similar issue to what was described here:

[Link][1]

I have the following hierarchy:

C++: Base Combatant

BP: Combatant (child of Base Combatant) - Has function Take Damage

BP: Base Character (child of Combatant) - Overrides Take Damage

BP: Base Enemy (child of Combatant) - Overrides Take Damage

BP: Ronin (child of Base Character) - Has an ability function that calls Take Damage on a combatant

In short, the Ronin class has a function that uses a Combatant as a target and calls “Take Damage” on it. When I reload the editor, this call breaks and throws warnings. I can fix it by recompiling Combatant and Base Character (in that order), however, every time I load the editor the problem comes back.

Following is an image of the BP and warnings it gives me:

I think this is a bug, but I could be wrong.

Hello,

Could you please show me how you are populating the Tgt, Damage, and Crit variables?

I was able to “solve” the problem I was having by working around it an using interfaces, but the issue itself still exists. Because of these changes, I had to go back a couple of revisions to find the error. Because of this there are some differences. However, the core issue is still the exact same.

Class structure:
DefaultCombatant-DefaultCharacter-Ronin
DefaultCombatant-DefaultEnemy

Here is one of the functions calls:

74021-image1.png

Here is Trgt (DefaultCombatant) getting assigned, as well as the details to show the input and variable types:

Here is the chunk of the blueprint where the crit bool gets assigned:

This is the last time Damage gets assigned (it undergoes a series of changes throughout the blueprint based off various formulas):
[alt text][4]

I’ve also attached the entire BP as a text file. Not sure if it will help or not (especially as there’s some calls to C++ functions in there), but I figured it couldn’t hurt.

Thank you for providing the information. I have a few questions regarding this issue:

  • Is Trgt a local variable, or a regular variable?
  • Are you ensuring that you are passing in a value that is valid?
  • Have you been able to reproduce this issue in a clean project?
  • Do you have any steps that we can follow to reproduce the issue on our end?

Trgt is a local variable. The variable is valid, because I perform a lot of other actions with it within the same function. I spent a while tonight trying to repo the bug from a clean project, but can’t manage to do so. So either it was ironically fixed in 10.2, or the bug is due to me mucking something up in my original project when creating all the classes.

Hello,

We are going to mark this post as resolved for the time being, as neither you nor I have been able to nail down a solid repro. If you manage to identify the repro steps, feel free to respond to this thread.

In the meantime, I recommend converting a copy of your project up to 4.10.2 and seeing if the issue is still occurring in your original project, as it is possible that the issue was fixed in 4.10.2.

Have a great day