I used the code you provided to make a custom Static Mesh Component class, but did not see any problems when I added it to an Actor Blueprint and started PIE. Would you be able to clarify exactly how you are adding it?
When I add the pure c++ component to a blueprint it works fine, but when I add a blueprint component which inherits from the c++ class the engine will crash with the error mentioned above.
Thank you for the clarification. I believe I am seeing the same thing that you described, but would it be possible to get the full callstack that you receive so I can compare that to what I am getting?
I have entered a report of the Ensure that I was seeing, which I believe is the same thing that you were seeing (UE-20322). It does seem to be unexpected that you would see an Ensure when using a Blueprinted component, but no Ensure when using the native version of the same component. Unfortunately I do not have a workaround for this.
I also run into this with blueprinted character class used in ChildActorComponent, when the base character class doesn’t run into this issue. Similar behaviour to StaticMeshComponent.
Only workaround I can think of is copy pasting engine’s ChildActorComponent into own custom component, debugging and fixing the issue, and use the MyChildActorComponent component in place of the actual engine ChildActorComponent.
Would be great if Epic can help with fixed MyChildActorComponent code here!
UE4 also runs into a warning “SpawnActor in ConstructionScript” when attaching a child actor in the that spawns something, like a character spawning a controller.