[kovarex] [0.17.50] *this->reservedFor == train was not true

This subforum contains all the issues which we already resolved.
Post Reply
EnigmaticAussie
Fast Inserter
Fast Inserter
Posts: 129
Joined: Mon Dec 18, 2017 7:53 am
Contact:

[kovarex] [0.17.50] *this->reservedFor == train was not true

Post by EnigmaticAussie »

As per https://github.com/Nexela/PickerDollies/issues/7

Steps to repro:
Load https://drive.google.com/file/d/1fcvOUb ... sp=sharing
Move Yellow Signal (second from left, hidden behind station) up 1 tile.
Crash.

Code: Select all

6908.769 Time travel logging:
 262.548 Popped blueprint record (player-index: 0, ID: 964) from book (player-index: 0, ID: 828)
 262.658 Deleting surface _BPEX_Temp_Surface index 2.
Factorio crashed. Generating symbolized stacktrace, please wait ...
Raw stacktrace: 0xaf152b, 0xcae9cd, 0x9aa238, 0x9c69cf, 0xc315cb, 0xc31aea, 0xed56aa, 0xed5c7f, 0xed6292, 0xed63ec, 0xed7630, 0xb3bd95, 0xb3c02e, 0xb3c138, 0x12eff2a, 0x150ebfb, 0x152012c, 0x150edf8, 0x150ee49, 0x150eea9, 0x15096a6, 0x6f4ccc, 0xdf6dc2, 0x134a3ff, 0xd15fdc, 0xc7820c, 0x7fb36c, 0xa9e37c, 0xf53363, 0xf538e2, 0xb0a0d1, 0x1857fbf, 0x9182, 0
6914.198 Warning Logger.cpp:510: Symbols.size() == 48, usedSize == 33
#0  0x0000000000cae9cd in std::__uniq_ptr_impl<LoggerFileWriteStream, std::default_delete<LoggerFileWriteStream> >::_M_ptr() const at /usr/include/c++/8/bits/unique_ptr.h:150
#1  0x00000000009aa238 in std::unique_ptr<LoggerFileWriteStream, std::default_delete<LoggerFileWriteStream> >::get() const at /usr/include/c++/8/bits/unique_ptr.h:343
#2  0x00000000009c69cf in std::unique_ptr<LoggerFileWriteStream, std::default_delete<LoggerFileWriteStream> >::operator->() const at /usr/include/c++/8/bits/unique_ptr.h:337
#3  0x0000000000c315cb in Logger::flush() at /tmp/factorio-build-qhU3be/src/Util/Logger.cpp:548
#4  0x0000000000c31aea in Logger::logStacktrace(StackTraceInfo*) at /tmp/factorio-build-qhU3be/src/Util/Logger.cpp:534
#5  0x0000000000ed56aa in Logging::flush() at /tmp/factorio-build-qhU3be/src/Util/Logging.cpp:66
#6  0x0000000000ed5c7f in Logging::logAndAbortOrThrow(char const*, unsigned int, LogLevel, std::string const&) at /tmp/factorio-build-qhU3be/src/Util/Logging.cpp:97
#7  0x0000000000ed6292 in Logging::logAndAbortOrThrow(char const*, unsigned int, LogLevel, char const*, ...) at /tmp/factorio-build-qhU3be/src/Util/Logging.cpp:90
#8  0x0000000000ed63ec in TrainSignalLogic::cancelReservations(Train*, std::set<RailSignalBase*, std::less<RailSignalBase*>, std::allocator<RailSignalBase*> >*) at /tmp/factorio-build-qhU3be/src/Rail/RailBlock.cpp:172
#9  0x0000000000ed7630 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 0x0000000000b3bd95 in std::deque<RailSignalData, std::allocator<RailSignalData> >::begin() at /usr/include/c++/8/bits/stl_deque.h:1177
#11 0x0000000000b3c02e in std::deque<RailSignalData, std::allocator<RailSignalData> >::clear() at /usr/include/c++/8/bits/stl_deque.h:1851
#12 0x0000000000b3c138 in TrainSignalLogic::clear(Train*, std::set<RailSignalBase*, std::less<RailSignalBase*>, std::allocator<RailSignalBase*> >*) at /tmp/factorio-build-qhU3be/src/Rail/TrainSignalLogic.cpp:104
#13 0x00000000012eff2a in Train::deletePath(std::set<RailSignalBase*, std::less<RailSignalBase*>, std::allocator<RailSignalBase*> >*) at /tmp/factorio-build-qhU3be/src/Rail/Train.cpp:323
#14 0x000000000150ebfb in Train::recalculatePath(Train::AllowDirectionChange, bool, Rail const*) at /tmp/factorio-build-qhU3be/src/Rail/Train.cpp:1995
#15 0x000000000152012c in TrainManager::recalculatePaths() at /tmp/factorio-build-qhU3be/src/Rail/TrainManager.cpp:925 (discriminator 2)
#16 0x000000000150edf8 in TrainManager::onSignalDestroyed(RailSignalBase*, bool) at /tmp/factorio-build-qhU3be/src/Rail/TrainManager.cpp:766
#17 0x000000000150ee49 in std::vector<RailSignalConnection, std::allocator<RailSignalConnection> >::clear() at /usr/include/c++/8/bits/stl_vector.h:1386
#18 0x000000000150eea9 in RailSignalBase::disconnect() at /tmp/factorio-build-qhU3be/src/Entity/RailSignalBase.cpp:726
#19 0x00000000015096a6 in RailSignalBase::onChangePosition(MapPosition const&) at /tmp/factorio-build-qhU3be/src/Entity/RailSignalBase.cpp:705
#20 0x00000000006f4ccc in Entity::teleport(MapPosition) at /tmp/factorio-build-qhU3be/src/Entity/Entity.cpp:818
#21 0x0000000000df6dc2 in ControlAdapter::teleport(MapPosition const&, Surface*) at /tmp/factorio-build-qhU3be/src/Script/LuaControl.cpp:256
#22 0x000000000134a3ff in LuaControl::luaTeleport(lua_State*) at /tmp/factorio-build-qhU3be/src/Script/LuaControl.cpp:884
#23 0x0000000000d15fdc in LuaBinder<LuaEntity>::callWrapper(lua_State*) at /tmp/factorio-build-qhU3be/src/Script/LuaBinder.hpp:327 (discriminator 4)
#24 0x0000000000c7820c in luaD_precall(lua_State*, lua_TValue*, int) at /tmp/factorio-build-qhU3be/libraries/Lua/ldo.c:350
#25 0x00000000007fb36c in luaV_execute(lua_State*) at /tmp/factorio-build-qhU3be/libraries/Lua/lvm.c:710 (discriminator 3)
#26 0x0000000000a9e37c in luaD_call(lua_State*, lua_TValue*, int, int) at /tmp/factorio-build-qhU3be/libraries/Lua/ldo.c:424
#27 0x0000000000f53363 in luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) at /tmp/factorio-build-qhU3be/libraries/Lua/ldo.c:165
#28 0x0000000000f538e2 in luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) at /tmp/factorio-build-qhU3be/libraries/Lua/ldo.c:623
#29 0x0000000000b0a0d1 in lua_pcallk at /tmp/factorio-build-qhU3be/libraries/Lua/lapi.c:1071
#30 0x0000000001857fbf in LuaHelper::pCallWithStackTrace(lua_State*, int, int) at /tmp/factorio-build-qhU3be/src/Util/LuaHelper.cpp:3331
#31 0x0000000000009182 in LuaGameScript::signallingPCall(lua_State*, int, int) at /tmp/factorio-build-qhU3be/src/Script/LuaGameScript.cpp:5882
#32 (nil) in LuaGameScript::runEventHandler(unsigned int, int) at /tmp/factorio-build-qhU3be/src/Script/LuaGameScript.cpp:895
#33 (nil) in TimeUtil::CpuTimer::elapsed() const at /tmp/factorio-build-qhU3be/src/Util/TimeUtil.hpp:44
#34 0x0000000000000001 in void LuaEventDispatcher::run<GameAction>(unsigned int, unsigned int, bool (LuaGameScript::*)(GameAction const&), GameAction const&) at /tmp/factorio-build-qhU3be/src/Script/LuaEventDispatcher.cpp:540
#35 0x00000000022d2f6c in GameActionDispatcher::sendToListeners(GameAction const&) at /tmp/factorio-build-qhU3be/src/GameActionDispatcher.cpp:14
#36 0x0000000000653878 in GameActionHandler::customInput(InputAction const&, Player*) at /tmp/factorio-build-qhU3be/src/GameActionHandler.cpp:3083
#37 0x408c258d3813719f in GameActionHandler::actionPerformed(InputAction const&) at /tmp/factorio-build-qhU3be/src/GameActionHandler.cpp:325 (discriminator 4)
#38 0x3ff0000000000000 in InputHandler::flushToListeners(InputAction const&, bool) at /tmp/factorio-build-qhU3be/src/Input/InputHandler.cpp:72
#39 0x408c0e40701a053f in InputHandler::flushActions(bool, unsigned int) at /tmp/factorio-build-qhU3be/src/Input/InputHandler.cpp:64
#40 0x408c01cc1d61dee4 in GameActionHandler::update() at /tmp/factorio-build-qhU3be/src/GameActionHandler.cpp:366
#41 0x412e848000000000 in MainLoop::gameUpdateStep(MultiplayerManagerBase*, Scenario*, AppManager*, MainLoop::HeavyMode) at /tmp/factorio-build-qhU3be/src/MainLoop.cpp:1149
#42 0x4137c13e664ce842 in MainLoop::gameUpdateLoop(MainLoop::HeavyMode) at /tmp/factorio-build-qhU3be/src/MainLoop.cpp:1022
#43 0x416fca0555555555 in std::function<void ()>::operator=(decltype(nullptr)) at /usr/include/c++/8/bits/std_function.h:495
#44 0x3fd3ed5126a3c4cd in WorkerThread::loop() at /tmp/factorio-build-qhU3be/src/Util/WorkerThread.cpp:42
#45 0x40c3500ee5f6fc77 in execute_native_thread_routine at blake2s.c:?
#46 0x40c511807d20f345 in ?? at ??:0
#47 0x416fca0555555555 in ?? at ??:0
Stack trace logging done
6919.801 Warning Logger.cpp:510: Symbols.size() == 43, usedSize == 32
6919.801 Error RailBlock.cpp:172: *this->reservedFor == train was not true
Logger::writeStacktrace skipped.
6919.801 Error CrashHandler.cpp:181: Map tick at moment of crash: 36515693

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

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

