Page 1 of 1

[0.17.4] - Crash when deconstructing stack inserter

Posted: Sun Mar 03, 2019 11:34 pm
by RockyB
00007FFAF162E70E (ntdll): (filename not available): KiUserExceptionDispatcher
c:\cygwin64\tmp\factorio-build-ocil06\src\entity\inserter.cpp (974): Inserter::dropHeldItem
c:\cygwin64\tmp\factorio-build-ocil06\src\entity\inserter.cpp (1100): Inserter::update
c:\cygwin64\tmp\factorio-build-ocil06\src\surface\chunk.cpp (555): Chunk::updateActiveEntities
c:\cygwin64\tmp\factorio-build-ocil06\src\surface\chunk.cpp (604): Chunk::updateEntities
c:\cygwin64\tmp\factorio-build-ocil06\src\surface\surface.cpp (1362): Surface::update
c:\cygwin64\tmp\factorio-build-ocil06\src\map\map.cpp (1435): Map::updateEntities
c:\cygwin64\tmp\factorio-build-ocil06\src\game.cpp (189): Game::update

Save file is attached.

Context: I'm replacing my existing copper drop-off at the top-right of the main base. There's a train there that has no path but has some copper ore left in it because the conditions to leave the station have been met. On setting the train to manual to force the existing copper ore to unload, then marking the train and the unloader assembly for deconstruction, I get a crash to desktop. Replicated this twice.

At a guess I'd say that the inserter is getting removed then the dropHeldItem event fired the next tick, causing a null reference exception.

Re: [0.17.4] - Crash when deconstructing stack inserter

Posted: Mon Mar 04, 2019 5:02 pm
by boskid
confirm. Can recreate crash from this autosave.

Same stack trace:

Code: Select all

00007FFB7358E70E (ntdll): (filename not available): KiUserExceptionDispatcher
c:\cygwin64\tmp\factorio-build-ocil06\src\entity\inserter.cpp (974): Inserter::dropHeldItem
c:\cygwin64\tmp\factorio-build-ocil06\src\entity\inserter.cpp (1100): Inserter::update
c:\cygwin64\tmp\factorio-build-ocil06\src\surface\chunk.cpp (555): Chunk::updateActiveEntities
c:\cygwin64\tmp\factorio-build-ocil06\src\surface\chunk.cpp (604): Chunk::updateEntities
c:\cygwin64\tmp\factorio-build-ocil06\src\surface\surface.cpp (1362): Surface::update
c:\cygwin64\tmp\factorio-build-ocil06\src\map\map.cpp (1435): Map::updateEntities
c:\cygwin64\tmp\factorio-build-ocil06\src\game.cpp (189): Game::update
c:\cygwin64\tmp\factorio-build-ocil06\src\scenario\scenario.cpp (1077): Scenario::update
c:\cygwin64\tmp\factorio-build-ocil06\src\mainloop.cpp (1064): 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
Also i have managed to prepare save with described actions, save it (rockyb_autosave3_prep) and it reproduces crash all the times.
Steps to reproduce:
1/ Load rockyb_autosave3_prep.zip
2/ Wait 10 seconds
3/ Crash (100% crash rate, tested 3 times)

-- edit1:

rockyb_autosave3_prep.zip still crashes in [0.17.5]

Re: [0.17.4] - Crash when deconstructing stack inserter

Posted: Tue Mar 05, 2019 1:54 pm
by Rseding91
Thanks for the report and the save file(s). It's now fixed for the next version of 0.17.