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:
- Create a code class (this will act as the player character)
- Inherit a blueprint from that code class (this will act as the TCharacter)
- Create another code class and inherit another blueprint from this code class (this will act as the Shield)
- Create a blueprint that does not inherit from a code class (this will act as the action dispatcher)
- Have the TCharacter create and hold references to the Shield and Action Dispatcher, also pass a reference to the TCharacter to these new objects.
- 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!