Page 1 of 1

[kovarex] [0.17.58] Crash when saving after making a train loop

Posted: Tue Jul 23, 2019 4:57 am
by OinkIguana
What I did: I made a loop of train tracks... big enough to put like, two 5 car train stops on it if I wanted to? Then I put one train stop on one side, and a regular train signal directly after the train stop. With this existing in the world, when it saves (auto save or manual save) it crashes. I had it happen 3 times in a row, and took the log below from the first time.

It did not crash when there was just blank rails, only when I added the stop and signal to it. Here is a picture of the setup (top half is just the closing of the loop):
Image

I am using no mods.

Log file:

Code: Select all

   0.011 2019-07-22 21:58:43; Factorio 0.17.58 (build 46193, win64, steam)
   0.011 Operating system: Windows 10 (version 1809) 
   0.011 Program arguments: "E:\Steam\steamapps\common\Factorio\bin\x64\Factorio.exe" 
   0.011 Read data path: E:/Steam/steamapps/common/Factorio/data
   0.011 Write data path: C:/Users/Cam/AppData/Roaming/Factorio [35367/475348MB]
   0.011 Binaries path: E:/Steam/steamapps/common/Factorio/bin
   0.031 System info: [CPU: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz, 8 cores, RAM: 5847/16311 MB, page: 10591/32695 MB, virtual: 4335/134217727 MB, extended virtual: 0 MB]
   0.031 Display options: [FullScreen: 1] [VSync: 0] [UIScale: automatic (100.0%)] [Native DPI: 1] [Screen: 255] [Special: 0000] [Lang: en]
   0.068 Available displays: 2
   0.069  [1]: \\.\DISPLAY2 - NVIDIA GeForce GTX 765M {0x05, [0,0], 3840x2160, 32bit, 60Hz}
   0.069  [0]: \\.\DISPLAY1 - NVIDIA GeForce GTX 765M {0x01, [3840,1080], 1920x1080, 32bit, 60Hz}
   0.141 [Direct3D11] Display: 0, Output: 0, DisplayAdapter: 0, RenderingAdapter: 0; d3dcompiler_47.dll
   1.917 Initialised Direct3D[0]: NVIDIA GeForce GTX 765M; id: 10de-11e1; driver: nvd3dumx.dll 21.21.13.7254
   1.917   D3D Feature Level: 11.0, DXGI 1.5+, SwapChain: 3,flip-discard,-,-,-,none
   1.917   [Local Video Memory] Budget: 1714MB, CurrentUsage: 96MB, Reservation: 0/907MB
   1.917   [Non-Local Vid.Mem.] Budget: 7339MB, CurrentUsage: 0MB, Reservation: 0/3873MB
   1.917   Tiled resources: Tier 1
   1.917   Unified Memory Architecture: No
   1.917   BGR 565 Supported: Yes
   1.917   MaximumFrameLatency: 3, GPUThreadPriority: 0
   2.017 Desktop composition is active.
   2.017 Graphics settings preset: high
   2.017   Dedicated video memory size 2016 MB
   2.017 Graphics options: [Graphics quality: high] [Video memory usage: high] [Light scale: 100%] [DXT: high-quality]
   2.017                   [Max load threads: 32] [Max texture size: 0] [Tex.Stream.: 1] [Rotation quality: low] [Color: 32bit]
   2.204 DSound: Starting _dsound_update thread
   2.204 DSound: Enter _dsound_update; tid=19880
   2.435 Loading mod core 0.0.0 (data.lua)
   2.650 Loading mod base 0.17.58 (data.lua)
   3.436 Loading mod base 0.17.58 (data-updates.lua)
   3.599 Checksum for core: 716058110
   3.599 Checksum of base: 2272799319
   3.934 Loading sounds...
   6.256 Info PlayerData.cpp:69: Local player-data.json unavailable
   6.256 Info PlayerData.cpp:72: Cloud player-data.json available, timestamp 1563831179
   6.277 Info CropCache.cpp:57: Exception while loading crop cache: The file is from previous game version. This can be probably ignored
   6.322 Crop bitmaps.
 251.260 Parallel Sprite Loader initialized (threads: 7)
 258.088 Initial atlas bitmap size is 16384
 258.124 Created atlas bitmap 16384x16380 [none]
 258.126 Created atlas bitmap 16384x4220 [none]
 258.126 Created atlas bitmap 8192x3872 [decal]
 258.128 Created atlas bitmap 16384x4256 [low-object, linear-minification]
 258.128 Created atlas bitmap 8192x3664 [mipmap, linear-minification, linear-magnification, linear-mip-level]
 258.129 Created atlas bitmap 16384x6880 [terrain, mipmap, linear-minification, linear-mip-level]
 258.129 Created atlas bitmap 4096x1600 [smoke, mipmap, linear-minification, linear-magnification]
 258.130 Created atlas bitmap 4096x1712 [icon, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level]
 258.130 Created atlas bitmap 2048x192 [icon-background, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level, ]
 258.131 Created atlas bitmap 8192x1496 [alpha-mask]
 258.133 Created atlas bitmap 16384x11256 [shadow, linear-magnification, alpha-mask]
 258.134 Created atlas bitmap 8192x2352 [shadow, mipmap, linear-magnification, alpha-mask]
 258.183 Created virtual atlas pages 4096x4096x5
 258.198 Texture processor created (2048). GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
 500.609 Parallel Sprite Loader initialized (threads: 7)
 509.299 Sprites loaded
 509.334 Generated mipmaps (4) for atlas [3] of size 16384x4256   
 509.357 Generated mipmaps (3) for atlas [4] of size 8192x3664   
 509.401 Generated mipmaps (3) for atlas [5] of size 16384x6880   
 509.413 Generated mipmaps (3) for atlas [6] of size 4096x1600   
 509.425 Generated mipmaps (4) for atlas [7] of size 4096x1712   
 509.437 Generated mipmaps (3) for atlas [11] of size 8192x2352   
 509.438 Custom mipmaps uploaded.
 509.608 Generated mipmaps for virtual atlas of size 8192x12288
 509.613 Custom inputs active: 0
 509.723 Factorio initialised
 574.862 Loading map C:\Users\Cam\AppData\Roaming\Factorio\saves\upgraded.zip: 6339915 bytes.
 575.125 Loading level.dat: 13468331 bytes.
 575.130 Info Scenario.cpp:187: Map version 0.17.58-0
 575.407 Loading script.dat: 328 bytes.
 575.413 Checksum for script C:/Users/Cam/AppData/Roaming/Factorio/temp/currently-playing/control.lua: 1876143224
 575.430 Warning BlueprintLibrary.cpp:697: Time to sync storage to the game state: 0.000 sec
 804.899 Info AppManager.cpp:287: Saving to _autosave2 (blocking).
 805.430 Info AppManagerStates.cpp:1755: Saving finished
