[Rseding91] [0.17.34] Crash in editor: spray wagons on rails [rail.cpp (677): Rail::getPosition]

This subforum contains all the issues which we already resolved.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3069
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

[Rseding91] [0.17.34] Crash in editor: spray wagons on rails [rail.cpp (677): Rail::getPosition]

Post by boskid »

Steps to reproduce:
1/ start sandbox
2/ use /editor
3/ go to entities, select spray with radius 20 and max frequency (i think it was 25) [edit: "intensity" it is]
4/ spray some rails (there will be a lot of them overlapping) [edit: i was using curved rails, tested by crashing second time]
5/ spray some cargo wagons
6/ crash

Code: Select all

2988.146 Error CrashHandler.cpp:376: Exception Code: c0000005, Address: 0x00007ff6a0135e11
ModuleBase: 0x00007ff69ff40000, ImageSize: 015ed000, RelativeAddress: 001f5e11
2988.146 Error CrashHandler.cpp:382: Access Violation: Read at address 00000000000000A2
2988.146 Error CrashHandler.cpp:396: Exception Context:
rax=0000000000000000, rbx=0000009f4ebfe1e8, rcx=0000000000000000,
rdx=0000009f4ebfe1e8, rsi=0000009f4ebfe210, rdi=0000000000000000,
rip=00007ff6a0135e11, rsp=0000009f4ebfe010, rbp=0000009f4ebfe181,
 r8=0000000000000028,  r9=0000009f4ebfe1e0, r10=00007ff6a13bde00,
r11=0000000000034800, r12=0000000000000000, r13=0000009f4ebfe218,
r14=0000000000000000, r15=0000028374c259c0
2988.146 Crashed in C:\Program Files (x86)\Steam\steamapps\common\Factorio\bin\x64\Factorio.exe (0x00007ff69ff40000 - 0x00007ff6a152d000)
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\cygwin64\tmp\factorio-build-ocil06\libraries\stackwalker\stackwalker.cpp (924): StackWalker::ShowCallstack
c:\cygwin64\tmp\factorio-build-ocil06\src\util\logger.cpp (405): Logger::writeStacktrace
c:\cygwin64\tmp\factorio-build-ocil06\src\util\logger.cpp (515): Logger::logStacktrace
c:\cygwin64\tmp\factorio-build-ocil06\src\util\crashhandler.cpp (169): CrashHandler::writeStackTrace
c:\cygwin64\tmp\factorio-build-ocil06\src\util\crashhandler.cpp (423): CrashHandler::SehHandler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF80D3FBDD0)
00007FF80D3FBDD0 (KERNELBASE): (filename not available): UnhandledExceptionFilter
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF810F83167)
00007FF810F83167 (ntdll): (filename not available): memset
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF810F6B5E6)
00007FF810F6B5E6 (ntdll): (filename not available): _C_specific_handler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF810F7F7DD)
00007FF810F7F7DD (ntdll): (filename not available): _chkstk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF810EED856)
00007FF810EED856 (ntdll): (filename not available): RtlWalkFrameChain
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF810F7E70E)
00007FF810F7E70E (ntdll): (filename not available): KiUserExceptionDispatcher
c:\cygwin64\tmp\factorio-build-ocil06\src\entity\rail.cpp (672): Rail::getPosition
c:\cygwin64\tmp\factorio-build-ocil06\src\entity\rollingstock.cpp (498): RollingStock::findRollingStockAt
c:\cygwin64\tmp\factorio-build-ocil06\src\entity\rollingstock.cpp (543): RollingStock::getConnectionCandidate
c:\cygwin64\tmp\factorio-build-ocil06\src\entity\rollingstock.cpp (96): RollingStock::snapRollingStockOnSetup
c:\cygwin64\tmp\factorio-build-ocil06\src\entity\rollingstock.cpp (67): RollingStock::setup
c:\cygwin64\tmp\factorio-build-ocil06\src\manualbuilder.cpp (273): ManualBuilder::canBuildCollisionCheck
c:\cygwin64\tmp\factorio-build-ocil06\src\manualbuilder.cpp (746): ManualBuilder::buildItem
c:\cygwin64\tmp\factorio-build-ocil06\src\mapeditor\entityeditor.cpp (555): EntityEditor::tryPlaceEntity
c:\cygwin64\tmp\factorio-build-ocil06\src\mapeditor\entityeditor.cpp (309): EntityEditor::build
c:\cygwin64\tmp\factorio-build-ocil06\src\mapeditor\tools\brushtool.cpp (248): BrushTool::applyAction<ActionData::BuildTileParams,std::function<void __cdecl(ActionData::BuildTileParams const &)> >
c:\cygwin64\tmp\factorio-build-ocil06\src\mapeditor\tools\brushtool.cpp (186): BrushTool::build
c:\cygwin64\tmp\factorio-build-ocil06\src\mapeditor\entityeditor.cpp (223): EntityEditor::handleBuildAction
c:\cygwin64\tmp\factorio-build-ocil06\src\gameactionhandler.cpp (1179): GameActionHandler::mapEditorAction
c:\cygwin64\tmp\factorio-build-ocil06\src\gameactionhandler.cpp (321): GameActionHandler::actionPerformed
c:\cygwin64\tmp\factorio-build-ocil06\src\input\inputhandler.cpp (61): InputHandler::flushActions
c:\cygwin64\tmp\factorio-build-ocil06\src\gameactionhandler.cpp (364): GameActionHandler::update
c:\cygwin64\tmp\factorio-build-ocil06\src\mainloop.cpp (1058): MainLoop::gameUpdateStep
c:\cygwin64\tmp\factorio-build-ocil06\src\mainloop.cpp (931): MainLoop::gameUpdateLoop
c:\cygwin64\tmp\factorio-build-ocil06\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*)(ParallelScenarioSaver *),ParallelScenarioSaver *>,std::default_delete<std::tuple<void (__cdecl*)(ParallelScenarioSaver *),ParallelScenarioSaver *> > > >::_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: 00007FF810E03DC4)
00007FF810E03DC4 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF810F53691)
00007FF810F53691 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
2991.194 Error CrashHandler.cpp:174: Map tick at moment of crash: 178379
2991.194 C:\Program Files (x86)\Steam\steamapps\common\Factorio\bin\x64\Factorio.exe
// === cut ==
2991.198 C:\WINDOWS\SYSTEM32\icm32.dll
2991.198 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.
3017.908 Uploading log file
3017.917 Error CrashHandler.cpp:221: Heap validation: success.
3017.918 Creating crash dump.
3018.325 CrashDump success
-- edit2:
same setup as above but used locomotive. Gives little different stacktrace ("Locomotive::snapToTrainStop" where previously it was "RollingStock::findRollingStockAt") but also crashes at "Rail::getPosition":

