I started a new project, based on First Person C++ (the shooter, with the balls and the boxes). I wanted to change something small to learn UE C++, so I decided to try removing the limited lifetime of the balls. You’re probably thinking I spawned loads and then UE crashed, but the crash occurs after spawning anywhere between 1 and 5 balls.
First I commented out Destroy() in Projectile::OnHit(). I set the InitialLifeSpan to 0.0f for infinity. Then, in Character::OnFire() I added store the projectile created and do SetFlags(RF_RootSet);
The last step is just to work around the Garbage Collector, and seems to be the line that makes UE crash.