[kovarex] [0.17.48] Removing yellow rail signal: Error RailBlock.cpp:172: *this->reservedFor == train was not true

This subforum contains all the issues which we already resolved.
Post Reply
th0
Inserter
Inserter
Posts: 37
Joined: Sat Mar 16, 2019 12:04 pm
Contact:

[kovarex] [0.17.48] Removing yellow rail signal: Error RailBlock.cpp:172: *this->reservedFor == train was not true

Post by th0 »

Hi,
this bug report is related to the other train issues posted here before. However, I believe it is not identical to this viewtopic.php?f=7&t=71905 and I also did not find any other mention of this particular problem so here is a seperate bug report.

Factorio crashes when a rail signal / chain signal is marked for deconstruction or removed if the rail behind it is reserved (i.e. the signal is yellow).

Reproduce:
* Load attached demo
* Start the train
* Use the deconstruction planner to remove a signal while it is yellow and the train is running

Note: I used the creative mode where a different bug showed up in the logfile; this is not related and can be ignored.

Thanks
th0

Code: Select all

   0.001 2019-06-11 22:19:31; Factorio 0.17.48 (build 45644, win64, steam)
   0.001 Operating system: Windows 7 Service Pack 1
   0.001 Program arguments: "E:\Steam\steamapps\common\Factorio\bin\x64\Factorio.exe" "--wait-to-close" "9368" 
   0.001 Read data path: E:/Steam/steamapps/common/Factorio/data
   0.001 Write data path: C:/Users/thorsten/AppData/Roaming/Factorio [57797/228833MB]
   0.001 Binaries path: E:/Steam/steamapps/common/Factorio/bin
   0.008 System info: [CPU: Intel(R) Core(TM) i3-4170 CPU @ 3.70GHz, 4 cores, RAM: 4581/8131 MB, page: 11110/21334 MB, virtual: 174/8388607 MB, extended virtual: 0 MB]
   0.008 Display options: [FullScreen: 1] [VSync: 1] [UIScale: automatic (100.0%)] [Native DPI: 1] [Screen: 255] [Special: 000] [Lang: en]
   0.037 Available displays: 1
   0.037  [0]: \\.\DISPLAY1 - NVIDIA GeForce GTX 750 {0x05, [0,0], 1920x1080, 32bit, 60Hz}
   0.142 [Direct3D11] Display: 0, Output: 0, DisplayAdapter: 0, RenderingAdapter: 0; d3dcompiler_43.dll
   0.234 Initialised Direct3D[0]: NVIDIA GeForce GTX 750; id: 10de-1381; driver: nvd3dumx.dll 10.18.13.6191
   0.234   D3D Feature Level: 11.0, DXGI 1.2+, SwapChain: 1,discard,-,-,-,none
   0.234   BGR 565 Supported: No
   0.234   MaximumFrameLatency: 3, GPUThreadPriority: 0
   0.312 Desktop composition is active.
   0.312 Graphics settings preset: medium-with-low-vram
   0.312   Dedicated video memory size 972 MB
   0.312 Graphics options: [Graphics quality: normal] [Video memory usage: high] [Light scale: 25%] [DXT: low-quality]
   0.312                   [Max load threads: 32] [Max texture size: 0] [Tex.Stream.: 1] [Rotation quality: low] [Color: 32bit]
   0.357 DSound: Starting _dsound_update thread
   0.358 DSound: Enter _dsound_update; tid=6660
   0.514 Loading mod settings creative-mod 1.0.4 (settings.lua)
   0.529 Loading mod core 0.0.0 (data.lua)
   0.762 Loading mod base 0.17.48 (data.lua)
   1.336 Loading mod creative-mod 1.0.4 (data.lua)
   1.475 Loading mod base 0.17.48 (data-updates.lua)
   1.574 Loading mod creative-mod 1.0.4 (data-final-fixes.lua)
   1.685 Checksum for core: 240630728
   1.685 Checksum of base: 3852333060
   1.685 Checksum of creative-mod: 1648215781
   1.762 Warning EnergySourcePrototype.cpp:91: emissions in prototype definition, use emissions_per_second_per_watt (proposed value 0) as emissions will be not used eventually: ROOT.assembling-machine.creative-mod_energy-void.energy_source
   1.911 Loading sounds...
   2.041 Info PlayerData.cpp:69: Local player-data.json unavailable
   2.041 Info PlayerData.cpp:72: Cloud player-data.json available, timestamp 1560277460
   2.144 Crop bitmaps.
   2.189 Parallel Sprite Loader initialized (threads: 3)
   2.325 Initial atlas bitmap size is 16384
   2.328 Created atlas bitmap 16384x6636 [none]
   2.329 Created atlas bitmap 4096x1952 [decal]
   2.329 Created atlas bitmap 8192x2240 [low-object]
   2.330 Created atlas bitmap 4096x2208 [mipmap, linear-minification, linear-magnification, linear-mip-level]
   2.330 Created atlas bitmap 8192x4256 [terrain, mipmap, linear-minification, linear-mip-level]
   2.330 Created atlas bitmap 4096x1600 [smoke, mipmap, linear-minification, linear-magnification]
   2.331 Created atlas bitmap 4096x1760 [icon, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level]
   2.331 Created atlas bitmap 2048x224 [icon-background, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level, ]
   2.331 Created atlas bitmap 4096x836 [alpha-mask]
   2.333 Created atlas bitmap 16384x3440 [shadow, linear-magnification, alpha-mask]
   2.334 Created atlas bitmap 4096x1328 [shadow, mipmap, linear-magnification, alpha-mask]
   2.348 Created virtual atlas pages 4096x4096x2
   2.353 Texture processor created (2048). GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
   4.023 Parallel Sprite Loader initialized (threads: 3)
   9.040 Sprites loaded
   9.051 Generated mipmaps (3) for atlas [2] of size 8192x2240   
   9.061 Generated mipmaps (3) for atlas [3] of size 4096x2208   
   9.075 Generated mipmaps (3) for atlas [4] of size 8192x4256   
   9.085 Generated mipmaps (3) for atlas [5] of size 4096x1600   
   9.095 Generated mipmaps (4) for atlas [6] of size 4096x1760   
   9.108 Generated mipmaps (3) for atlas [10] of size 4096x1328   
   9.108 Custom mipmaps uploaded.
   9.288 Generated mipmaps for virtual atlas of size 4096x8192
   9.292 Custom inputs active: 0
   9.355 Factorio initialised
  15.449 Loading level.dat: 1666564 bytes.
  15.450 Info Scenario.cpp:187: Map version 0.17.48-2
  16.126 Checksum for script C:/Users/thorsten/AppData/Roaming/Factorio/temp/currently-playing/control.lua: 1876143224
  16.175 Checksum for script __creative-mod__/control.lua: 3742384525
  22.989 Error MainLoop.cpp:1183: Exception at tick 111: The mod Creative Mod caused a non-recoverable error.