Code: Select all

  88.149 Error CrashHandler.cpp:376: Exception Code: c0000005, Address: 0x00007ff6a0135e03
ModuleBase: 0x00007ff69ff40000, ImageSize: 015ed000, RelativeAddress: 001f5e03
  88.149 Error CrashHandler.cpp:382: Access Violation: Read at address 0000000000000150
  88.149 Error CrashHandler.cpp:396: Exception Context:
rax=0000000000000001, rbx=000000a01d1feb60, rcx=0000000000000000,
rdx=000000a01d1feb60, rsi=000001cc64906f50, rdi=0000000000000000,
rip=00007ff6a0135e03, rsp=000000a01d1fea10, rbp=000000a01d1feb08,
 r8=0000000000000793,  r9=000000a01d1feb58, r10=000000a01d1fe638,
r11=000000a01d1fe820, r12=000001cc64906f50, r13=000000a01d1ff050,
r14=0000000000000000, r15=0000000000000092
  88.149 Crashed in C:\Program Files (x86)\Steam\steamapps\common\Factorio\bin\x64\Factorio.exe (0x00007ff69ff40000 - 0x00007ff6a152d000)
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\cygwin64\tmp\factorio-build-ocil06\libraries\stackwalker\stackwalker.cpp (924): StackWalker::ShowCallstack
c:\cygwin64\tmp\factorio-build-ocil06\src\util\logger.cpp (405): Logger::writeStacktrace
c:\cygwin64\tmp\factorio-build-ocil06\src\util\logger.cpp (515): Logger::logStacktrace
c:\cygwin64\tmp\factorio-build-ocil06\src\util\crashhandler.cpp (169): CrashHandler::writeStackTrace
c:\cygwin64\tmp\factorio-build-ocil06\src\util\crashhandler.cpp (423): CrashHandler::SehHandler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF80D3FBDD0)
00007FF80D3FBDD0 (KERNELBASE): (filename not available): UnhandledExceptionFilter
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF810F83167)
00007FF810F83167 (ntdll): (filename not available): memset
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF810F6B5E6)
00007FF810F6B5E6 (ntdll): (filename not available): _C_specific_handler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF810F7F7DD)
00007FF810F7F7DD (ntdll): (filename not available): _chkstk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF810EED856)
00007FF810EED856 (ntdll): (filename not available): RtlWalkFrameChain
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF810F7E70E)
00007FF810F7E70E (ntdll): (filename not available): KiUserExceptionDispatcher
c:\cygwin64\tmp\factorio-build-ocil06\src\entity\rail.cpp (671): Rail::getPosition
c:\cygwin64\tmp\factorio-build-ocil06\src\entity\locomotive.cpp (251): Locomotive::snapToTrainStop
c:\cygwin64\tmp\factorio-build-ocil06\src\entity\locomotive.cpp (338): Locomotive::setup
c:\cygwin64\tmp\factorio-build-ocil06\src\surface\surface.cpp (183): Surface::setupEntity
c:\cygwin64\tmp\factorio-build-ocil06\src\manualbuilder.cpp (943): ManualBuilder::buildItem
c:\cygwin64\tmp\factorio-build-ocil06\src\mapeditor\entityeditor.cpp (555): EntityEditor::tryPlaceEntity
c:\cygwin64\tmp\factorio-build-ocil06\src\mapeditor\entityeditor.cpp (309): EntityEditor::build
c:\cygwin64\tmp\factorio-build-ocil06\src\mapeditor\tools\brushtool.cpp (248): BrushTool::applyAction<ActionData::BuildTileParams,std::function<void __cdecl(ActionData::BuildTileParams const &)> >
c:\cygwin64\tmp\factorio-build-ocil06\src\mapeditor\tools\brushtool.cpp (186): BrushTool::build
c:\cygwin64\tmp\factorio-build-ocil06\src\mapeditor\entityeditor.cpp (223): EntityEditor::handleBuildAction
c:\cygwin64\tmp\factorio-build-ocil06\src\gameactionhandler.cpp (1179): GameActionHandler::mapEditorAction
c:\cygwin64\tmp\factorio-build-ocil06\src\gameactionhandler.cpp (321): GameActionHandler::actionPerformed
c:\cygwin64\tmp\factorio-build-ocil06\src\input\inputhandler.cpp (61): InputHandler::flushActions
c:\cygwin64\tmp\factorio-build-ocil06\src\gameactionhandler.cpp (364): GameActionHandler::update
c:\cygwin64\tmp\factorio-build-ocil06\src\mainloop.cpp (1058): MainLoop::gameUpdateStep
c:\cygwin64\tmp\factorio-build-ocil06\src\mainloop.cpp (931): MainLoop::gameUpdateLoop
c:\cygwin64\tmp\factorio-build-ocil06\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*)(ParallelScenarioSaver *),ParallelScenarioSaver *>,std::default_delete<std::tuple<void (__cdecl*)(ParallelScenarioSaver *),ParallelScenarioSaver *> > > >::_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: 00007FF810E03DC4)
00007FF810E03DC4 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF810F53691)
00007FF810F53691 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
  90.678 Error CrashHandler.cpp:174: Map tick at moment of crash: 3314
  90.679 C:\Program Files (x86)\Steam\steamapps\common\Factorio\bin\x64\Factorio.exe