Post by boskid »

"be precise": step "move yellow signal" means "point to hidden chain signal and press "Shift+Up" (Settings -> Controls -> Mods -> Picker Dollies -> "move entity north")

Can reproduce
log
---

moving left also crashes

---

Another way to reproduce (works without any mods enabled):
1/ Open save
2/ Point to second yellow signal
3/ Execute:

Code: Select all

/c game.player.selected.teleport({0,0})
4/ Crash
log
-- edit:
"no brainer" reproduction:
1/ Download and open https://drive.google.com/file/d/1fcvOUb ... sp=sharing (works without mods)
2/ Execute

Code: Select all

/c game.surfaces["nauvis"].find_entity('rail-signal', {-1130.5, 1123.5}).teleport({0,0})
3/ Crash
Last edited by boskid on Fri Jun 21, 2019 6:43 am, edited 1 time in total.

EnigmaticAussie
Fast Inserter
Fast Inserter
Posts: 129
Joined: Mon Dec 18, 2017 7:53 am
Contact:

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

Post by EnigmaticAussie »

boskid wrote:
Fri Jun 21, 2019 4:53 am
"be precise": step "move yellow signal" means "point to hidden chain signal and press "Shift+Up" (Settings -> Controls -> Mods -> Picker Dollies -> "move entity north")
Yes. Apologies. *Move with PickerDollies*

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

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

Post by boskid »

Still crashes in [0.17.51]

-- edit:
Still crashes in [0.17.52]

Smallest possible reproduction:
  1. Open
    72292-repr.zip
    (225.81 KiB) Downloaded 72 times
  2. Execute

    Code: Select all

    /c game.surfaces["nauvis"].find_entity('rail-signal', {8.5, -8.5}).teleport({0,0})
  3. Crash
    log

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

Re: [kovarex] [0.17.50] *this->reservedFor == train was not true

Post by kovarex »

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

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

Re: [kovarex] [0.17.50] *this->reservedFor == train was not true

Post by boskid »

btw, how was this issue even possible with this:
https://lua-api.factorio.com/0.17.54/LuaControl.html#LuaControl.teleport wrote: Note: Some entities may not be teleported. For instance, rail signals won't allow teleportation and this method will always return false when used on any such entity.

Post Reply

Return to “Resolved Problems and Bugs”