Page 1 of 1

[.14.21] Hard Crash on invalid ammo?

Posted: Sat Dec 17, 2016 4:33 am
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

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

Posted: Sat Dec 17, 2016 2:47 pm
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.

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

Posted: Sat Dec 17, 2016 3:20 pm
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

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

Posted: Sat Dec 17, 2016 4:03 pm
by Rseding91
Fixed for 0.15.

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

Posted: Sat Dec 17, 2016 4:06 pm
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.

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

Posted: Sat Dec 17, 2016 7:12 pm
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