Editor Crash on load when referencing a blueprint owned by another

Hey All,

Branch: Source build from Github Master branch revision #297

Build Version: 4.4.1-0+UE4

Description: There is a blueprint TCharacter that inherits from a code class base ‘PlayerCharacter.cpp’ this TCharacter blueprint owns references to other blueprints that act as components for the TCharacter (such as weapons, logic groupings and other objects that handle modular functionality) one of which is ‘Shield’ a blueprint that inherits from a code class ‘ShieldBase’. There are components that do not inherit from code basses such as our ‘Action Dispatcher’. These components are Initialized and assigned to the TCharacter in the BeginPlay event, and a reference to the TCharacter is parsed to the components through a blueprint function ‘Assign Owner’ the initialization process can be seen as follows:

This is fine, these operations can be performed without any crash. However, if I reference Action Dispatcher (the non-code base component) inside of the Shield component through the TCharacter reference that is parsed during the ‘Assign Owner’ function a crash on editor load will occur. The operation for accessing the action dispatcher from within the Shield component can be seen bellow:

This will cause an Unhandled exception to occur upon compilation or running of the project. The exception takes place in the FReferenceFinder object in the function ‘HandleObjectReference’ from the GarbageCollection.cpp.

Reproduction Steps:

  1. Create a code class (this will act as the player character)
  2. Inherit a blueprint from that code class (this will act as the TCharacter)
  3. Create another code class and inherit another blueprint from this code class (this will act as the Shield)
  4. Create a blueprint that does not inherit from a code class (this will act as the action dispatcher)
  5. Have the TCharacter create and hold references to the Shield and Action Dispatcher, also pass a reference to the TCharacter to these new objects.
  6. Access the Action dispatcher reference within the TCharacter from the Shield blueprint.

This will cause a crash every time for me. If you are finding this hard to recreate I can look into uploading our project files.

Any help would be greatly appreciated!

Hi MurdoNZ,

Do you have any custom code interacting with these blueprints?

I haven’t been able to reproduce this in-house. You mentioned above that you would be willing to post your project. If you use Dropbox or Googledrive, you can send me a link by private message on the forums.

https://forums.unrealengine.com/forum.php

Hey TJ,

At that current revision of our project I had some blueprint native events defined in the ShieldBase code class. Yea I’ll happily load up our project, the revision I will be uploading is a little more up to date and I have adjusted how the shield blueprint interacts with its code base. I’ll include a readme in the project that has the up to date reproduction steps as well

Hi MurdoNZ,

I haven’t receive a PM to download your project yet. If you are still experiencing this issue, please post back and let us know.

Thanks,
TJ

Hey TJ,

Oh yea sorry about that! I ended up changing my design paradigm and moved many of our parent classes into code to correct this issue. My basic solution was to have all blueprints concerned with interaction to inherit from a code base class. These code classes would then be referenced by the blueprints, effectively encapsulating the blueprint functionality.

No problem, I’m just glad you got it sorted out. Good luck with the rest of your project.

TJ