-- edit 3:

Screenshot at crash. Crash is somehow rare: i had to spray and delete around 20 times
factorio-spray-crash.png
factorio-spray-crash.png (7.25 MiB) Viewed 3278 times
-- edit 4:

Still reproducible in [0.17.5]

-- edit 5:

Still reproducible in [0.17.11]

-- edit 6:

Still reproducible in [0.17.13]

-- edit 7:

Still reproducible in [0.17.15]

-- edit 8:

Still reproducible in [0.17.30]

-- edit 9:

Still exists in [0.17.34]

using locomotive:

Code: Select all

472.347 Error CrashHandler.cpp:425: Exception Code: c0000005, Address: 0x00007ff64072a321
ModuleBase: 0x00007ff640530000, ImageSize: 01653000, RelativeAddress: 001fa321
 472.347 Error CrashHandler.cpp:431: Access Violation: Read at address 00000000000000A2
 472.347 Error CrashHandler.cpp:445: Exception Context:
rax=0000000000000000, rbx=000000bcb072e430, rcx=0000000000000000,
rdx=000000bcb072e430, rsi=0000020d4da1d1a0, rdi=0000000000000000,
rip=00007ff64072a321, rsp=000000bcb072e2e0, rbp=000000bcb072e3d8,
 r8=000000000001bb3d,  r9=000000bcb072e428, r10=000000bcb072df08,
