What is "REINST_" and why is it occuring?

Please see the image. UE4 4.5.1.

Behaviour Tree with service: works fine.

Close and load editor: BT doesn’t do anymore. Cause: Service is now called “REINST_BLABLA”.

Re-adding the service and saving: all works again.

Clicking on the “REINST_” Blueprint crashes the editor. This stuff is a real PITA!

The service:

I have this exact same issue with my project and it is super frustrating. Two services in one project on two separate behavior trees. One works great and the other does not. Both services have roughly the same amount of complexity. The only difference is that the Pawn & AIController were programmed in C++ for the one that works, and the one that does not work was done totally in blueprint for quick prototyping - following the same design pattern of having a pawn & and a controller blueprint-derived classes. To be clear: the behavior tree, services, and tasks were all in blueprint…

I’m going to try replacing the classes I have done in blueprint with C++ classes. This really should not change anything at all but is the only interesting difference between the two behaviors. I’ll post back my results but that may be several days. I’m also archiving a copy of my project before and after in case it works so that I can submit it to someone at Epic for review.

Apparently it happens because of a circular dependency in the blueprints. I tried looking at the reference viewer (right click behavior blueprint->referenceViewer) but could not find a circular link myself.

Similar to jjlanley, I have a task that is shared among units but because overriding functions in parent blueprints is broken I had to make a switch case for every thing using the task so I could call the proper implementation. In one case the cast would cause a REINST to appear. But not on any of the other.

Thank you both for your comments. I replaced the cast with an interface and the problem is gone.
But that shouldn’t be the only solution. I hope Epic will fix the blueprint stuff.

making it an interface actually fixed our problem too. Good tip.

Im really confused about how interfaces can replace casts…how do you get the target object you want to send the message to?

Hi

You will find a pretty useful guide to using interfaces here: https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/Types/Interface/UsingInterfaces/index.html

Interfaces are a way of associating functions to an actor. Getting the target object you want to send a message to is similar to casting. You will need a way of referencing the actor (ex. Return on a line trace, Get Overlapping Actors etc) just like when you want to cast to an actor, except it will not be dependent on the actor type as to whether you can attempt to call the function.

We’re actually going to be covering Casts and BP interfaces today on the twitch stream: Support Stream - Blueprint Optimization - May 19th - Announcements - Epic Developer Community Forums

I hope that helps!