Please report this error to the mod author.

Error while running event creative-mod::on_tick (ID 0)
real number expected got nil.
stack traceback:
	__creative-mod__/scripts/cheats.lua:2516: in function 'get_inventory_or_slot_count_function'
	__creative-mod__/scripts/cheats.lua:2608: in function 'apply_slot_cheat_to_players'
	__creative-mod__/scripts/cheats.lua:2695: in function 'tick'
	__creative-mod__/scripts/events.lua:177: in function <__creative-mod__/scripts/events.lua:146>
stack traceback:
	[C]: in function 'get_inventory'
	__creative-mod__/scripts/cheats.lua:2516: in function 'get_inventory_or_slot_count_function'
	__creative-mod__/scripts/cheats.lua:2608: in function 'apply_slot_cheat_to_players'
	__creative-mod__/scripts/cheats.lua:2695: in function 'tick'
	__creative-mod__/scripts/events.lua:177: in function <__creative-mod__/scripts/events.lua:146
  33.422 Loading level.dat: 1666564 bytes.
  33.423 Info Scenario.cpp:187: Map version 0.17.48-2
  33.939 Checksum for script C:/Users/thorsten/AppData/Roaming/Factorio/temp/currently-playing/control.lua: 1876143224
  33.965 Checksum for script __creative-mod__/control.lua: 3742384525
 143.242 Info AppManagerStates.cpp:1752: Saving finished
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\cygwin64\tmp\factorio-build-psgcmk\libraries\stackwalker\stackwalker.cpp (924): StackWalker::ShowCallstack
c:\cygwin64\tmp\factorio-build-psgcmk\src\util\logger.cpp (383): Logger::writeStacktrace
c:\cygwin64\tmp\factorio-build-psgcmk\src\util\logger.cpp (534): Logger::logStacktrace
c:\cygwin64\tmp\factorio-build-psgcmk\src\util\logging.cpp (96): Logging::logAndAbortOrThrow
c:\cygwin64\tmp\factorio-build-psgcmk\src\util\logging.cpp (90): Logging::logAndAbortOrThrow
c:\cygwin64\tmp\factorio-build-psgcmk\src\rail\trainsignallogic.cpp (63): TrainSignalLogic::cancelReservations
c:\cygwin64\tmp\factorio-build-psgcmk\src\rail\train.cpp (323): Train::deletePath
c:\cygwin64\tmp\factorio-build-psgcmk\src\rail\train.cpp (2015): Train::recalculatePath
c:\cygwin64\tmp\factorio-build-psgcmk\src\rail\trainmanager.cpp (925): TrainManager::recalculatePaths
c:\cygwin64\tmp\factorio-build-psgcmk\src\rail\trainmanager.cpp (788): TrainManager::onSignalDestroyed
c:\cygwin64\tmp\factorio-build-psgcmk\src\entity\railsignalbase.cpp (705): RailSignalBase::disconnect
c:\cygwin64\tmp\factorio-build-psgcmk\src\entity\entity.cpp (2007): Entity::orderDeconstruction
c:\cygwin64\tmp\factorio-build-psgcmk\src\input\commonactionhandler.cpp (397): CommonActionHandler::deconstruct
c:\cygwin64\tmp\factorio-build-psgcmk\src\gameactionhandler.cpp (3903): GameActionHandler::deconstruct
c:\cygwin64\tmp\factorio-build-psgcmk\src\gameactionhandler.cpp (323): GameActionHandler::actionPerformed
c:\cygwin64\tmp\factorio-build-psgcmk\src\input\inputhandler.cpp (61): InputHandler::flushActions
c:\cygwin64\tmp\factorio-build-psgcmk\src\gameactionhandler.cpp (366): GameActionHandler::update
c:\cygwin64\tmp\factorio-build-psgcmk\src\mainloop.cpp (1149): MainLoop::gameUpdateStep
c:\cygwin64\tmp\factorio-build-psgcmk\src\mainloop.cpp (1022): MainLoop::gameUpdateLoop
c:\cygwin64\tmp\factorio-build-psgcmk\src\util\workerthread.cpp (42): WorkerThread::loop
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*)(ParallelDesyncReportCreator *),ParallelDesyncReportCreator *>,std::default_delete<std::tuple<void (__cdecl*)(ParallelDesyncReportCreator *),ParallelDesyncReportCreator *> > > >::_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: 00000000778D59CD)
00000000778D59CD (kernel32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 0000000077B0A561)
0000000077B0A561 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
 177.230 Error RailBlock.cpp:172: *this->reservedFor == train was not true
