As I understand it comes from ActorComponent’s RegisterComponent() function, but I have no idea which actor or which component could cause this Are there any ways to pin point the causing actor or resolve this error?
So what appears to be happening here is the actor that you are adding a component to (or attempting to) does not have a valid world for whatever reason. It could be an issue with order of operations, such as attempting to add the component is taking place before the actor has been initialized in the world.
Basically it’s checking to see if the owner of the actor component has a valid world, or else it sets the world to null. If the world is null, then the ensure will fail like you’re seeing in your logs. I’d recommend putting some IsValid checks in place (if you’re using blueprints) or making sure to check the validity of the world before spawning any actors or adding any components.
Hi, I don’t remember exactly what my issue was, but I know I was trying to call some function that needed to have a world reference on an object from inside the constructor. Moving that call to OnBeginPlay() fixed my problem, maybe that can help you too.
I moved the components I made in the constructor to BeginPlay() and they are no showing up in the cook output log. But it still fails with the same error, and this time the entire stack trace is in engine. link text