Page 1 of 1

[kovarex] [0.17.14] Temporary train stations while deconstructing rails

Posted: Sun Mar 17, 2019 3:53 pm
by zoolander
Hi, afters years of playing I found my first bug :D
I sent a train to my current location and shortly before it arrived, I let my robots deconstruct parts of the rails, then the game crashed.
I was able to reproduce it.
1. Create a temporary station near your current position
2. Wait for the train to be close
3. Let your Robots deconstruct the part of the track, where the temporary station is, while the train is still moving towards it
4. Crash

Re: [kovarex] [0.17.14] Temporary train stations while deconstructing rails

Posted: Mon Mar 18, 2019 11:51 am
by kovarex
Hello, I tried to reproduce it several times but I couldn't. Based on the internal logic this should happen, but it obviously happens, so I would like to know how.
Could you please, pretty please, provide a save where you reproduce it, and it crashes some time after loading it?

Re: [kovarex] [0.17.14] Temporary train stations while deconstructing rails

Posted: Mon Mar 18, 2019 4:22 pm
by zoolander
Hi,
This is how you should be able to reproduce it:
1. You should spawn between two tracks
2. Find the train south of your position. It has four Artillery wagons
3. Send the train to a rail right of your postion
Temporary train stop position
Temporary train stop position
Image1.jpg (217.81 KiB) Viewed 3243 times
4. Zoom out.
5. Prepare the deconstruction planner to remove parts of the rails
Rails to deconstruct when train is close
Rails to deconstruct when train is close
Image2.jpg (542.34 KiB) Viewed 3243 times
6. Release the mouse button, as soon as the first locomotive is completely inside your construction robot range. So basically when the first artillery wagon is about to enter the green square :D
7. Game should crash. I tried about ten times and it broke the game in 50% of my tries I would say

Dropbox link:
https://www.dropbox.com/s/g1mez8x9u2z8tdv/BugSave.zip

Re: [kovarex] [0.17.14] Temporary train stations while deconstructing rails

Posted: Tue Mar 19, 2019 4:21 pm
by Skybreaker
I ran into a crash which i believe is for the same reason. MP so no save game, and it was soft-modded, so logs may be quite noisy.
Another player was routing to where I was manually deconstructing rails. My game crashed.

Attached dump and log.

Re: [kovarex] [0.17.14] Temporary train stations while deconstructing rails

Posted: Tue Mar 19, 2019 5:17 pm
by TruePikachu
This is, indeed, the same bug.

Code: Select all

4930.815 Error CrashHandler.cpp:409: Exception Code: c0000005, Address: 0x00007ff74a59d447
ModuleBase: 0x00007ff74a3a0000, ImageSize: 01623000, RelativeAddress: 001fd447
4930.815 Error CrashHandler.cpp:415: Access Violation: Read at address 0000000000000138
4930.815 Error CrashHandler.cpp:429: Exception Context:
rax=0000000000000238, rbx=0000000000000233, rcx=0000000000000000,
rdx=0000000000000001, rsi=0000000000000000, rdi=00000000000057f8,
rip=00007ff74a59d447, rsp=00000008232fe860, rbp=000001e70a011030,
 r8=000001e72b71f440,  r9=000001e7263b6ad8, r10=000001e705ef3cf0,
r11=00000008232fe930, r12=0000000000000000, r13=000001e718275458,
r14=6666666666666667, r15=0000000000000001
4930.815 Crashed in C:\Program Files (x86)\Steam\steamapps\common\Factorio\bin\x64\Factorio.exe (0x00007ff74a3a0000 - 0x00007ff74b9c3000)
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\cygwin64\tmp\factorio-build-z2hre9\libraries\stackwalker\stackwalker.cpp (924): StackWalker::ShowCallstack
c:\cygwin64\tmp\factorio-build-z2hre9\src\util\logger.cpp (376): Logger::writeStacktrace
c:\cygwin64\tmp\factorio-build-z2hre9\src\util\logger.cpp (527): Logger::logStacktrace
c:\cygwin64\tmp\factorio-build-z2hre9\src\util\crashhandler.cpp (170): CrashHandler::writeStackTrace
c:\cygwin64\tmp\factorio-build-z2hre9\src\util\crashhandler.cpp (456): CrashHandler::SehHandler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF9B41D584C)
00007FF9B41D584C (KERNELBASE): (filename not available): UnhandledExceptionFilter
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF9B75980CB)
00007FF9B75980CB (ntdll): (filename not available): memset
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF9B757FD36)
00007FF9B757FD36 (ntdll): (filename not available): _C_specific_handler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF9B759468F)
00007FF9B759468F (ntdll): (filename not available): _chkstk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF9B74F4BEF)
00007FF9B74F4BEF (ntdll): (filename not available): RtlWalkFrameChain
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF9B75933FE)
00007FF9B75933FE (ntdll): (filename not available): KiUserExceptionDispatcher
c:\cygwin64\tmp\factorio-build-z2hre9\src\entity\rail.cpp (1695): Rail::requestToOpenGates
c:\cygwin64\tmp\factorio-build-z2hre9\src\rail\train.cpp (2305): Train::requestToOpenGatesOnPath
c:\cygwin64\tmp\factorio-build-z2hre9\src\rail\train.cpp (1291): Train::updateSpeedAndMove
c:\cygwin64\tmp\factorio-build-z2hre9\src\rail\train.cpp (1006): Train::update
c:\cygwin64\tmp\factorio-build-z2hre9\src\rail\trainmanager.cpp (235): TrainManager::update
c:\cygwin64\tmp\factorio-build-z2hre9\src\map\map.cpp (1468): Map::updateEntities
c:\cygwin64\tmp\factorio-build-z2hre9\src\game.cpp (191): Game::update
c:\cygwin64\tmp\factorio-build-z2hre9\src\scenario\scenario.cpp (1156): Scenario::update
c:\cygwin64\tmp\factorio-build-z2hre9\src\mainloop.cpp (1104): MainLoop::gameUpdateStep
c:\cygwin64\tmp\factorio-build-z2hre9\src\mainloop.cpp (970): MainLoop::gameUpdateLoop
c:\cygwin64\tmp\factorio-build-z2hre9\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 RouterBase::*)(void),ClientRouter *>,std::default_delete<std::tuple<void (__cdecl RouterBase::*)(void),ClientRouter *> > > >::_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: 00007FF9B4B781F4)
00007FF9B4B781F4 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF9B755A251)
00007FF9B755A251 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done

Re: [kovarex] [0.17.14] Temporary train stations while deconstructing rails

Posted: Tue Mar 19, 2019 7:59 pm
by Rseding91
Thanks for the save file and screenshots to reproduce the problem. It's now fixed for the next version of 0.17.