Choumiko / TheFatController

Factorio train management mod.
MIT License
23 stars 4 forks source link

Error when exiting cargo section of a train #32

Closed Sil3ntStorm closed 5 years ago

Sil3ntStorm commented 5 years ago

Latest Factorio Experimental

I was catching a train as it was leaving the station and ended up in the cargo section (no big deal), however when I exited the train TFC spew out an error. Afterwards whenever I tried to open the GUI it would again throw an error. Found this in the log:

stack traceback:
\9__TheFatController__/GUI.lua:631: in function '?'
\9__TheFatController__/GUI.lua:323: in function <__TheFatController__/GUI.lua:310>
\9[C]: in function 'pcall'
\9__TheFatController__/GUI.lua:310: in function <__TheFatController__/GUI.lua:309>";return _;end
Choumiko commented 5 years ago

Can you upload the save somewhere? And/or the factorio-current.log after you clicked the button. The part you posted might let me fix the button for you, but i'd like to fix the error that caused it (the one you got when leaving the wagon)

When you say catching a train, was it your character or did you go to the train via the TFC control train button?

Sil3ntStorm commented 5 years ago

I can grab a screen / factorio log from when exiting the train later on, will be about 7 hours though.
It was my actual character in the train cargo section (ie. press Enter running towards the train as it is leaving the station, ending up in cargo).

Sil3ntStorm commented 5 years ago

It appears as though nothing is recorded in the Factorio log regarding the error when leaving the cargo wagon. So please see this screenshot instead:
tfc_issue32-removeInvalid

From a quick glance at the mentioned code segments it looks as though it should be reproducible by just entering and then leaving any cargo wagon of a train in automatic mode. The screenshot was produced after leaving a cargo wagon of the train waiting for its condition to leave (so it was in automatic but not going anywhere).

Choumiko commented 5 years ago

Should be "fixed" now. I couldn't reproduce it though, so the first error (the one where you exited the wagon the first time) can still occur. When loading the save after updating the mod there should be a line with "Fixing fatControllerGui" in the Factorio log.