Adding CreateDefaultSubobject crashes Hot Reload

I am working on “Components and Collision” tutorial step 1:

https://docs.unrealengine.com/en-us/Programming/Tutorials/Components/1

After adding below line in the class constructor:

OurParticleSystem = CreateDefaultSubobject(TEXT(“MovementParticles”));

and building the solution in VC and I am getting HotReload crash message.
What can be be the reason for that?
When particles part is commented out everything runs smoothly.

Should be

OurParticleSystem = CreateDefaultSubobject<UParticleSystemComponent>(TEXT("MovementParticles"));

and you include this:

#include "Particles/ParticleSystemComponent.h"

Thank you very much for your answer!
Sorry, I did not spot that but during copy/past part somehow gone. I have it in my source code as you wrote. I also have “Particles/ParticleSystemComponent.h” header included in my .cpp.
I receive no compilation nor linking error. So in VC everything is ok. But crash window comes up in Unreal Editor at the end of VC build.

Sorry again, I am new here and I just put straight text without quotation. That is why my <UParticleSystemComponent> text was removed.

Try close editor and rebuild your project. If that doesn’t help, maybe try on version 4.19.

Shaggy, great thanks!
I tried Clean and Rebuild in VC, while Editor is closed. But it keeps crashing ~70% of loading.
Meantime I finished that tutorial without UParticleSystemComponent, working fine of course without flames.
I will try with the new version as per your advice.

Great thanks!!! :slight_smile: