The reason it crashes is bcoz u are creating an actor on the stack and Unreal doesnt let you do that ( it garbage collects any actor created, meaning it tries to delete from the local stack, causing the crash )
To refer to an actor in the world, use an actorIterator or if you want to spawn an actor use SpawnActor