r11=000000bcb072e0f0, r12=0000020d4da1d1a0, r13=000000bcb072e910,
r14=0000000000000092, r15=0000000000000000
 472.347 Crashed in C:\Program Files (x86)\Steam\steamapps\common\Factorio\bin\x64\Factorio.exe (0x00007ff640530000 - 0x00007ff641b83000)
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\cygwin64\tmp\factorio-build-oacria\libraries\stackwalker\stackwalker.cpp (924): StackWalker::ShowCallstack
c:\cygwin64\tmp\factorio-build-oacria\src\util\logger.cpp (376): Logger::writeStacktrace
c:\cygwin64\tmp\factorio-build-oacria\src\util\logger.cpp (527): Logger::logStacktrace
c:\cygwin64\tmp\factorio-build-oacria\src\util\crashhandler.cpp (172): CrashHandler::writeStackTrace
c:\cygwin64\tmp\factorio-build-oacria\src\util\crashhandler.cpp (472): CrashHandler::SehHandler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFBF43ABDD0)
00007FFBF43ABDD0 (KERNELBASE): (filename not available): UnhandledExceptionFilter
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFBF7D13167)
00007FFBF7D13167 (ntdll): (filename not available): memset
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFBF7CFB5E6)
00007FFBF7CFB5E6 (ntdll): (filename not available): _C_specific_handler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFBF7D0F7DD)
00007FFBF7D0F7DD (ntdll): (filename not available): _chkstk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFBF7C7D856)
00007FFBF7C7D856 (ntdll): (filename not available): RtlWalkFrameChain
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFBF7D0E70E)
00007FFBF7D0E70E (ntdll): (filename not available): KiUserExceptionDispatcher
c:\cygwin64\tmp\factorio-build-oacria\src\entity\rail.cpp (677): Rail::getPosition
c:\cygwin64\tmp\factorio-build-oacria\src\entity\locomotive.cpp (251): Locomotive::snapToTrainStop
c:\cygwin64\tmp\factorio-build-oacria\src\entity\locomotive.cpp (338): Locomotive::setup
c:\cygwin64\tmp\factorio-build-oacria\src\surface\surface.cpp (184): Surface::setupEntity
c:\cygwin64\tmp\factorio-build-oacria\src\manualbuilder.cpp (1039): ManualBuilder::buildItem
c:\cygwin64\tmp\factorio-build-oacria\src\mapeditor\entityeditor.cpp (557): EntityEditor::tryPlaceEntity
c:\cygwin64\tmp\factorio-build-oacria\src\mapeditor\entityeditor.cpp (311): EntityEditor::build
c:\cygwin64\tmp\factorio-build-oacria\src\mapeditor\tools\brushtool.cpp (248): BrushTool::applyAction<ActionData::BuildParams,std::function<void __cdecl(ActionData::BuildParams const &)> >
c:\cygwin64\tmp\factorio-build-oacria\src\mapeditor\tools\brushtool.cpp (186): BrushTool::build
c:\cygwin64\tmp\factorio-build-oacria\src\mapeditor\entityeditor.cpp (225): EntityEditor::handleBuildAction
c:\cygwin64\tmp\factorio-build-oacria\src\gameactionhandler.cpp (1194): GameActionHandler::mapEditorAction
c:\cygwin64\tmp\factorio-build-oacria\src\gameactionhandler.cpp (322): GameActionHandler::actionPerformed
c:\cygwin64\tmp\factorio-build-oacria\src\input\inputhandler.cpp (61): InputHandler::flushActions
c:\cygwin64\tmp\factorio-build-oacria\src\gameactionhandler.cpp (365): GameActionHandler::update
c:\cygwin64\tmp\factorio-build-oacria\src\mainloop.cpp (1139): MainLoop::gameUpdateStep
c:\cygwin64\tmp\factorio-build-oacria\src\mainloop.cpp (1011): MainLoop::gameUpdateLoop
c:\cygwin64\tmp\factorio-build-oacria\src\util\workerthread.cpp (42): WorkerThread::loop
using wagons:

Code: Select all

  58.457 Error CrashHandler.cpp:425: Exception Code: c0000005, Address: 0x00007ff64072a313
ModuleBase: 0x00007ff640530000, ImageSize: 01653000, RelativeAddress: 001fa313
  58.457 Error CrashHandler.cpp:431: Access Violation: Read at address 0000000000000150
  58.457 Error CrashHandler.cpp:445: Exception Context:
rax=0000000000000001, rbx=000000aab414e028, rcx=0000000000000000,
rdx=000000aab414e028, rsi=000000aab414e050, rdi=0000000000000000,
rip=00007ff64072a313, rsp=000000aab414de50, rbp=000000aab414dfc1,
 r8=000000000000000a,  r9=000000aab414e020, r10=00007ff641a0ee40,
