Page 1 of 1

[kovarex] [0.17.32] [MOD] Crash when placing wagon with Dispatcher mod

Posted: Sat Apr 20, 2019 3:42 am
by robot256
Steps to Reproduce:
Install the Dispatcher mod and load the attached save. Wait for the train to arrive at the Dispatcher Stop (blue). Since there is no Dispatcher Target signal being sent to the station, the mod replaces the train schedule with a single empty circuit condition. When you place a cargo wagon behind the locomotives, the game crashes to the desktop.

It doesn't happen every time when using this mod, but it does happen reliably when it does. It doesn't seem to be affected by whether there are any other mods installed, or whether there are properly-named "target" stations for the Dispatcher to route to. When it does not crash, the Dispatcher mod appears to set the train back to automatic mode immediately after placing the wagon.

I figure it might have something to do with how the mod is modifying train schedules and mode as the train id changes, but I wasn't expecting a hard crash with the message "Error Train.cpp:1638: Something fishy is happening here."

Re: [0.17.32] [MOD] Crash when placing wagon with Dispatcher mod

Posted: Sat Apr 20, 2019 3:58 am
by TruePikachu

Code: Select all

c:\cygwin64\tmp\factorio-build-itwaaa\src\util\logging.cpp (90): Logging::logAndAbortOrThrow
c:\cygwin64\tmp\factorio-build-itwaaa\src\util\logging.cpp (84): Logging::logAndAbortOrThrow
c:\cygwin64\tmp\factorio-build-itwaaa\src\rail\train.cpp (1638): Train::resolveRailTransition
c:\cygwin64\tmp\factorio-build-itwaaa\src\entity\rollingstock.cpp (334): RollingStock::Carriage::moveBackJointBackward
c:\cygwin64\tmp\factorio-build-itwaaa\src\entity\rollingstock.cpp (368): RollingStock::move
c:\cygwin64\tmp\factorio-build-itwaaa\src\rail\train.cpp (1884): Train::moveStock
c:\cygwin64\tmp\factorio-build-itwaaa\src\entity\rollingstock.cpp (663): RollingStock::tryToConnect
c:\cygwin64\tmp\factorio-build-itwaaa\src\entity\rollingstock.cpp (440): RollingStock::tryToConnect
c:\cygwin64\tmp\factorio-build-itwaaa\src\entity\rollingstock.cpp (78): RollingStock::setup
c:\cygwin64\tmp\factorio-build-itwaaa\src\surface\surface.cpp (184): Surface::setupEntity
c:\cygwin64\tmp\factorio-build-itwaaa\src\manualbuilder.cpp (1030): ManualBuilder::buildItem
c:\cygwin64\tmp\factorio-build-itwaaa\src\controller\charactercontroller.cpp (601): CharacterController::buildItem
c:\cygwin64\tmp\factorio-build-itwaaa\src\gameactionhandler.cpp (670): GameActionHandler::buildItem
c:\cygwin64\tmp\factorio-build-itwaaa\src\gameactionhandler.cpp (322): GameActionHandler::actionPerformed
c:\cygwin64\tmp\factorio-build-itwaaa\src\input\inputhandler.cpp (61): InputHandler::flushActions
c:\cygwin64\tmp\factorio-build-itwaaa\src\gameactionhandler.cpp (365): GameActionHandler::update
As an aside, can someone `git blame` Train.cpp:1638? I'm curious to know who's responsible for that super-helpful error message.

Re: [0.17.32] [MOD] Crash when placing wagon with Dispatcher mod

Posted: Mon May 06, 2019 9:33 am
by wheybags
Git blame says kovarex :D (and he'll probably handle the bug report too)

Re: [kovarex] [0.17.32] [MOD] Crash when placing wagon with Dispatcher mod

Posted: Mon May 06, 2019 11:07 am
by kovarex
Thanks for the report, it is fixed for the next version now.