Page 1 of 1

[Twinsen][1.1.11] Crash: "Error ShootingTarget.cpp:13: Unset shooting target"

Posted: Thu Jan 14, 2021 6:15 pm
by kelianmao
So I've managed to make a very simple mod that has hard-crashed factorio. It happens in the latest windows steam version (1.1.11), as well as 1.1.8. The crash dump says: Error ShootingTarget.cpp:13: Unset shooting target

I have attached the full crash log, as well as the simple mod that reproduces the crash. Clicking anywhere should create a projectile, which crashes the game when its action triggers (it should just spawn an explosion). It did not crash before I added the explosion.

Re: [Twinsen][1.1.11] Crash: "Error ShootingTarget.cpp:13: Unset shooting target"

Posted: Fri Jan 15, 2021 3:15 pm
by Twinsen
Thank you for the simple mod, it was very helpful.

Fixed in Version: 1.1.12.

It was related to the source not being set for the explosion because the source was not set when the entity was created. In case you want the explosion or other triggers to react to the source, you need to specify "source" entity or position in the parameters of surface.create_entity.

Re: [Twinsen][1.1.11] Crash: "Error ShootingTarget.cpp:13: Unset shooting target"

Posted: Fri Jan 15, 2021 4:12 pm
by kelianmao
Cool. Thanks for the awesome game!