r11=00000000ffffc600, r12=0000000000000000, r13=000000aab414e058,
r14=0000000000000000, r15=000002262220b390
  58.457 Crashed in C:\Program Files (x86)\Steam\steamapps\common\Factorio\bin\x64\Factorio.exe (0x00007ff640530000 - 0x00007ff641b83000)
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\cygwin64\tmp\factorio-build-oacria\libraries\stackwalker\stackwalker.cpp (924): StackWalker::ShowCallstack
c:\cygwin64\tmp\factorio-build-oacria\src\util\logger.cpp (376): Logger::writeStacktrace
c:\cygwin64\tmp\factorio-build-oacria\src\util\logger.cpp (527): Logger::logStacktrace
c:\cygwin64\tmp\factorio-build-oacria\src\util\crashhandler.cpp (172): CrashHandler::writeStackTrace
c:\cygwin64\tmp\factorio-build-oacria\src\util\crashhandler.cpp (472): CrashHandler::SehHandler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFBF43ABDD0)
00007FFBF43ABDD0 (KERNELBASE): (filename not available): UnhandledExceptionFilter
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFBF7D13167)
00007FFBF7D13167 (ntdll): (filename not available): memset
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFBF7CFB5E6)
00007FFBF7CFB5E6 (ntdll): (filename not available): _C_specific_handler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFBF7D0F7DD)
00007FFBF7D0F7DD (ntdll): (filename not available): _chkstk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFBF7C7D856)
00007FFBF7C7D856 (ntdll): (filename not available): RtlWalkFrameChain
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFBF7D0E70E)
00007FFBF7D0E70E (ntdll): (filename not available): KiUserExceptionDispatcher
c:\cygwin64\tmp\factorio-build-oacria\src\entity\rail.cpp (676): Rail::getPosition
c:\cygwin64\tmp\factorio-build-oacria\src\entity\rollingstock.cpp (498): RollingStock::findRollingStockAt
c:\cygwin64\tmp\factorio-build-oacria\src\entity\rollingstock.cpp (543): RollingStock::getConnectionCandidate
c:\cygwin64\tmp\factorio-build-oacria\src\entity\rollingstock.cpp (96): RollingStock::snapRollingStockOnSetup
c:\cygwin64\tmp\factorio-build-oacria\src\entity\rollingstock.cpp (67): RollingStock::setup
c:\cygwin64\tmp\factorio-build-oacria\src\manualbuilder.cpp (277): ManualBuilder::canBuildCollisionCheck
c:\cygwin64\tmp\factorio-build-oacria\src\manualbuilder.cpp (823): ManualBuilder::buildItem
c:\cygwin64\tmp\factorio-build-oacria\src\mapeditor\entityeditor.cpp (557): EntityEditor::tryPlaceEntity
c:\cygwin64\tmp\factorio-build-oacria\src\mapeditor\entityeditor.cpp (311): EntityEditor::build
c:\cygwin64\tmp\factorio-build-oacria\src\mapeditor\tools\brushtool.cpp (248): BrushTool::applyAction<ActionData::BuildParams,std::function<void __cdecl(ActionData::BuildParams const &)> >
c:\cygwin64\tmp\factorio-build-oacria\src\mapeditor\tools\brushtool.cpp (186): BrushTool::build
c:\cygwin64\tmp\factorio-build-oacria\src\mapeditor\entityeditor.cpp (225): EntityEditor::handleBuildAction
c:\cygwin64\tmp\factorio-build-oacria\src\gameactionhandler.cpp (1194): GameActionHandler::mapEditorAction
c:\cygwin64\tmp\factorio-build-oacria\src\gameactionhandler.cpp (322): GameActionHandler::actionPerformed
c:\cygwin64\tmp\factorio-build-oacria\src\input\inputhandler.cpp (61): InputHandler::flushActions
c:\cygwin64\tmp\factorio-build-oacria\src\gameactionhandler.cpp (365): GameActionHandler::update
c:\cygwin64\tmp\factorio-build-oacria\src\mainloop.cpp (1139): MainLoop::gameUpdateStep
c:\cygwin64\tmp\factorio-build-oacria\src\mainloop.cpp (1011): MainLoop::gameUpdateLoop
c:\cygwin64\tmp\factorio-build-oacria\src\util\workerthread.cpp (42): WorkerThread::loop
added more attachments
Attachments
factorio-dump-current-0_17_34.dmp
(803.36 KiB) Downloaded 138 times
factorio-current-0_17_34.log
(16 KiB) Downloaded 143 times
factorio-current.log
(35.81 KiB) Downloaded 145 times
factorio-dump-current.dmp
(752.3 KiB) Downloaded 133 times
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3069
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [0.17.34] Crash in editor: spray wagons on rails [rail.cpp (677): Rail::getPosition]

Post by boskid »

[0.17.35] Something changed. It is a lot harder to recreate crash with locomotive. With cargo it is almost impossible, after many iterations it crashed, but at different action - removing cargo wagons. This gives different stack trace

deleting cargo wagon:

Code: Select all

