Spawn actor error

Hi Everyone!

I’m getting an access violation reading location error when I try to spawn an actor. In my weapon class, I want to spawn a bullet actor. Bullet is a TSubclassof. The weapon is spawned on the BeginPlay of the character, and that work’s perfect. Any idea of what can this error be?

Spawn actor code:

Error:

Thanks!

Any chance of a callstack? With variable values? The crash message isn’t helpful.

How have you initialized BulletSpawnPoint? If you get rid of them and put a zeroed out vector and rotator does it still crash?

I zeroed the vector and the rotator and it still crashes. Bullet Spawn Points is initialized, it appears correctly on the actor blueprint. Bullet weapon is set on the blueprint actor. Not sure what else can be :frowning:
Here is the info of BulletOfTheWeapon, hope it helps! Thanks a lot.

That’s not quite the call stack but is very interesting… It appears you’re spawning a USTRUCT. I’ve never tried but I’m pretty sure SpawnActor isn’t for structs. Surprised that compiles and doubt it would work with a projectile movement component. Maybe I’m missing something.

Check out the spawning projectile tutorial and double check the bullet object.