(Turned this into a bug report after some testing)
In Blueprint, casting from a Child Actor component to its parent actor causes projects to crash on load, even if the cast works just fine.
How to reproduce:
Create a new project (can be based on a template).
Create a new Blueprint Actor class to act as the child.
Create another new Blueprint Actor class to act as the parent.
Attach the child to the parent through a Child Actor component.
Open up the child actor and have it cast to the parent. Doesn’t seem to matter how or when you do it, so long as the cast succeeds. I like to use Get Parent Actor → CastTo.
Compile both blueprints.
Place the parent actor in the level if necessary.
Confirm the cast works.
Save all.
Relaunch the project and watch it crash as it finishes loading.
I had a friend successfully reproduce the issue on his installation of UE4 so I can confirm it’s not just me.
Editor log is attached. Let me know if you want more.
Get Parent Actor → Cast to SpaceshipPawn, but I’ve also tried Get Parent Component, Get Owner, and combinations of the three. Either they return the wrong class, or crash on load.
Great, thanks! Just a small clarification: the bug doesn’t only happen when using Get Parent Actor. Any input that returns the parent will trigger it, even Get Player Pawn etc.
Please reopen the bug, I too have managed to reproduce the crash in 4.14.1 under similair circumstances and can confirm with a great level of certainty that it is infact still there…
Yeah I just reopened a bug report… I reproduced this issue and can confirm it remains a problem in at least 4.14.1. Different methods of getting the owner have the same result…
Currently there is no set release date for 4.15. The other thing you could do is if you are using a source build, merge the fix commit into your engine.
SkyInAPond, I was able to get around this and keep working by going into my project folder and removing the parent blue print that was causing the crash. I then was able to open the project, modify the child blueprint to no longer have the reference to the parent, then close the project and paste the parent blueprint that I had removed back into the folder I had taken it from. This removes all placed instances of the parent blueprint from levels but I now have a working project without losing any of my work. I will just have to work on other things until this fix is released. Good luck.
I have the same issue. I have a child actor BP that I have in my first person BP. If I cast to my First Person BP within the child actor, UE4 will crash on next start up.
I have to go into the windows Content folder and remove the child BP that way just to access my project again. This needs to be fixed asap, please!