c:\cygwin64\tmp\factorio-build-ummx17\src\entity\rail.cpp (676): Rail::getPosition
c:\cygwin64\tmp\factorio-build-ummx17\src\entity\rollingstock.cpp (242): RollingStock::updatePosition
c:\cygwin64\tmp\factorio-build-ummx17\src\rail\train.cpp (1856): Train::rewriteBackupPosition
c:\cygwin64\tmp\factorio-build-ummx17\src\rail\trainmanager.cpp (801): TrainManager::onRollingStockDestroyed
c:\cygwin64\tmp\factorio-build-ummx17\src\entity\cargowagon.cpp (169): CargoWagon::onDestroy
c:\cygwin64\tmp\factorio-build-ummx17\src\entity\entity.cpp (302): Entity::forceDestroy
c:\cygwin64\tmp\factorio-build-ummx17\src\mapeditor\entityeditor.cpp (326): EntityEditor::remove
c:\cygwin64\tmp\factorio-build-ummx17\src\mapeditor\tools\brushtool.cpp (248): BrushTool::applyAction<ActionData::RemoveParams,std::function<void __cdecl(ActionData::RemoveParams const &)> >
c:\cygwin64\tmp\factorio-build-ummx17\src\mapeditor\tools\brushtool.cpp (210): BrushTool::remove
c:\cygwin64\tmp\factorio-build-ummx17\src\mapeditor\entityeditor.cpp (245): EntityEditor::handleRemoveAction
c:\cygwin64\tmp\factorio-build-ummx17\src\gameactionhandler.cpp (1194): GameActionHandler::mapEditorAction
c:\cygwin64\tmp\factorio-build-ummx17\src\gameactionhandler.cpp (322): GameActionHandler::actionPerformed
c:\cygwin64\tmp\factorio-build-ummx17\src\input\inputhandler.cpp (61): InputHandler::flushActions
c:\cygwin64\tmp\factorio-build-ummx17\src\gameactionhandler.cpp (365): GameActionHandler::update
c:\cygwin64\tmp\factorio-build-ummx17\src\mainloop.cpp (1139): MainLoop::gameUpdateStep
c:\cygwin64\tmp\factorio-build-ummx17\src\mainloop.cpp (1011): MainLoop::gameUpdateLoop
c:\cygwin64\tmp\factorio-build-ummx17\src\util\workerthread.cpp (42): WorkerThread::loop
-- edit:
building cargo wagon:

Code: Select all

c:\cygwin64\tmp\factorio-build-ummx17\src\entity\rail.cpp (676): Rail::getPosition
c:\cygwin64\tmp\factorio-build-ummx17\src\entity\rollingstock.cpp (498): RollingStock::findRollingStockAt
c:\cygwin64\tmp\factorio-build-ummx17\src\entity\rollingstock.cpp (543): RollingStock::getConnectionCandidate
c:\cygwin64\tmp\factorio-build-ummx17\src\entity\rollingstock.cpp (96): RollingStock::snapRollingStockOnSetup
c:\cygwin64\tmp\factorio-build-ummx17\src\entity\rollingstock.cpp (67): RollingStock::setup
c:\cygwin64\tmp\factorio-build-ummx17\src\manualbuilder.cpp (277): ManualBuilder::canBuildCollisionCheck
c:\cygwin64\tmp\factorio-build-ummx17\src\manualbuilder.cpp (823): ManualBuilder::buildItem
c:\cygwin64\tmp\factorio-build-ummx17\src\mapeditor\entityeditor.cpp (557): EntityEditor::tryPlaceEntity
c:\cygwin64\tmp\factorio-build-ummx17\src\mapeditor\entityeditor.cpp (311): EntityEditor::build
c:\cygwin64\tmp\factorio-build-ummx17\src\mapeditor\tools\brushtool.cpp (248): BrushTool::applyAction<ActionData::BuildTileParams,std::function<void __cdecl(ActionData::BuildTileParams const &)> >
c:\cygwin64\tmp\factorio-build-ummx17\src\mapeditor\tools\brushtool.cpp (186): BrushTool::build
c:\cygwin64\tmp\factorio-build-ummx17\src\mapeditor\entityeditor.cpp (225): EntityEditor::handleBuildAction
c:\cygwin64\tmp\factorio-build-ummx17\src\gameactionhandler.cpp (1194): GameActionHandler::mapEditorAction
c:\cygwin64\tmp\factorio-build-ummx17\src\gameactionhandler.cpp (322): GameActionHandler::actionPerformed
c:\cygwin64\tmp\factorio-build-ummx17\src\input\inputhandler.cpp (61): InputHandler::flushActions
c:\cygwin64\tmp\factorio-build-ummx17\src\gameactionhandler.cpp (365): GameActionHandler::update
c:\cygwin64\tmp\factorio-build-ummx17\src\mainloop.cpp (1139): MainLoop::gameUpdateStep
c:\cygwin64\tmp\factorio-build-ummx17\src\mainloop.cpp (1011): MainLoop::gameUpdateLoop
c:\cygwin64\tmp\factorio-build-ummx17\src\util\workerthread.cpp (42): WorkerThread::loop
-- edit:
building locomotive:

Code: Select all

