[.14.21] Hard Crash on invalid ammo?

This subforum contains all the issues which we already resolved.
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

[.14.21] Hard Crash on invalid ammo?

Post by Nexela »

Reporting this due to hard crash vs script crash
Game crashes to desktop during loop

Code: Select all

if ammo.valid_for_read then ammo.drain_ammo(1) end. 

code flow ->
entity-with-trigger-event (line:244)
find closest player with ammo and run function if found (line:149)
drain ammo spawn small poison clouds (line:129)

load the save with the mod, shoot into a group of trees (might have to shoot more then once, ammo is used at a rate of 1 per tree in range)

After adding ammo.valid checks before the ammo.valid_for_read checks in all the right places the crashes went away. Still happen but are more rare.

Expected Outcome: No crash
Attachments
Nanobots_1.0.5.zip
Mod
(357.79 KiB) Downloaded 200 times
nanobots-crash.zip
Save
(755.72 KiB) Downloaded 189 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 14138
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [.14.21] Hard Crash on invalid ammo?

Post by Rseding91 »

I'm not able to reproduce the crash. in anyway - it always works perfectly for me.

Can you post the log file? Does it show anything? If not, can you reproduce the crash on another computer? Maybe it's a hardware issue on yours.
If you want to get ahold of me I'm almost always on Discord.

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [.14.21] Hard Crash on invalid ammo?

Post by Nexela »

Had the log ready and forgot to post it. recreating them now.

Make sure you are shooting into big groups of trees, and spam shooting.

Had this error pop on Arumba's mp server, as well as locally on my PC testing in both SP and MP.

This log was generated shooting the termite ammo from the spawn position into the trees.
Local_log
partial server log (server crash didn't generate a crash message on clients, just on server)
This crash happens when shooting the ammo-nano-deconstructers on entities marked for deconstruction.
server

Rseding91
Factorio Staff
Factorio Staff
Posts: 14138
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [.14.21] Hard Crash on invalid ammo?

Post by Rseding91 »

Fixed for 0.15.
If you want to get ahold of me I'm almost always on Discord.

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [.14.21] Hard Crash on invalid ammo?

Post by Nexela »

Awesome! Is there anything I can do on my end or just wait for .15, Not a big deal if I have to wait. The mod might not even be necessary for .15 :)

Thanks for looking into it.

Rseding91
Factorio Staff
Factorio Staff
Posts: 14138
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [.14.21] Hard Crash on invalid ammo?

Post by Rseding91 »

Nexela wrote:Awesome! Is there anything I can do on my end or just wait for .15, Not a big deal if I have to wait. The mod might not even be necessary for .15 :)

Thanks for looking into it.
Don't drain the item stack to empty during that event :P
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”