Page 1 of 1

[0.13.8, 0.13.9] Unminable train track causes crashes

Posted: Sat Jul 16, 2016 8:13 pm
by kpreid
I have a section of track which "cannot be mined". When a train drives up to it, the train stops. If I remove and replace the section to the right of it, and then drive a train onto it from the right (backward), the game crashes.

This is a save originally created in 0.11.x (possibly earlier). I don't know if this problem showed up immediately after upgrading, because I only noticed it when I drove the 'passenger' train away from the station the bad track is at, so trains would never try to take that route.

Save file, 110 MB. (Sorry the save is so large — I don't know of a way to reproduce this problem from scratch.) Crash log:

Code: Select all

   0.002 2016-07-11 20:23:23; Factorio 0.13.8 (build 23239, mac, steam)
   0.002 Operating system: Mac OS X 10.11.5
   0.002 Program arguments: "/Nobackup/SteamLibrary/steamapps/common/Factorio/factorio.app" 
   0.002 Read data path: /Nobackup/SteamLibrary/steamapps/common/Factorio/factorio.app/Contents/data
   0.002 Write data path: /Users/kpreid/Library/Application Support/factorio
   0.002 Binaries path: /Nobackup/SteamLibrary/steamapps/common
   0.029 Graphics options: [FullScreen: false] [VSync: true] [UIScale: 100%] [MultiSampling: OFF] [Graphics quality: normal] [Video memory usage: all] [Light scale: 20%] [Screen: 0] [DXT: false]
   0.029 Available display adapters: 2
   0.029  [0]: resolution 1920x1080px at [0,0]
   0.030  [1]: resolution 1440x900px at [254,1080]
   0.030 Create display on adapter 0. Size 1280x720 at position [310, 162].
   0.112 Initialised OpenGL:[0] AMD Radeon R9 M370X OpenGL Engine; driver: 2.1 ATI-1.42.11
   0.480 Loading mod core 0.0.0 (data.lua)
   0.486 Loading mod base 0.13.8 (data.lua)
   0.589 Checksum for core: 714099156
   0.589 Checksum for mod base: 1905699976
   9.520 Initial atlas bitmap size is 4096
   9.525 Created atlas bitmap 4096x4091
   9.529 Created atlas bitmap 4096x4083
   9.532 Created atlas bitmap 4096x4093
   9.534 Created atlas bitmap 4096x4087
   9.536 Created atlas bitmap 4096x4091
   9.538 Created atlas bitmap 4096x4066
   9.542 Created atlas bitmap 4096x4094
   9.543 Created atlas bitmap 4096x4092
   9.544 Created atlas bitmap 4096x4069
   9.544 Created atlas bitmap 4096x838
   9.544 Created atlas bitmap 4096x968
  16.689 Sprites loaded
  16.689 Convert atlas 4096x968 to: trilinear-filtering 
  16.728 Loading sounds...
  18.257 Custom inputs active: 0
  18.306 Factorio initialised
  25.099 Loading map /Users/kpreid/Library/Application Support/factorio/saves/Sandbox2-12.zip
  25.126 Info Scenario.cpp:127: Map version 0.13.6-0
  34.114 Checksum for script /Users/kpreid/Library/Application Support/factorio/temp/currently-playing/control.lua: 900459546
1322.779 Unlocked achievement "automated-construction"
Factorio crashed. Generating symbolized stacktrace, please wait ...
#0  0x1005a8f72 in Logger::logStacktrace(StackTraceInfo*) (in factorio) (Logger.cpp:382)
#1  0x1004e6648 in Train::resolveRailTransition(Rail*, Rail*, bool) (in factorio) (Train.cpp:1351)
#2  0x1001f2d57 in RailJoint::startOnNewRail(Rail*, RailDirection, RailDirection, bool) (in factorio) (RailJoint.cpp:92)
#3  0x1001f3294 in RollingStock::Carriage::moveBackJointBackward(double, RidingState::Direction const&) (in factorio) (RollingStock.cpp:283)
#4  0x1001f36ef in RollingStock::move(double, RidingState::Direction const&, bool) (in factorio) (RollingStock.cpp:319)
#5  0x1004e6ce3 in Train::tryToMove(double) (in factorio) (Train.cpp:1675)
#6  0x1004e44a6 in Train::move(double) (in factorio) (Train.cpp:1543)
#7  0x1004e3142 in Train::updateSpeedAndMove() (in factorio) (Train.cpp:1074)
#8  0x1004e2972 in Train::update() (in factorio) (Train.cpp:953)
#9  0x100444781 in TrainManager::update(bool) (in factorio) (TrainManager.cpp:160)
#10 0x100249c47 in Map::update() (in factorio) (ForceManager.cpp:85)
#11 0x100249771 in Game::update() (in factorio) (Game.cpp:141)
#12 0x10042501c in Scenario::update() (in factorio) (lock_types.hpp:331)
#13 0x1004280b7 in MainLoop::gameUpdateStep(MultiplayerManager*, Scenario*, AppManager*, MainLoop::HeavyMode) (in factorio) (MainLoop.cpp:337)
#14 0x1004292f3 in MainLoop::updateLoop(ThreadBarrier*, boost::chrono::time_point<boost::chrono::steady_clock, boost::chrono::duration<long long, boost::ratio<1l, 1000000000l> > >*, boost::chrono::time_point<boost::chrono::steady_clock, boost::chrono::duration<long long, boost::ratio<1l, 1000000000l> > >*, bool*, bool, MainLoop::HeavyMode) (in factorio) (MainLoop.cpp:473)
#15 0x1005b06da in Thread::loop() (in factorio) (Thread.cpp:34)
#16 0x100b2cc26 in boost::(anonymous namespace)::thread_proxy(void*) (in factorio) + 54
#17 0x7fff90b5099d in 0x7fff90b5099d
#18 0x7fff90b5091a in 0x7fff90b5091a
#19 0x7fff90b4e351 in 0x7fff90b4e351
3370.149 Error Train.cpp:1351: Internal error: Carriage::moveFrontJointForward nextRail rollingStockCount (1) != 0
Factorio crashed. Generating symbolized stacktrace, please wait ...
#0  0x1005a8f72 in Logger::logStacktrace(StackTraceInfo*) (in factorio) (Logger.cpp:382)
#1  0x1005a1db9 in CrashHandler::writeStackTrace() (in factorio) (CrashHandler.cpp:85)
#2  0x1005a1d4e in CrashHandler::SignalHandler(int) (in factorio) (CrashHandler.cpp:189)
#3  0x7fff939b052a in 0x7fff939b052a
#4  0x3 in 0x00000003 (in factorio)
#5  0x7fff9718d6e7 in 0x7fff9718d6e7
#6  0x1004e6865 in Train::resolveRailTransition(Rail*, Rail*, bool) (in factorio) (Train.cpp:1380)
#7  0x1001f2d57 in RailJoint::startOnNewRail(Rail*, RailDirection, RailDirection, bool) (in factorio) (RailJoint.cpp:92)
#8  0x1001f3294 in RollingStock::Carriage::moveBackJointBackward(double, RidingState::Direction const&) (in factorio) (RollingStock.cpp:283)
#9  0x1001f36ef in RollingStock::move(double, RidingState::Direction const&, bool) (in factorio) (RollingStock.cpp:319)
#10 0x1004e6ce3 in Train::tryToMove(double) (in factorio) (Train.cpp:1675)
#11 0x1004e44a6 in Train::move(double) (in factorio) (Train.cpp:1543)
#12 0x1004e3142 in Train::updateSpeedAndMove() (in factorio) (Train.cpp:1074)
#13 0x1004e2972 in Train::update() (in factorio) (Train.cpp:953)
#14 0x100444781 in TrainManager::update(bool) (in factorio) (TrainManager.cpp:160)
#15 0x100249c47 in Map::update() (in factorio) (ForceManager.cpp:85)
#16 0x100249771 in Game::update() (in factorio) (Game.cpp:141)
#17 0x10042501c in Scenario::update() (in factorio) (lock_types.hpp:331)
#18 0x1004280b7 in MainLoop::gameUpdateStep(MultiplayerManager*, Scenario*, AppManager*, MainLoop::HeavyMode) (in factorio) (MainLoop.cpp:337)
#19 0x1004292f3 in MainLoop::updateLoop(ThreadBarrier*, boost::chrono::time_point<boost::chrono::steady_clock, boost::chrono::duration<long long, boost::ratio<1l, 1000000000l> > >*, boost::chrono::time_point<boost::chrono::steady_clock, boost::chrono::duration<long long, boost::ratio<1l, 1000000000l> > >*, bool*, bool, MainLoop::HeavyMode) (in factorio) (MainLoop.cpp:473)
#20 0x1005b06da in Thread::loop() (in factorio) (Thread.cpp:34)
#21 0x100b2cc26 in boost::(anonymous namespace)::thread_proxy(void*) (in factorio) + 54
#22 0x7fff90b5099d in 0x7fff90b5099d
#23 0x7fff90b5091a in 0x7fff90b5091a
#24 0x7fff90b4e351 in 0x7fff90b4e351
3372.537 Error CrashHandler.cpp:85: Map tick at moment of crash: 37467887

Re: [0.13.8, 0.13.9] Unminable train track causes crashes

Posted: Sat Jul 16, 2016 8:23 pm
by Loewchen
Try:

Code: Select all

/c game.player.selected.fix_rail()

Re: [0.13.8, 0.13.9] Unminable train track causes crashes

Posted: Sat Jul 16, 2016 8:42 pm
by kpreid
Loewchen wrote:Try:

Code: Select all

/c game.player.selected.fix_rail()
Report: Doing that just made the rail minable but still acting as an obstacle, but then mining and replacing it resulted in proper behavior.

Thanks for the tip that will allow me to continue that game. (This is still a bug report for the crash and the having gotten into this state, of course.)

Re: [0.13.8, 0.13.9] Unminable train track causes crashes

Posted: Sat Jul 16, 2016 10:07 pm
by Loewchen
kpreid wrote:
Loewchen wrote:This is still a bug report for the crash and the having gotten into this state, of course.
The bug itself is known, it occurs in the merging process of the save-file from 12.35 to 13.0 (or .1 ??)
I would suggest that you keep your old .12 save as there is a high chance that if you merged with early .13 your save gets corrupted later on.

Duplicate of: viewtopic.php?f=11&t=27202&p=174643

Re: [0.13.8, 0.13.9] Unminable train track causes crashes

Posted: Sat Jul 16, 2016 10:40 pm
by kpreid
Loewchen wrote:I would suggest that you keep your old .12 save as there is a high chance that if you merged with early .13 your save gets corrupted later on.
I recognize that 0.13.* is experimental, and I have kept my old saves for that very reason, but are you saying that there is a known problem that means a likely corrupted save, or just the general principle?

Re: [0.13.8, 0.13.9] Unminable train track causes crashes

Posted: Sat Jul 16, 2016 11:45 pm
by Loewchen
kpreid wrote:
Loewchen wrote:I would suggest that you keep your old .12 save as there is a high chance that if you merged with early .13 your save gets corrupted later on.
I recognize that 0.13.* is experimental, and I have kept my old saves for that very reason, but are you saying that there is a known problem that means a likely corrupted save, or just the general principle?
There were issues in the merging code of early .13 that caused corrupted saves later on, since you have an issue that you can only get when merging with early .13 version as well, you might be suffering from this later on. If you load a .12 save in the latest .13 release you are secured from that error, but if you at some point saved the savegame in early .13 and have problems, loading them in late .13 can not fix that.