Logger::writeStacktrace skipped.
 177.230 Error CrashHandler.cpp:177: Map tick at moment of crash: 7685
 177.230 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.
 180.951 Uploading log file
 180.955 Error CrashHandler.cpp:222: Heap validation: success.
 180.964 Creating crash dump.
 181.554 CrashDump success
Attachments
test.zip
(2.75 MiB) Downloaded 80 times

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2241
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [0.17.48] Removing yellow rail signal: Error RailBlock.cpp:172: *this->reservedFor == train was not true

Post by boskid »

Ref 71724

---
Can reproduce

Here is save that is easier to reproduce:
1/ Open "repr-71917.zip"
repr-71917.zip
(234.79 KiB) Downloaded 80 times
2/ Using deconstruction planner, select bottom rail signal
3/ When releasing mouse, there should be instant crash
log
71917-crash.png
71917-crash.png (479.93 KiB) Viewed 2089 times

burninghey
Fast Inserter
Fast Inserter
Posts: 115
Joined: Fri Sep 14, 2018 2:06 am
Contact:

Re: [0.17.48] Removing yellow rail signal: Error RailBlock.cpp:172: *this->reservedFor == train was not true

Post by burninghey »

Same (i think so?) issue here. Crash while removing rail signals with deconstruction planner (outside of robot area).
factorio-previous.log
(26.4 KiB) Downloaded 131 times
Save file only if requested, it's too big for my internet connection

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.17.48] Removing yellow rail signal: Error RailBlock.cpp:172: *this->reservedFor == train was not true

Post by kovarex »

Thanks for the report, it is fixed for the next release now.

th0
Inserter
Inserter
Posts: 37
Joined: Sat Mar 16, 2019 12:04 pm
Contact:

Re: [kovarex] [0.17.48] Removing yellow rail signal: Error RailBlock.cpp:172: *this->reservedFor == train was not true

Post by th0 »

Great work, as always. Thanks.

Could you shed light on what was the cause of these several rail problems? Asking out of curiosity.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [kovarex] [0.17.48] Removing yellow rail signal: Error RailBlock.cpp:172: *this->reservedFor == train was not true

Post by kovarex »

It is a result of having to make the rail signal and block reservation rigid to solve a specific bug. I will probably cover it in next fff.

Post Reply

Return to “Resolved Problems and Bugs”