[1.10.9] of LTN with PickerDollies 1.0.1 generates non-recoverable error upon loading saved game when LTN loads first

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

termac
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Jan 27, 2019 6:51 am
Contact:

[1.10.9] of LTN with PickerDollies 1.0.1 generates non-recoverable error upon loading saved game when LTN loads first

Post by termac »

While playing a heavily-modded game, I updated from Factorio 0.17.38 to 0.17.41 and updated all out-of-date mods at the same time. This included updating LTN from 1.10.8 to 1.10.9 and PickerDollies from 1.0.0 to 1.0.1.

Upon attempting to load the saved game (by clicking "Load"), I was instead presented with the following popup window:
LTN-PickerDollies non-recoverable error.png
LTN-PickerDollies non-recoverable error.png (68.94 KiB) Viewed 1226 times
and factorio-current.log ended with the following lines:

Code: Select all

  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 expected the game to load successfully.

I have created and attached a minimal save file test case ("only" 1.4 MB) in case you wish to reproduce the error for yourself. I created it with LTN 1.10.8 and PickerDollies 1.0.0 (and their dependencies, and Creative Mod). Attempting to load it with LTN 1.10.9 and PickerDollies 1.0.1 (not 1.0.2) fails with the described error.

Since the error happened within PickerDollies's control.lua due to that code attempting to index into an uninitialized table, and I couldn't see anything obviously broken-looking in LTN's calls to PickerDollies's new add_blacklist_name function, I first submitted a bug report for PickerDollies on the mod portal here: https://mods.factorio.com/mod/PickerDol ... 000d93a444

I was able to fix the issue either by adding in a bit of initialize-if-not-initialized code to my local copy of PickerDollies 1.0.1 or by adding PickerDollies >= 1.0.1 as an optional dependency to my local copy of LTN 1.10.9.

Nexela patched PickerDollies (so, now at version 1.0.2) adding initialize-if-not-initialized sanity checks to all 3 new interface functions, and replied, suggesting a third possible fix, that would be a change to LTN using the on_configuration_changed function.

With PickerDollies 1.0.2, the error no longer happens, however I wanted to report this to you (Optera) both because I said I would and in case you judge that a change to LTN would be the proper way to prevent the error.
Attachments
LTN-Pickerdollies test case.zip
(1.37 MiB) Downloaded 89 times
Locked

Return to “Logistic Train Network”