Engine Crashes when creating certain SubObjects or Objects in Player Controller

The code you posted shows local variables being used. If you create a component you need to have a pointer to it so you need to have a member variable in your actor that holds it. A local variable will disappear when the function is completed. That’s what I meant by “not quite correct”. That isn’t why it’s breaking.

You said it’s breaking because you can’t instantiate UPawnMovementComponent. That it’s an abstract class. If that’s the case then you may need to create your own class that is derived from UPawnMovementComponent. If you implement the missing functions then it won’t be an abstract class. Then you can use the format in my example – except, the “MyMovementComponent” variable should be a member of your class (a UPROPERTY)…

Or there may be a component that is derived from UPawnMovementComponeent which you can use out of the box. What are you trying to do exactly?

Another thing: movement components usually go in the Pawn, not the controller. Why are you doing this with the controller?