Gregory365 / TPF2-Timetables

The Timetable mod for Transport Fever 2
GNU General Public License v3.0
13 stars 5 forks source link

Timetables coroutine error #66

Closed Tawa-chan closed 8 months ago

Tawa-chan commented 9 months ago

Hey, I've been getting this error message when playing on my current save game. It appears in both console and stdout.

Timetables coroutine error: C:/Steam/steamapps/workshop/content/1066780/2918585390/res/scripts/celmi/timetables/timetable.lua:699: attempt to index local 'slot' (a nil value) Timetables failed to resume dead coroutine.

As with Issue #55 it continues to spam this into the console and stdout. Timetable slots are ignored and trains are way out of their slots or are stuck at a station.

This issue has started after I had the game crash a while ago. Classic "An internal error occured" message. This is heavily modded savegame so these kinds of crashes happen once in a while. I then reloaded from the last autosave and ever since then that issue has been appearing.

The crash did however happen while using the timetables GUI. While deleting an arrival/depature slot I pressed the "X" (not yes or no) on the small delete confirmation window while the main GUI was closed. I have not managed to reproduce that error in a vanilla save with only timetables enabled. Not sure if that might be relevant for the error. I do not have the stdout from that incident sadly, however if needed I can try to reproduce it in the same savegame and see if it happens again.

Thanks!

Tawa-chan commented 9 months ago

UPDATE:

I've fixed the error myself by copying the save file, then saving it without the mod and then adding the mod back. The current timetables in game were gone but I just copied the timetables from the old save.lua file and it seems to work now.

Also I didn't mean to close this issue, that was an accident. Sorry.

Tawa-chan commented 9 months ago

Update 2:

Sadly the error does persist. I loaded the savegame from yesterday where the timetables were working again, however now it seems to break with the same error message as before. My guess it somehow doesn't save properly and therefore when loading the savegame the timetables break. Any idea on how to fix this?

Gregory365 commented 9 months ago

~Can you please upload a copy of your sav.lua file?~ Never mind, that's not necessary.

Gregory365 commented 9 months ago

Thanks for highlighting what caused the bug, I'll try to reproduce the issue myself and fix it soon.

Tawa-chan commented 9 months ago

Hey, any luck with reproducing the issue? I've been trying to find a workaround for the moment but sadly it only works by re-installing every time which gets a bit annoying. Thanks!

Gregory365 commented 8 months ago

Hi, apologies for the delay in getting this fixed.

This bug is caused by having a timetable in ArrDep mode with a station with no slots.

Vehicles will now depart instantly if no timetable slots are defined.

Gregory365 commented 8 months ago

Fixed in v1.3.5