Logistic Supply Toggle


! As this is now part of the main game, the mod is deprecated as of 17.03.2020 ! Toggle logistic requests to stop bots from being annoying when dumping your inventory to carry stuff.

Utilities
4 years ago
0.16 - 0.18
15

b Server Crash

5 years ago

The mod caused the server to hard crash with the below in the logs. No one was aware that they were doing anything related to the mod at the time of the crash. using v 0.1.1.

[January 20, 2019 8:39 AM] 48582.651 Error MainLoop.cpp:1035: Exception at tick 75466905: Error while running event SupplyToggle::toggle-supply (ID 111)
[January 20, 2019 8:39 AM] Passed index is out of range
[January 20, 2019 8:39 AM] Passed index is out of range
[January 20, 2019 8:39 AM] 48582.651 Error ServerMultiplayerManager.cpp:96: MultiplayerManager failed: "Error while running event SupplyToggle::toggle-supply (ID 111)
[January 20, 2019 8:39 AM] SupplyToggle/control.lua:52: in function <SupplyToggle/control.lua:6>"
[January 20, 2019 8:39 AM] 48582.651 Info ServerMultiplayerManager.cpp:699: mapTick(75466905) changing state from(InGame) to(Failed)
[January 20, 2019 8:39 AM] SupplyToggle/control.lua:52: in function <SupplyToggle/control.lua:6>
[January 20, 2019 8:39 AM] 48582.652 Info GlobalContext.cpp:696: Waiting for child processes to exit:
[January 20, 2019 8:39 AM] 48583.806 Info ServerMultiplayerManager.cpp:142: Quitting multiplayer connection.

5 years ago

Thanks for the report! Did someone rebind the hotkey for the mod, but had Ctrl+S bound to something else in the game?
I need to check if I can somehow reproduce it.

5 years ago

It's an open community server so a little hard to get a definitive answer. There have been no replies in discord that anyone rebound their keys.

5 years ago

just for completeness its errored again on the clear request slots this time:

[January 20, 2019 7:40 PM] SupplyToggle/control.lua:54: in function <SupplyToggle/control.lua:6>"
[January 20, 2019 7:40 PM] 24722.835 Error MainLoop.cpp:1035: Exception at tick 76870605: Error while running event SupplyToggle::toggle-supply (ID 111)
[January 20, 2019 7:40 PM] 24722.835 Error ServerMultiplayerManager.cpp:96: MultiplayerManager failed: "Error while running event SupplyToggle::toggle-supply (ID 111)
[January 20, 2019 7:40 PM] SupplyToggle/control.lua:54: in function <SupplyToggle/control.lua:6>
[January 20, 2019 7:40 PM] 24722.835 Info ServerMultiplayerManager.cpp:699: mapTick(76870605) changing state from(InGame) to(Failed)

5 years ago
(updated 5 years ago)

Ah, this mod was put on a multiplayer server and I don't think the mod is multiplayer safe or supports multiple players?

you have global Lua variables sitting in control.lua not being persisted via factorio modding's "global" table.
your global variable "slots" has no concept of different players.

5 years ago

Steps to reproduce the bug appear to be:

Player 1 initiates mod after dying, so bots to refresh inventory before player gets to corpse.
Player 1 forgets to re-initiate mod (set logistics requests back).
Player 2 dies, and initiates mod.

Crash.

5 years ago
(updated 5 years ago)

Thanks for the info :) Yeah, the mod was not written with multiplayer in mind and not tested for it. I already added the global table stuff and will test is with multiplayer for the next release.

5 years ago
(updated 5 years ago)

The bug is fixed with version 0.1.2, the mod is now fully MP compatible and has save/load persistency of saved request layouts.

5 years ago

nice

New response