Picker Dollies

by Nexela

Move most placed entities quickly and easily.

3 months ago
0.17 - 0.18
14317

b Non-recoverable error: New interface add_blacklist_name attempts to index into uninitialized table global.blacklist_names.

1 year, 1 month ago

I'm currently playing a heavily-modded game (85 mods, including AngelBobs and AAI structures/vehicles). Upon updating all mods, including LTN from 1.10.8 to 1.10.9 and PickerDollies from 1.0.0 to 1.0.1, attempting to load a saved game fails with a stack traceback (and auto-blames the failure on LTN):


69.823 Error AppManagerStates.cpp:1398: The mod LTN - Logistic Train Network caused a non-recoverable error.
Please report this error to the mod author.

Error while running event LogisticTrainNetwork::on_load()
Error when running interface function PickerDollies.add_blacklist_name: PickerDollies/control.lua:33: attempt to index field 'blacklist_names' (a nil value)
stack traceback:
PickerDollies/control.lua:33: in function <PickerDollies/control.lua:32>
stack traceback:
LogisticTrainNetwork/script/init.lua:238: in function 'registerEvents'
LogisticTrainNetwork/script/init.lua:255: in function <LogisticTrainNetwork/script/init.lua:246>
stack traceback:
[C]: in function 'call'
LogisticTrainNetwork/script/init.lua:238: in function 'registerEvents'
LogisticTrainNetwork/script/init.lua:255: in function <LogisticTrainNetwork/script/init.lua:246>


I don't know Lua well, but it doesn't appear to me that there's anything wrong with Optera's call to your new add_blacklist_name function. It appears to me that add_blacklist_name() is trying to index into blacklist_names before create_global_blacklist() initializes global.blacklist_names as an empty table.

Adding the 3 lines
"if not global.blacklist_names then
global.blacklist_names = {}
end"
before line 33 in control.lua resolved the issue, but I doubt that's the proper way to fix this. I don't know whether the right way to address this is by modifying code in Picker Dollies, or whether Optera should add Picker Dollies as an optional dependency to LTN.

1 year, 1 month ago
(updated 1 year, 1 month ago)

Adding the optional dependency "?PickerDollies >= 1.0.1" to LTN (without modifying PickerDollies) also resolved the issue. I will submit a bug report to Optera.

Anyone else who runs into this error should be able to work around it (until it's patched) by keeping LTN at version 1.10.8.

1 year, 1 month ago

I think LTN could add this in on_configuration_changed ['PickerDollies'] and forgo the dependency check all together.

New response