[0.17.47] Crash: *this->reservedFor == train was not true

This subforum contains all the issues which we already resolved.
darklich14
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Sat Feb 24, 2018 3:07 am
Contact:

[0.17.47] Crash: *this->reservedFor == train was not true

Post by darklich14 »

You do not want my save file. Trust me. Here's a stack trace though.

Code: Select all

Factorio crashed. Generating symbolized stacktrace, please wait ...
Raw stacktrace: 0xaef60b, 0xca67fd, 0x9b4c18, 0x9d0fbf, 0xc20191, 0xc20b67, 0xed4228, 0xed475f, 0xed4d72, 0xed4ecc, 0x9f0f60, 0xaab4f3, 0xed8e30, 0xc74eb4, 0x80025c, 0xa9b45c, 0xf50a73, 0xf510a0, 0xb07f41, 0x185de9f, 0x7494, 0
7004.491 Warning Logger.cpp:510: Symbols.size() == 33, usedSize == 21
#0  0x0000000000ca67fd in std::__uniq_ptr_impl<LoggerFileWriteStream, std::default_delete<LoggerFileWriteStream> >::_M_ptr() const at /usr/include/c++/8/bits/unique_ptr.h:150
#1  0x00000000009b4c18 in std::unique_ptr<LoggerFileWriteStream, std::default_delete<LoggerFileWriteStream> >::get() const at /usr/include/c++/8/bits/unique_ptr.h:343
#2  0x00000000009d0fbf in std::unique_ptr<LoggerFileWriteStream, std::default_delete<LoggerFileWriteStream> >::operator->() const at /usr/include/c++/8/bits/unique_ptr.h:337
#3  0x0000000000c20191 in Logger::flush() at /tmp/factorio-build-XWZIpm/src/Util/Logger.cpp:548
#4  0x0000000000c20b67 in Logger::logStacktrace(StackTraceInfo*) at /tmp/factorio-build-XWZIpm/src/Util/Logger.cpp:534
#5  0x0000000000ed4228 in Logging::flush() at /tmp/factorio-build-XWZIpm/src/Util/Logging.cpp:66
#6  0x0000000000ed475f in Logging::logAndAbortOrThrow(char const*, unsigned int, LogLevel, std::string const&) at /tmp/factorio-build-XWZIpm/src/Util/Logging.cpp:97
#7  0x0000000000ed4d72 in Logging::logAndAbortOrThrow(char const*, unsigned int, LogLevel, char const*, ...) at /tmp/factorio-build-XWZIpm/src/Util/Logging.cpp:90
#8  0x0000000000ed4ecc in TrainSignalLogic::cancelReservations(Train*) at /tmp/factorio-build-XWZIpm/src/Rail/RailBlock.cpp:169
#9  0x00000000009f0f60 in std::_Deque_iterator<RailSignalData, RailSignalData&, RailSignalData*>::_Deque_iterator(std::_Deque_iterator<RailSignalData, RailSignalData&, RailSignalData*> const&) at /usr/include/c++/8/bits/stl_deque.h:154
#10 0x0000000000aab4f3 in std::deque<RailSignalData, std::allocator<RailSignalData> >::begin() at /usr/include/c++/8/bits/stl_deque.h:1177
#11 0x0000000000ed8e30 in std::deque<RailSignalData, std::allocator<RailSignalData> >::clear() at /usr/include/c++/8/bits/stl_deque.h:1851
#12 0x0000000000c74eb4 in TrainSignalLogic::clear(Train*) at /tmp/factorio-build-XWZIpm/src/Rail/TrainSignalLogic.cpp:93
#13 0x000000000080025c in Train::deletePath() at /tmp/factorio-build-XWZIpm/src/Rail/Train.cpp:323
#14 0x0000000000a9b45c in Train::recalculatePath(Train::AllowDirectionChange, bool, Rail const*) at /tmp/factorio-build-XWZIpm/src/Rail/Train.cpp:2024
#15 0x0000000000f50a73 in TrainManager::recalculatePaths() at /tmp/factorio-build-XWZIpm/src/Rail/TrainManager.cpp:906 (discriminator 2)
#16 0x0000000000f510a0 in TrainManager::onSignalDestroyed(RailSignalBase*, bool) at /tmp/factorio-build-XWZIpm/src/Rail/TrainManager.cpp:747
#17 0x0000000000b07f41 in std::vector<RailSignalConnection, std::allocator<RailSignalConnection> >::clear() at /usr/include/c++/8/bits/stl_vector.h:1386
#18 0x000000000185de9f in RailSignalBase::disconnect() at /tmp/factorio-build-XWZIpm/src/Entity/RailSignalBase.cpp:698
#19 0x0000000000007494 in Entity::orderDeconstruction(ForceID, Player*) at /tmp/factorio-build-XWZIpm/src/Entity/Entity.cpp:2007
#20 (nil) in CommonActionHandler::deconstruct(Surface&, BoundingBox const&, bool, ForceID, Player*, SelectionTool const*, bool) at /tmp/factorio-build-XWZIpm/src/Input/CommonActionHandler.cpp:397
#21 (nil) in GameActionHandler::copy(InputAction const&, Controller*) at /tmp/factorio-build-XWZIpm/src/GameActionHandler.cpp:3996
#22 0x0000000000b4c8f8 in GameActionHandler::actionPerformed(InputAction const&) at /tmp/factorio-build-XWZIpm/src/GameActionHandler.cpp:326 (discriminator 1)
#23 0x00000000052f1441 in InputHandler::flushToListeners(InputAction const&, bool) at /tmp/factorio-build-XWZIpm/src/Input/InputHandler.cpp:72
#24 (nil) in InputHandler::flushActions(bool, unsigned int) at /tmp/factorio-build-XWZIpm/src/Input/InputHandler.cpp:64
#25 0x00007f4307dfc8dc in GameActionHandler::update() at /tmp/factorio-build-XWZIpm/src/GameActionHandler.cpp:366
#26 (nil) in MainLoop::gameUpdateStep(MultiplayerManagerBase*, Scenario*, AppManager*, MainLoop::HeavyMode) at /tmp/factorio-build-XWZIpm/src/MainLoop.cpp:1149
#27 0x00007f4307dfc978 in MainLoop::gameUpdateLoop(MainLoop::HeavyMode) at /tmp/factorio-build-XWZIpm/src/MainLoop.cpp:1022
#28 0x015bd4cef3fa4100 in std::function<void ()>::operator=(decltype(nullptr)) at /usr/include/c++/8/bits/std_function.h:495
#29 0x0000004b00000d5a in WorkerThread::loop() at /tmp/factorio-build-XWZIpm/src/Util/WorkerThread.cpp:42
#30 0x00017f40d6af29b0 in execute_native_thread_routine at blake2s.c:?
#31 (nil) in ?? at ??:0
#32 0x00007f41bb861f40 in ?? at ??:0
Stack trace logging done
7012.457 Warning Logger.cpp:510: Symbols.size() == 28, usedSize == 20
7012.457 Error RailBlock.cpp:169: *this->reservedFor == train was not true
dugen
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sat Jun 08, 2019 1:53 am
Contact:

