Fatal Error! after spawning a blueprint

Hi there,

for more information see the posts starting here.

I’m starting with the project here, this one is working, the other one (located here) does crash.

To get the error, follow this:

Hook Spawn Actor from class to beginplay from BP_RTS_Controller with a default transform and class BP_RTS_Previewbuilding.

Compile,save, test, exit.

Restart and you get the error.

Am i doing something wrong or is this a bug?


Ill get situations like you’ve mentioned. Touch interfaces can cause crashes too, but everytime its been an error that i created. Id duplicate your blue print then start deleting stuff or reset settings to default until it will run. Maybe you can identify the problem. Thats what i do.

Thanks for the suggestions, i tried that and thought that fixed it. Turns out it didn’t and i’ll start all over again in case i’ve missed something.

Hey Thommie-

The crash is caused from an circular reference being created when the controller spawns the PreviewBuilding BP instance. The OwnerPC variable creates a reference to the controller that is spawning the PreviewBuilding BP which creates the OwnerPC variable (and down the rabbit hole you go). The simplest solution would be to do the location calculation in the Controller and have the controller tell the actor where it is and if it can spawn there.


Doug Wilson

Right, thanks Doug i’ll give it a try. If OwnerPC would be a PlayerController would this still happen? I know i don’t really need a reference to the PC with what i’m currently doing but i’m just curious.