TRASH CLASS bug when updating from 4.8 to 4.9

Branch: Binary Build

Build Version: Version: 4.9.0-2672455+++depot+UE4-Releases+4.9

Description:
I am a University Lecturer and am currently in the process of creating content for a module to be run during the following semester. The content is created using Blueprints. I have created a class hierarchy for a characters abilities :

       Ability
               CastableAbility
                        AmmoAbility
               ToggelableAbility
               TriggerableAbility

There are a number of functions created in the parent class that are overridden in order to include new custom functionality. Examples of these are Init, UseAbility, etc.

Recently I updated this project from 4.8 to the new 4.9 to take advantage of the new Timer handle functionality. However, when I open the project now I get the following error:

Error This blueprint (self) is not a TRASHCLASS_Ability_72, therefore ’ Target ’ must have a connection.

[Screenshot of bug][1]

Repro Steps:

  1. Open the project
  2. Press play
  3. Stop playing
  4. Open the Blueprint class with the error
  5. Press Compile
  6. Error occurs

To solve this problem I have to go into the parent class (in this case the parent of AmmoAbility is CastableAbility), change anything in the parent function, compile, change it back, compile again.

This is OK, however when the students get their hands on the framework there will be multiple Abilities that this will have to be done for, which as you can imagine is not ideal.

I have found one way to solve the problem, but again it is not ideal. If you open the Blueprint class (in this case AmmoAbility) before you play in editor. The error does not occur.

Thanks for your help ! It would be great if I could get this fixed asap, as the semester starts in a few weeks time !

System Info:


System Information

Time of this report: 9/3/2015, 15:52:52
Machine name: DOM-PC
Operating System: Windows 8.1 Pro 64-bit (6.3, Build 9600) (9600.winblue_ltsb.150715-0840)
Language: English (Regional Setting: English)
System Manufacturer: ASUS
System Model: All Series
BIOS: BIOS Date: 07/11/14 16:15:08 Ver: 22.02
Processor: Intel(R) Core™ i5-4690K CPU @ 3.50GHz (4 CPUs), ~3.5GHz
Memory: 8192MB RAM
Available OS Memory: 8136MB RAM
Page File: 6224MB used, 10102MB available
Windows Dir: C:\Windows
DirectX Version: DirectX 11

Hi Pixeldead,

Does this occur in a clean, blank project with no additional content or is it limited to one project? What steps can I take to reproduce this on my end?

Hey ,

I have tried creating an entirely new project and migrating the Blueprints in question over, but the same error occurs. I shall upload the project and get a link to you as soon as I can.

Hi Pixeldead,

Have you had any luck with the project upload? Do you have any steps I can try taking in the meantime to recreate this error?

Hi Pixeldead,

We have not heard from you in several days. I am marking this thread as answered for tracking purposes. If you are still experiencing this error, please comment back with the requested information.

I get a similar error in 4.9.2.

I also have a tree of ability components, the top of which is a C++ class.

61126-abilitycomponents_new.png

In UnitAbilityComponent_BP, I added a custom event OnActionFinished and some code in reaction to the event.

If I add the same event to the EventGraph of the AttackAbilityComponent, the child components MeleeAbilityComponent and RangedAbilityComponent (whose EventGraph is empty) throw a TRASHCLASS compile error. At first I thought this was linked to calling the parent event, but no, it happens whether I add content to the event or not.

The only way to get the classes to compile is to first compile UnitAbilityComponent_BP and then AttackAbilityComponent (neither of which are flagged as needing a recompile). The child classes will then also be compiled correctly. These steps have to be taken whenever the editor is reopened.

The OnActionFinished is triggered from within the ability components (and no other classes), always from TryExecutingAction, a function also first defined in UnitAbilityComponent_BP but overloaded in each of its child classes.

I’ve been unable to reproduce this in a clean project so far. In fact, I’ve been unable to reproduce it with any other event…

Hi ,

Thank you for the information here. If you are comfortable with it, could you send me a copy of the assets in question or a project where this is occurring? I’ll be happy to take a look and see what may be occurring.