Describe the bug
Calling track:getConnection(0) on a RailroadTrack crashes the game.
fin-track-connection-crash.log
To Reproduce
- Build a computer with CPU and Network Card (maybe the latter isn't needed?)
- Build two train stations with a loop of track between them (maybe you can do less, I didn't check)
- Install an EEPROM with the contents:
local ANY_STATION = assert(component.proxy(component.findComponent(classes.RailroadStation))[1], "No RailroadStation found")
print("Station:", ANY_STATION)
local track = ANY_STATION:getTrackPos()
print("track:", track)
local conn = track:getConnection(0)
print("conn:", conn)
4. Run the computer.
Expected behavior
conn should be either a RailroadTrack or nil.
Additional context
Commenting out the line local conn = track:getConnection(0) should prevent the crash.
I created this test save to ensure it's not caused by anything in my existing save. No other mods were loaded.
This method didn't crash in previous versions, so probably a game update broke it?
Describe the bug
Calling
track:getConnection(0)on a RailroadTrack crashes the game.fin-track-connection-crash.log
To Reproduce
4. Run the computer.
Expected behavior
connshould be either a RailroadTrack or nil.Additional context
Commenting out the line
local conn = track:getConnection(0)should prevent the crash.I created this test save to ensure it's not caused by anything in my existing save. No other mods were loaded.
This method didn't crash in previous versions, so probably a game update broke it?