Re: [0.17.47] Crash: *this->reservedFor == train was not true

Post by dugen »

I'm getting this too. It happens when I try and remove a bunch of regular signals on a complicated track with a bunch of chain signals mixed in. It's happened twice tonight, both times I was deleting the same signals. No mods.
Attachments
factorio-previous.log
(12.6 KiB) Downloaded 116 times
darklich14
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Sat Feb 24, 2018 3:07 am
Contact:

Re: [0.17.47] Crash: *this->reservedFor == train was not true

Post by darklich14 »

I should have included that's what i was doing: deconning chunks of rails with at least a few rails and each signal type in the selection. I think the stack trace hints at that but maybe not.
Loewchen
Global Moderator
Global Moderator
Posts: 9235
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [0.17.47] Crash: *this->reservedFor == train was not true

Post by Loewchen »

Ref.: 71739 (contains save and crash-dump)
User avatar
Mithaldu
Long Handed Inserter
Long Handed Inserter
Posts: 86
Joined: Sun Mar 13, 2016 5:39 pm
Contact:

Re: [0.17.47] Crash: *this->reservedFor == train was not true

Post by Mithaldu »

I think i've experienced this crash too, while deconstructing a bunch of rails and chain signals, no normal signals, nothing else; in a system that is ... very complex.