c:\cygwin64\tmp\factorio-build-ummx17\src\entity\rail.cpp (676): Rail::getPosition
c:\cygwin64\tmp\factorio-build-ummx17\src\entity\locomotive.cpp (251): Locomotive::snapToTrainStop
c:\cygwin64\tmp\factorio-build-ummx17\src\entity\locomotive.cpp (338): Locomotive::setup
c:\cygwin64\tmp\factorio-build-ummx17\src\surface\surface.cpp (184): Surface::setupEntity
c:\cygwin64\tmp\factorio-build-ummx17\src\manualbuilder.cpp (1039): ManualBuilder::buildItem
c:\cygwin64\tmp\factorio-build-ummx17\src\mapeditor\entityeditor.cpp (557): EntityEditor::tryPlaceEntity
c:\cygwin64\tmp\factorio-build-ummx17\src\mapeditor\entityeditor.cpp (311): EntityEditor::build
c:\cygwin64\tmp\factorio-build-ummx17\src\mapeditor\tools\brushtool.cpp (248): BrushTool::applyAction<ActionData::BuildTileParams,std::function<void __cdecl(ActionData::BuildTileParams const &)> >
c:\cygwin64\tmp\factorio-build-ummx17\src\mapeditor\tools\brushtool.cpp (186): BrushTool::build
c:\cygwin64\tmp\factorio-build-ummx17\src\mapeditor\entityeditor.cpp (225): EntityEditor::handleBuildAction
c:\cygwin64\tmp\factorio-build-ummx17\src\gameactionhandler.cpp (1194): GameActionHandler::mapEditorAction
c:\cygwin64\tmp\factorio-build-ummx17\src\gameactionhandler.cpp (322): GameActionHandler::actionPerformed
c:\cygwin64\tmp\factorio-build-ummx17\src\input\inputhandler.cpp (61): InputHandler::flushActions
c:\cygwin64\tmp\factorio-build-ummx17\src\gameactionhandler.cpp (365): GameActionHandler::update
c:\cygwin64\tmp\factorio-build-ummx17\src\mainloop.cpp (1139): MainLoop::gameUpdateStep
c:\cygwin64\tmp\factorio-build-ummx17\src\mainloop.cpp (1011): MainLoop::gameUpdateLoop
c:\cygwin64\tmp\factorio-build-ummx17\src\util\workerthread.cpp (42): WorkerThread::loop
Attachments
factorio-dump-current.dmp
LOCOMOTIVE [0.17.35]
(796.23 KiB) Downloaded 137 times
factorio-current.log
LOCOMOTIVE [0.17.35]
(16.18 KiB) Downloaded 126 times
factorio-dump-current.dmp
BUILDING cargo. [0.17.35]
(815.28 KiB) Downloaded 140 times
factorio-current.log
BUILDING cargo. [0.17.35]
(16.42 KiB) Downloaded 135 times
factorio-dump-current.dmp
DELETING cargo. [0.17.35]
(765.07 KiB) Downloaded 123 times
factorio-current.log
DELETING cargo. [0.17.35]
(16.19 KiB) Downloaded 117 times
knightelite
Fast Inserter
Fast Inserter
Posts: 132
Joined: Fri Oct 05, 2018 3:49 pm
Contact:

Re: [0.17.34] Crash in editor: spray wagons on rails [rail.cpp (677): Rail::getPosition]

Post by knightelite »

I appreciate how dedicated you have been to confirming whether or not this still exists in various releases, nice work!
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3069
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [0.17.34] Crash in editor: spray wagons on rails [rail.cpp (677): Rail::getPosition]

Post by boskid »

Found somehow "easy" way to reproduce this bug in [0.17.37]

1/ Load "rails.zip"
rails.zip
(529.28 KiB) Downloaded 133 times
(after loading, editor should be selected to spray wagons with proper brush size)

2/ point cursor to middle of rails setup
3/ hold left and right mouse button for couple of seconds [~10s] (this will build wagons and destroy them every tick)
4/ should crash

--
Outcome with cargo:

Code: Select all

  17.830 Error CrashHandler.cpp:433: Access Violation: Read at address 00000000000000A2

Code: Select all

c:\cygwin64\tmp\factorio-build-7k2owm\src\entity\rail.cpp (676): Rail::getPosition
c:\cygwin64\tmp\factorio-build-7k2owm\src\entity\rollingstock.cpp (242): RollingStock::updatePosition
c:\cygwin64\tmp\factorio-build-7k2owm\src\rail\train.cpp (1868): Train::rewriteBackupPosition
c:\cygwin64\tmp\factorio-build-7k2owm\src\rail\trainmanager.cpp (801): TrainManager::onRollingStockDestroyed
c:\cygwin64\tmp\factorio-build-7k2owm\src\entity\cargowagon.cpp (169): CargoWagon::onDestroy
c:\cygwin64\tmp\factorio-build-7k2owm\src\entity\entity.cpp (302): Entity::forceDestroy
factorio-current.log
(15.88 KiB) Downloaded 146 times
factorio-dump-current.dmp
(727.84 KiB) Downloaded 130 times
--
Outcome with locomotive:

