[1.8.0] control.lua:1375: table index is nil

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Post Reply
WhiskeyWonka
Burner Inserter
Burner Inserter
Posts: 10
Joined: Tue Sep 11, 2018 3:50 pm
Contact:

[1.8.0] control.lua:1375: table index is nil

Post by WhiskeyWonka »

Last night I saved and shutdown Factorio. This morning I loaded the save and LTN is crashing with:

3964.408 Script @__LogisticTrainNetwork__/control.lua:227: [LTN] on_load: complete
3965.433 Error MainLoop.cpp:1035: Exception at tick 243918042: Error while running event LogisticTrainNetwork::on_tick (ID 0)
__LogisticTrainNetwork__/control.lua:1375: table index is nil

I have 1129 hours of play time on this map. I have changed nothing since last night and this morning. I have rebooted my computers. I have tried disabling all mods and get a different error sequence.

45.404 Script @__LogisticTrainNetwork__/control.lua:227: [LTN] on_load: complete
45.666 Script @__LogisticTrainNetwork__/control.lua:175: [LTN] recreated 0 LTN stops missing from global.LogisticTrainStops
45.667 Script @__LogisticTrainNetwork__/control.lua:271: [LTN] LogisticTrainNetwork 1.8.0 configuration updated.
377.486 Error MainLoop.cpp:1035: Exception at tick 243882042: Error while running event LogisticTrainNetwork::on_tick (ID 0)
__LogisticTrainNetwork__/control.lua:1375: table index is nil
397.365 Info AppManager.cpp:932: Restarting Factorio

Any ideas on what might have gone wrong?

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [1.8.0] control.lua:1375: table index is nil

Post by Optera »

WhiskeyWonka wrote:
Tue Sep 11, 2018 5:10 pm
Any ideas on what might have gone wrong?
Not from those snippets. Attach the full logfile and I might be able to read something out of it.

WhiskeyWonka
Burner Inserter
Burner Inserter
Posts: 10
Joined: Tue Sep 11, 2018 3:50 pm
Contact:

Re: [1.8.0] control.lua:1375: table index is nil

Post by WhiskeyWonka »

logfile
Last edited by Optera on Wed Sep 12, 2018 5:29 am, edited 1 time in total.

WhiskeyWonka
Burner Inserter
Burner Inserter
Posts: 10
Joined: Tue Sep 11, 2018 3:50 pm
Contact:

Re: [1.8.0] control.lua:1375: table index is nil

Post by WhiskeyWonka »

Also, starting map 104 runs fine, but of course there is no LTN on it yet. The TLN Demo map loads fine. Something happened with the save I just have no idea what. It effects all 3 autosaves and my last world save, which makes sense as I had left the game running all day and saved it then closed factoro so those 4 are all basically the same just time separated.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [1.8.0] control.lua:1375: table index is nil

Post by Optera »

That error shouldn't be possible.
Please attach the save file so I can look into the data structures.

WhiskeyWonka
Burner Inserter
Burner Inserter
Posts: 10
Joined: Tue Sep 11, 2018 3:50 pm
Contact:

Re: [1.8.0] control.lua:1375: table index is nil

Post by WhiskeyWonka »

Its 90MB. Sent a PM with google drive link

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [1.8.0] control.lua:1375: table index is nil

Post by Optera »

For the future, you can attach files right to forum posts.

The save you provided crashes Factorio during buildabilityCheck before one line of code from mods can even run.
Attach your mods and mod settings, maybe that will allow it to load, but Factorio should never crash like this.

WhiskeyWonka
Burner Inserter
Burner Inserter
Posts: 10
Joined: Tue Sep 11, 2018 3:50 pm
Contact:

Re: [1.8.0] control.lua:1375: table index is nil

Post by WhiskeyWonka »

Holy %$@# its doing that here today too. I have no idea what could cause that. It was running yesterday as it produced the previous error log. Maybe my SSD is failing, ill find the test tools for it. 90mb is often not acceptable to forums, and that is my scratch world where i test things, not meant for public viewing :lol:
Attachments
mods.7z
(9.44 MiB) Downloaded 81 times

WhiskeyWonka
Burner Inserter
Burner Inserter
Posts: 10
Joined: Tue Sep 11, 2018 3:50 pm
Contact:

Re: [1.8.0] control.lua:1375: table index is nil

Post by WhiskeyWonka »

Disabling all mod except LTN, it loads, gives the lists of things disabled/removed, then throws the LTN error. I am now working on finding the mod mix that leads to a hard crash.

Edit: spelling

WhiskeyWonka
Burner Inserter
Burner Inserter
Posts: 10
Joined: Tue Sep 11, 2018 3:50 pm
Contact:

Re: [1.8.0] control.lua:1375: table index is nil

Post by WhiskeyWonka »

Disabling Geothermal and it loads.
factorio-current.log

WhiskeyWonka
Burner Inserter
Burner Inserter
Posts: 10
Joined: Tue Sep 11, 2018 3:50 pm
Contact:

Re: [1.8.0] control.lua:1375: table index is nil

Post by WhiskeyWonka »

even going back to Geothermal 1.0.80 is causing a major crash with factorio with this save. I found a save done at around 1000 hours that loads, IIRC that was the backup prior to installing LTN (I named it poorly, should have been "Map 103 pre LTN")

Edit: Nope that was the save I did to move it over to my other box that runs factorio 24/7

PS: I want to be sure to thank you for the time spend on this, ever more so since it looks to not have been caused by LTN.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [1.8.0] control.lua:1375: table index is nil

Post by Optera »

I managed to make LTN fix the corrupted global stop list in your save.

please either use spoiler= tag or attachment for large text files for readability.

WhiskeyWonka
Burner Inserter
Burner Inserter
Posts: 10
Joined: Tue Sep 11, 2018 3:50 pm
Contact:

Re: [1.8.0] control.lua:1375: table index is nil

Post by WhiskeyWonka »

Thank you very much for the fix! And I will do attachments for logs from now on. If you are ever in the way of oregon usa, ill by you a beer, or whiskey, or dinner, etc :mrgreen:

Could you tell what corrupted the data structure? Right now I feel it was just something with my laptop since there do not look to be anyone else with this issue.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [1.8.0] control.lua:1375: table index is nil

Post by Optera »

I have no idea how it was possible for a stop stored in global.LogisticTrainStops to loose its entity.id between save and reload.
My fix just skips over stops that have invalidated entity information when generating the list of stops to update each tick.

WhiskeyWonka
Burner Inserter
Burner Inserter
Posts: 10
Joined: Tue Sep 11, 2018 3:50 pm
Contact:

Re: [1.8.0] control.lua:1375: table index is nil

Post by WhiskeyWonka »

I think I figured out the issue. The geothermal mod uses a modified rail signal in order to have a glowing entity (he said its the only way, i've been told its not). I know that I built one of the depot sections over a geothermal field. I can not locate that now because of having to disable, save, enable, load save --> all geothermal fields are gone and even being able to build the units is not showing up in the build menu. I know I built over one cause I had to move the rail one space to fix where the rail went over it. I will test this out.

Post Reply

Return to “Logistic Train Network”