Ammo Loader+


More than just a turret loader. Auto load everything from turrets to artillery wagons to furnaces and even the player themselves. Auto upgrade ammo and fuel without tedious manual replacement. Infinite range and compatible with Factorissimo2.

Content
19 days ago
0.14 - 2.0
24.4K
Logistics

b Error while running event ammo-loader::on_entity_died (ID 4)

4 years ago
(updated 4 years ago)

Got this when a bug killed a loader..

Error while running event ammo-loader::on_entity_died (ID 4)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
ammo-loader/lib/TrackedSlot.lua:422: in function 'entName'
ammo-loader/lib/TrackedSlot.lua:426: in function 'protoInfo'
ammo-loader/lib/TrackedSlot.lua:442: in function 'needsProvided'
ammo-loader/lib/TrackedSlot.lua:694: in function 'inserterEnt'
ammo-loader/lib/TrackedSlot.lua:734: in function 'destroy'
ammo-loader/lib/DB.lua:85: in function 'for iterator'
ammo-loader/lib/Handlers.lua:88: in function <ammo-loader/lib/Handlers.lua:51>
stack traceback:
[C]: in function 'index'
__ammo-loader
/lib/TrackedSlot.lua:422: in function 'entName'
ammo-loader/lib/TrackedSlot.lua:426: in function 'protoInfo'
ammo-loader/lib/TrackedSlot.lua:442: in function 'needsProvided'
ammo-loader/lib/TrackedSlot.lua:694: in function 'inserterEnt'
ammo-loader/lib/TrackedSlot.lua:734: in function 'destroy'
ammo-loader/lib/DB.lua:85: in function 'for iterator'
ammo-loader/lib/Handlers.lua:88: in function <ammo-loader/lib/Handlers.lua:51>

I can provide a gamesave if you need

4 years ago

Hi Zarnoo! Thanks for reporting this issue. Sorry for the delay, I've been working a ton of hours lately.

I just uploaded 0.18.11 which should solve this issue. Please don't hesitate to let me know if you still have problems after updating. As always, thanks for using the mod and taking time to help me troubleshoot these issues. I know it can be frustrating when a mod breaks and support doesn't seem forthcoming, so I appreciate users like you who are willing to help me out on these sorts of things.

Happy building!

4 years ago

Thanks. Weirdly it only happened in the performance mode, but looks good now. Great mod (said it before, but this sort of thing can't be said enough for people who invest time in building the game).

4 years ago

Running into same or similar error.
Error while running event ammo-loader::on_entity_died (ID 4)
LuaItemStack API call when LuaItemStack was invalid for read.
stack traceback:
ammo-loader/lib/TrackedSlot.lua:2232: in function 'tryReturnStack'
ammo-loader/lib/TrackedSlot.lua:732: in function 'destroy'
ammo-loader/lib/Handlers.lua:77: in function <ammo-loader/lib/Handlers.lua:29>
(...tail calls...)
stack traceback:
[C]: in function 'index'
__ammo-loader
/lib/TrackedSlot.lua:2232: in function 'tryReturnStack'
ammo-loader/lib/TrackedSlot.lua:732: in function 'destroy'
ammo-loader/lib/Handlers.lua:77: in function <ammo-loader/lib/Handlers.lua:29>
(...tail calls...)
Error popped up after update before last and last update didn't fix it.
A great mod that I use all the time.

4 years ago

Hi Ron! Thanks for taking the time to report this.

I thought I had nipped this one in the bud. Dealing with LuaInventorySlots while they are in the process of being deleted is always touchy. Luckily, I still have the code open so I'll try and get a fix uploaded for you right away.

I'll let you know once I've uploaded a fix. As always, let me know if you have any more issues, and thank you for your support!

4 years ago

Alright, I just uploaded 0.18.20 which should fix this specific issue. Hopefully this will be the last time we see this, but if not just let me know and I'll take another look.

As always, thanks for using the mod! Happy building!

4 years ago

I don't know if it's related to this error or a new one, but this pop'd up as soon as one of my turrets was destroyed. Turret ran out of ammo when it was destroyed.

The mod Ammo Loader+ (0.18.21) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event ammo-loader::on_tick (ID 0)
ammo-loader/lib/Force.lua:903: attempt to index field '?' (a nil value)
stack traceback:
ammo-loader/lib/Force.lua:903: in function 'removeProv'
ammo-loader/lib/TrackedChest.lua:801: in function 'updateCache'
ammo-loader/lib/TrackedChest.lua:1105: in function 'tick'
ammo-loader/lib/Force.lua:544: in function 'tickChests'
ammo-loader/lib/Force.lua:221: in function 'tick'
ammo-loader/lib/Force.lua:195: in function 'tickAll'
ammo-loader/lib/Handlers.lua:170: in function 'func'
ammo-loader/lib/Handlers.lua:52: in function <ammo-loader/lib/Handlers.lua:39>

4 years ago

I don't know if it's related to this error or a new one, but this pop'd up as soon as one of my turrets was destroyed. Turret ran out of ammo when it was destroyed.

Hi! I just released 0.18.22 which should address this issue.

New response