What exactly are you trying to achieve?
I only ask, because you may not actually want an actor component.
In the event that you do need to use an actor component, then take a look at this: AActor::AddOwnedComponent
Using that in the actor the component is attached to, and passing the component into the parameter may just fix your problem, though I can’t be certain without trying it!
How are you adding you component to the actor?
Like this, perhaps?
Taking a bit of a stab in the dark here, but I’m not too familiar with using UActorComponents myself, though I really aught to learn! They behave a little differently to other components though, hence why I would like to know what it is you’re trying to achieve.
as I said It is only simple programming and then the editor crash.
my goal is to know why it is crashed and prevent it. I’m looking forward to understanding the editor more.