Full factorio dir: https://www.dropbox.com/s/n63bbcslusx7z ... ct.7z?dl=1

Code: Select all

[...]
[...]\rail\trainsignallogic.cpp (64): TrainSignalLogic::cancelReservations
[...]\rail\train.cpp (323): Train::deletePath
[...]\rail\train.cpp (2024): Train::recalculatePath
[...]\rail\trainmanager.cpp (906): TrainManager::recalculatePaths
[...]\rail\trainmanager.cpp (769): TrainManager::onSignalDestroyed
[...]\entity\railsignalbase.cpp (698): RailSignalBase::disconnect
[...]\entity\entity.cpp (2007): Entity::orderDeconstruction
[...]\input\commonactionhandler.cpp (397): CommonActionHandler::deconstruct
[...]
7176.205 Error RailBlock.cpp:169: *this->reservedFor == train was not true 
Attachments
factorio-current.log
(27.03 KiB) Downloaded 114 times
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3024
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [0.17.47] Crash: *this->reservedFor == train was not true

Post by boskid »

Steps to reproduce:
1/ open "train-test-d.zip"
2/ wait for robot to place chain signal (~5s)
3/ wait 200ms more
4/ crash

Code: Select all

c:\cygwin64\tmp\factorio-build-lpvbru\src\rail\trainsignallogic.cpp (64): TrainSignalLogic::cancelReservations
c:\cygwin64\tmp\factorio-build-lpvbru\src\rail\trainsignallogic.cpp (204): TrainSignalLogic::fillSignalData
c:\cygwin64\tmp\factorio-build-lpvbru\src\rail\train.cpp (2067): Train::updateSignalLogicAfterPathChange
c:\cygwin64\tmp\factorio-build-lpvbru\src\rail\train.cpp (954): Train::checkArriving
c:\cygwin64\tmp\factorio-build-lpvbru\src\rail\train.cpp (1057): Train::update
c:\cygwin64\tmp\factorio-build-lpvbru\src\rail\trainmanager.cpp (245): TrainManager::update
c:\cygwin64\tmp\factorio-build-lpvbru\src\map\map.cpp (1498): Map::updateEntities
c:\cygwin64\tmp\factorio-build-lpvbru\src\game.cpp (201): Game::update
c:\cygwin64\tmp\factorio-build-lpvbru\src\scenario\scenario.cpp (1216): Scenario::update
c:\cygwin64\tmp\factorio-build-lpvbru\src\mainloop.cpp (1155): MainLoop::gameUpdateStep
c:\cygwin64\tmp\factorio-build-lpvbru\src\mainloop.cpp (1022): MainLoop::gameUpdateLoop

Code: Select all

128.010 Error RailBlock.cpp:169: *this->reservedFor == train was not true
Attachments
train-tests-d.zip
(293.55 KiB) Downloaded 111 times
factorio-dump-current.dmp
(755.02 KiB) Downloaded 125 times
factorio-current.log
(19.94 KiB) Downloaded 117 times
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3024
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [0.17.47] Crash: *this->reservedFor == train was not true

Post by boskid »

Even simplest setups are crashing...

Steps to reproduce:
1/ open "train-test-f.zip"
2/ go to time control page of editor
3/ resume time (play button)
4/ wait ~5s
5/ crash

Code: Select all

c:\cygwin64\tmp\factorio-build-lpvbru\src\rail\trainsignallogic.cpp (64): TrainSignalLogic::cancelReservations
c:\cygwin64\tmp\factorio-build-lpvbru\src\rail\trainsignallogic.cpp (204): TrainSignalLogic::fillSignalData
c:\cygwin64\tmp\factorio-build-lpvbru\src\rail\train.cpp (2067): Train::updateSignalLogicAfterPathChange
c:\cygwin64\tmp\factorio-build-lpvbru\src\rail\train.cpp (954): Train::checkArriving
c:\cygwin64\tmp\factorio-build-lpvbru\src\rail\train.cpp (1057): Train::update
c:\cygwin64\tmp\factorio-build-lpvbru\src\rail\trainmanager.cpp (245): TrainManager::update
c:\cygwin64\tmp\factorio-build-lpvbru\src\map\map.cpp (1498): Map::updateEntities
c:\cygwin64\tmp\factorio-build-lpvbru\src\game.cpp (201): Game::update
c:\cygwin64\tmp\factorio-build-lpvbru\src\scenario\scenario.cpp (1216): Scenario::update
c:\cygwin64\tmp\factorio-build-lpvbru\src\mainloop.cpp (1155): MainLoop::gameUpdateStep
c:\cygwin64\tmp\factorio-build-lpvbru\src\mainloop.cpp (1022): MainLoop::gameUpdateLoop