Code: Select all

  22.769 Error CrashHandler.cpp:433: Access Violation: Read at address 0000000000000150

Code: Select all

c:\cygwin64\tmp\factorio-build-7k2owm\src\entity\rail.cpp (676): Rail::getPosition
c:\cygwin64\tmp\factorio-build-7k2owm\src\entity\locomotive.cpp (251): Locomotive::snapToTrainStop
c:\cygwin64\tmp\factorio-build-7k2owm\src\entity\locomotive.cpp (338): Locomotive::setup
c:\cygwin64\tmp\factorio-build-7k2owm\src\surface\surface.cpp (184): Surface::setupEntity
c:\cygwin64\tmp\factorio-build-7k2owm\src\manualbuilder.cpp (1046): ManualBuilder::buildItem
c:\cygwin64\tmp\factorio-build-7k2owm\src\mapeditor\entityeditor.cpp (557): EntityEditor::tryPlaceEntity
c:\cygwin64\tmp\factorio-build-7k2owm\src\mapeditor\entityeditor.cpp (311): EntityEditor::build
factorio-current.log
(15.86 KiB) Downloaded 133 times
factorio-dump-current.dmp
(732.79 KiB) Downloaded 137 times
--
Another outcome (this happend while testing fluid wagon):

Code: Select all

41.887 Error CrashHandler.cpp:433: Access Violation: Read at address 0000000000000150

Code: Select all

c:\cygwin64\tmp\factorio-build-7k2owm\src\entity\rail.cpp (676): Rail::getPosition
c:\cygwin64\tmp\factorio-build-7k2owm\src\entity\rollingstock.cpp (498): RollingStock::findRollingStockAt
c:\cygwin64\tmp\factorio-build-7k2owm\src\entity\rollingstock.cpp (543): RollingStock::getConnectionCandidate
c:\cygwin64\tmp\factorio-build-7k2owm\src\entity\rollingstock.cpp (96): RollingStock::snapRollingStockOnSetup
c:\cygwin64\tmp\factorio-build-7k2owm\src\entity\rollingstock.cpp (67): RollingStock::setup
c:\cygwin64\tmp\factorio-build-7k2owm\src\entity\artillerywagon.cpp (106): ArtilleryWagon::setup
c:\cygwin64\tmp\factorio-build-7k2owm\src\manualbuilder.cpp (278): ManualBuilder::canBuildCollisionCheck
c:\cygwin64\tmp\factorio-build-7k2owm\src\manualbuilder.cpp (830): ManualBuilder::buildItem
c:\cygwin64\tmp\factorio-build-7k2owm\src\mapeditor\entityeditor.cpp (557): EntityEditor::tryPlaceEntity
c:\cygwin64\tmp\factorio-build-7k2owm\src\mapeditor\entityeditor.cpp (311): EntityEditor::build
factorio-current.log
(16.89 KiB) Downloaded 141 times
factorio-dump-current.dmp
(737.86 KiB) Downloaded 129 times
--
i hope there will be no more FFF with daily crash report graph - i think there would be spike today because of me testing :)

--
Smallest possible setup i can use to crash
rail-micro-crash.png
rail-micro-crash.png (276.1 KiB) Viewed 3159 times
rails-micro.zip
(233.01 KiB) Downloaded 137 times
Same actions as previously:
1/ open `rail-micro.zip`
2/ everything should be prepared for spraying
3/ move cursor to center
4/ hold LMB+RMB (both) for couple seconds [~10]
5/ should crash
Rseding91
Factorio Staff
Factorio Staff
Posts: 14373
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.34] Crash in editor: spray wagons on rails [rail.cpp (677): Rail::getPosition]

Post by Rseding91 »

Thanks for the extensive testing and small save file to reproduce the problem. It's now fixed for the next version of 0.17. The issue was related to building locomotives/rolling stock near the edge of the map - or more specific: near tiles that the entity collided with.
If you want to get ahold of me I'm almost always on Discord.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3069
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [0.17.34] Crash in editor: spray wagons on rails [rail.cpp (677): Rail::getPosition]

Post by boskid »

Rseding91 wrote: Tue May 07, 2019 11:09 pm The issue was related to building locomotives/rolling stock near the edge of the map - or more specific: near tiles that the entity collided with.
This does not convince me as all tests except 'rail-micro' took place far from map edge. Only thing train entities (locomotive/rolling stock) could collide with were other train entities (locomotive/rolling stock).

I will verify this in next release <evil laugh> :)

-- edit:

Yup, it is fixed! good job :)
Post Reply

Return to “Resolved Problems and Bugs”