1118.946 Info AppManager.cpp:287: Saving to _autosave3 (blocking).
1119.482 Info AppManagerStates.cpp:1755: Saving finished
1849.099 Info AppManager.cpp:287: Saving to _autosave1 (blocking).
1849.612 Info AppManagerStates.cpp:1755: Saving finished
2149.600 Info AppManager.cpp:287: Saving to _autosave2 (blocking).
2150.149 Info AppManagerStates.cpp:1755: Saving finished
2608.833 Info AppManager.cpp:287: Saving to _autosave3 (blocking).
2609.389 Info AppManagerStates.cpp:1755: Saving finished
2945.612 Info AppManager.cpp:287: Saving to _autosave1 (blocking).
2946.165 Info AppManagerStates.cpp:1755: Saving finished
3349.758 Info AppManager.cpp:287: Saving to _autosave2 (blocking).
3350.311 Info AppManagerStates.cpp:1755: Saving finished
3755.700 Info AppManager.cpp:287: Saving to _autosave3 (blocking).
3756.250 Info AppManagerStates.cpp:1755: Saving finished
7749.950 Info AppManager.cpp:287: Saving to _autosave1 (blocking).
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\cygwin64\tmp\factorio-build-yuejtk\libraries\stackwalker\stackwalker.cpp (924): StackWalker::ShowCallstack
c:\cygwin64\tmp\factorio-build-yuejtk\src\util\logger.cpp (537): Logger::writeStacktrace
c:\cygwin64\tmp\factorio-build-yuejtk\src\util\logger.cpp (544): Logger::logStacktrace
c:\cygwin64\tmp\factorio-build-yuejtk\src\util\logging.cpp (96): Logging::logAndAbortOrThrow
c:\cygwin64\tmp\factorio-build-yuejtk\src\util\logging.cpp (90): Logging::logAndAbortOrThrow
c:\cygwin64\tmp\factorio-build-yuejtk\src\entity\railsignalbase.cpp (363): RailSignalBase::checkConsistency
c:\cygwin64\tmp\factorio-build-yuejtk\src\entity\railsignalbase.cpp (67): RailSignalBase::save
c:\cygwin64\tmp\factorio-build-yuejtk\src\entity\railsignal.cpp (50): RailSignal::save
c:\cygwin64\tmp\factorio-build-yuejtk\src\surface\chunk.cpp (101): Chunk::save
c:\cygwin64\tmp\factorio-build-yuejtk\src\surface\surface.cpp (766): Surface::save
c:\cygwin64\tmp\factorio-build-yuejtk\src\map\map.cpp (1347): Map::save
c:\cygwin64\tmp\factorio-build-yuejtk\src\scenario\scenario.cpp (1001): Scenario::saveMap
c:\cygwin64\tmp\factorio-build-yuejtk\src\scenario\scenario.cpp (897): Scenario::saveAs
c:\cygwin64\tmp\factorio-build-yuejtk\src\scenario\parallelscenariosaver.cpp (99): ParallelScenarioSaver::doSave
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.15.26726\include\thr\xthread (230): std::_LaunchPad<std::unique_ptr<std::tuple<void (__cdecl RouterBase::*)(void),ServerRouter *>,std::default_delete<std::tuple<void (__cdecl RouterBase::*)(void),ServerRouter *> > > >::_Go
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.15.26726\include\thr\xthread (209): std::_Pad::_Call_func
minkernel\crts\ucrt\src\appcrt\startup\thread.cpp (115): thread_start<unsigned int (__cdecl*)(void * __ptr64)>
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFBCCFD7974)
00007FFBCCFD7974 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFBCD67A271)
00007FFBCD67A271 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
7756.393 Error RailSignalBase.cpp:363: incomingBlock->getOutboundSignals().count(const_cast<RailSignalBase*>(this)) was not true
Logger::writeStacktrace skipped.
7756.393 Error CrashHandler.cpp:186: Map tick at moment of crash: 2448001
7756.394 Error Util.cpp:97: Unexpected error occurred. If you're running the latest version of the game you can help us solve the problem by posting the contents of the log file on the Factorio forums.
Please also include the save file(s), any mods you may be using, and any steps you know of to reproduce the crash.
9093.815 Info GlobalContext.cpp:1691: Waiting for save to finish.
9201.194 Uploading log file
9201.296 Error CrashHandler.cpp:234: Heap validation: success.
9201.307 Creating crash dump.
9202.028 CrashDump success

Re: [0.17.58] Crash when saving after making a train loop

Posted: Tue Jul 23, 2019 5:46 am
by boskid
Yup, managed to reproduce.

Steps to reproduce:
  1. Open 73560-reproduction.zip
    save file
  2. Tick once
  3. Try to save
  4. Crash
    log

Re: [kovarex] [0.17.58] Crash when saving after making a train loop

Posted: Thu Aug 08, 2019 3:12 pm
by kovarex
Thanks for the report. The trick was, that it actually depends on which rail was build the last in the setup. (That is why it was hard for me to reproduce it on my own map).
It is fixed for the next release.