Code: Select all

28.265 Error RailBlock.cpp:169: *this->reservedFor == train was not true
Attachments
train-tests-f.zip
(235.47 KiB) Downloaded 118 times
factorio-dump-current.dmp
(777.33 KiB) Downloaded 126 times
factorio-current.log
(14 KiB) Downloaded 119 times
superwad
Burner Inserter
Burner Inserter
Posts: 7
Joined: Thu Apr 26, 2018 5:02 am
Contact:

Re: [0.17.47] Crash: *this->reservedFor == train was not true

Post by superwad »

I've noticed this too with deconstruction of simple setups.

Attached is a small reproduction. Take the deconstruction planner in hand, mark the construction area, and release when the train goes through the marked area. Game will crash.
Attachments
TrainCrash.zip
(1.76 MiB) Downloaded 126 times
factorio-current.log
(11.29 KiB) Downloaded 139 times
darklich14
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Sat Feb 24, 2018 3:07 am
Contact:

Re: [0.17.47] Crash: *this->reservedFor == train was not true

Post by darklich14 »

Similar crash doing similar things, but different assertion:

Code: Select all

Error TrainSignalLogic.cpp:110: this->reservedSignalsClose[0].signal == signal was not true

Code: Select all

Raw stacktrace: 0x9b4495, 0x9b4c18, 0x9d0fbf, 0xaa18f8, 0xee661f, 0xee71eb, 0x9fb992, 0x9fbbaf, 0xa04370, 0xee8eec, 0xee923a, 0xee9688, 0xeeec2a, 0xf2155c, 0xf2195d, 0xf21cb7, 0xf50ab4, 0xf510a0, 0xb07f41, 0x185de9f, 0x7494, 0
75847.453 Warning Logger.cpp:510: Symbols.size() == 30, usedSize == 21
#0  0x00000000009b4c18 in Logging::flush() at /tmp/factorio-build-XWZIpm/src/Util/Logging.cpp:66
#1  0x00000000009d0fbf in Logging::logAndAbortOrThrow(char const*, unsigned int, LogLevel, std::string const&) at /tmp/factorio-build-XWZIpm/src/Util/Logging.cpp:97
#2  0x0000000000aa18f8 in Logging::logAndAbortOrThrow(char const*, unsigned int, LogLevel, char const*, ...) at /tmp/factorio-build-XWZIpm/src/Util/Logging.cpp:90
#3  0x0000000000ee661f in TrainSignalLogic::signalPassed(RailSignalBase const*) at /tmp/factorio-build-XWZIpm/src/Rail/TrainSignalLogic.cpp:110
#4  0x0000000000ee71eb in TrainState::isManual() const at /tmp/factorio-build-XWZIpm/src/Rail/TrainState.cpp:35
#5  0x00000000009fb992 in Train::inManualMode() const at /tmp/factorio-build-XWZIpm/src/Rail/Train.hpp:160
#6  0x00000000009fbbaf in Train::resolveRailTransition(Rail*, Rail*, bool) at /tmp/factorio-build-XWZIpm/src/Rail/Train.cpp:1717
#7  0x0000000000a04370 in std::_Function_handler<void (Rail*, Rail*, bool), Train::setup(SetupData const&)::{lambda(Rail*, Rail*, bool)#2}>::_M_invoke(std::_Any_data const&, Rail*&&, std::_Any_data const&, bool&&) at /usr/include/c++/8/bits/std_function.h:299
#8  0x0000000000ee8eec in RollingStock::Carriage::moveFrontJointForward(double, RidingState::Direction const&) at /tmp/factorio-build-XWZIpm/src/Entity/RollingStock.cpp:292
#9  0x0000000000ee923a in RollingStock::move(double, RidingState::Direction const&, bool) at /tmp/factorio-build-XWZIpm/src/Entity/RollingStock.cpp:366
#10 0x0000000000ee9688 in Train::tryToMove(double) at /tmp/factorio-build-XWZIpm/src/Rail/Train.cpp:1957 (discriminator 1)
#11 0x0000000000eeec2a in Train::move(double) at /tmp/factorio-build-XWZIpm/src/Rail/Train.cpp:1824
#12 0x0000000000f2155c in Train::updateSpeedAndMove() at /tmp/factorio-build-XWZIpm/src/Rail/Train.cpp:1324
#13 0x0000000000f2195d in Train::update() at /tmp/factorio-build-XWZIpm/src/Rail/Train.cpp:1046
#14 0x0000000000f21cb7 in TrainManager::update(bool) at /tmp/factorio-build-XWZIpm/src/Rail/TrainManager.cpp:248
#15 0x0000000000f50ab4 in __gnu_cxx::__normal_iterator<ForceData**, std::vector<ForceData*, std::allocator<ForceData*> > >::__normal_iterator(ForceData** const&) at /usr/include/c++/8/bits/stl_iterator.h:781
#16 0x0000000000f510a0 in std::vector<ForceData*, std::allocator<ForceData*> >::end() at /usr/include/c++/8/bits/stl_vector.h:717
#17 0x0000000000b07f41 in ForceManager::update(unsigned int) at /tmp/factorio-build-XWZIpm/src/Force/ForceManager.cpp:107
#18 0x000000000185de9f in Map::updateEntities() at /tmp/factorio-build-XWZIpm/src/Map/Map.cpp:1498
#19 0x0000000000007494 in Map::update() at /tmp/factorio-build-XWZIpm/src/Map/Map.cpp:1447
#20 (nil) in Game::update() at /tmp/factorio-build-XWZIpm/src/Game.cpp:201
#21 (nil) in Scenario::update() at /tmp/factorio-build-XWZIpm/src/Scenario/Scenario.cpp:1216
#22 0x4149432cc35b9259 in Scenario::updateStep() at /tmp/factorio-build-XWZIpm/src/Scenario/Scenario.cpp:1113
#23 0x416fca0555555555 in MainLoop::gameUpdateStep(MultiplayerManagerBase*, Scenario*, AppManager*, MainLoop::HeavyMode) at /tmp/factorio-build-XWZIpm/src/MainLoop.cpp:1155
#24 0x3fe5310f39a5b800 in MainLoop::gameUpdateLoop(MainLoop::HeavyMode) at /tmp/factorio-build-XWZIpm/src/MainLoop.cpp:1022
#25 0x40c1f87ee826e69a in std::function<void ()>::operator=(decltype(nullptr)) at /usr/include/c++/8/bits/std_function.h:495
#26 0x40c39abb4e58ecf5 in WorkerThread::loop() at /tmp/factorio-build-XWZIpm/src/Util/WorkerThread.cpp:42
#27 0x416fca0555555555 in execute_native_thread_routine at blake2s.c:?
#28 0x400a7d53080f2600 in ?? at ??:0
#29 0x408f400000000000 in ?? at ??:0
Stack trace logging done
75847.453 Error TrainSignalLogic.cpp:110: this->reservedSignalsClose[0].signal == signal was not true
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3024
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [0.17.47] Crash: *this->reservedFor == train was not true

Post by boskid »

darklich14 wrote: Sun Jun 09, 2019 5:51 pm Similar crash doing similar things, but different assertion:

Code: Select all

Error TrainSignalLogic.cpp:110: this->reservedSignalsClose[0].signal == signal was not true
For now this is more like 71717, not this bug report. Maybe they are related but for now they should be treated as different issues
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.17.47] Crash: *this->reservedFor == train was not true

Post by kovarex »

Thanks for the report, this and other issues fixed for the next release.
Post Reply

Return to “Resolved Problems and Bugs”