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 Bug in 0.1.4

5 years ago

I get this message when I load a game with this mod enabled:

28.810 Error AppManagerStates.cpp:1367: The mod Logistic Supply Toggle caused a non-recoverable error.
Please report this error to the mod author.

Error while running event SupplyToggle::on_init()
SupplyToggle/control.lua:99: attempt to index field '?' (a nil value)
stack traceback:
SupplyToggle/control.lua:99: in function 'modify_button_state'
SupplyToggle/control.lua:106: in function <SupplyToggle/control.lua:104>

5 years ago

Thanks for the report, the bug is now fixed with 0.1.5!

5 years ago

Indeed it is. Thank you. :-)

5 years ago

I am getting the same error since the update, but while playing the game instead of at start up.

5 years ago

Mhh, are you sure you are on 0.1.5? This exact error should not be possible because the code changed. Can you attach your full error message?

5 years ago
(updated 5 years ago)

I'm getting a similar error in 0.1.5 as well, from my log:

566.636 Error MainLoop.cpp:1128: Exception at tick 7789457: The mod Logistic Supply Toggle caused a non-recoverable error.
Please report this error to the mod author.

Error while running event SupplyToggle::on_research_finished (ID 18)
SupplyToggle/control.lua:98: attempt to index field '?' (a nil value)
stack traceback:
SupplyToggle/control.lua:98: in function <SupplyToggle/control.lua:94>

5 years ago

Do you have an autosave from before that happens by any chance? Does it happen in multiplayer or singleplayer?

5 years ago

Singleplayer for me, unfortunately I think my autosave before it happen just overwrote. :| Is the ID 18 a reference to a technology ID that just finished researching, and if so can I run a console command to dump tech ids so you know what had just finished researching? I wasn't paying attention to what finished in the queue as the research complete + crash happened right in the middle of a very large biter attack that I had to go deal with as the defensive line was crumbling so I didn't notice what it was. There's a good chance it was a modded tech though as I have a great many mods running which may be related.

5 years ago
(updated 5 years ago)

The ID is just an internal identifier for the event. The research that finished isn't even relevant to the mod.
I have an idea what happened, the problem is I can't find a reason why it did, the situation should not be possible. Some helpful information would be:
- Did you add the mod to an existing save and this was the first research that finished since adding? Or was the mod installed when you created the world?
- Does it happen again when another research finishes?
You can also provide me with a recent save of your game, maybe I can provoke another crash with it.

5 years ago

I had the mod installed, but since it wasn't yet updated, it wasn't running. Once it was updated for 0.17 it was then added to that save.
So far new tech being researched have not prompted a crash when finished, and I've confirmed that hitting ctrl+s is removing/adding my logistics requests as expected. I've also randomly tossed items in/out of the logistics requests for thoroughness both while researching, and right as a tech finished and another in queue began, seems totally stable now.

I've uploaded a copy of the save here: https://alnet.org/first_17_game.zip it's ~25mb

5 years ago
(updated 5 years ago)

Weird, I wasn't able to reproduce it yet. I'll look into it :D

5 years ago

I pushed a potential fix, this should not happen again. I'm still not sure what caused it, but I'm confident that I fixed the underlying problem.

5 years ago

Have not seen any crashes since the last one reported, seems like you got it.

5 years ago

Nice, thanks for your feedback!

New response