Page 1 of 1

[kovarex] [0.17.36] Crash: ConstructionManager for force 1 has queued to deconstruct an entity with force=5

Posted: Mon Mar 04, 2019 8:55 am
by shentlyn
When playing the campaign with autodeconstruct, some of the miners in the inital base are marked for deconstruction. Some minutes moving to the new base location, the game crashes to desktop with ConstructionManager::processToDeconstructQueue on the stack trace. The mod is disabled during the crash; trying to reproduce another crash.

Steps:
1. Play campaign with autodeconstruct enabled. Some of the miners are marked for deconstruction.
2. Prior to the escape phase to new location _autosave3 is saved.

3. Load _autosave3 with all mods disabled. (trying to repro another crash)
3.1 Run to new location, autosave-rebuild is created.
3.2 Restart game.
3.3 Reload autosave-rebuild.
3.4 Wait. The game crashed three times within 2 minutes of loading autosave-rebuild with no player input

4 Load _autosave3 with all mods disabled
4.1 Run to new location, save game periodically.
4.2 Restart game
4.3 Load previously saved game. The game crashes somewhat consistently (4 times out of 6) after 15s with no player input. The computer was restarted between retries. Crashes were observed also after computer restart.

Re: [0.17.4] Crash in campaign with items marked for deconstruction (mod related)

Posted: Mon Mar 04, 2019 11:33 am
by Loewchen

Code: Select all

   0.000 2019-03-04 08:52:25; Factorio 0.17.4 (build 43174, win64, steam)
   0.000 Operating system: Windows 8.1 
   0.001 Program arguments: "E:\Steam\steamapps\common\Factorio\bin\x64\Factorio.exe" 
   0.001 Read data path: E:/Steam/SteamApps/common/Factorio/data
   0.001 Write data path: C:/Users/User/AppData/Roaming/Factorio [50977/204849MB]
   0.001 Binaries path: E:/Steam/SteamApps/common/Factorio/bin
   0.008 System info: [CPU:        Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz, 8 cores, RAM: 10836/32712 MB, page: 15526/34760 MB, virtual: 188/134217727 MB, extended virtual: 0 MB]
   0.008 Display options: [FullScreen: 1] [VSync: 1] [UIScale: automatic (100.0%)] [MultiSampling: OFF] [Screen: 255] [Lang: en]
   0.015 Available displays: 1
   0.015  [0]: \\.\DISPLAY1 - NVIDIA GeForce GTX 1060 6GB {0x05, [0,0], 1920x1080, 32bit, 60Hz}
   0.129 Display: 0 -> Adapter: 0, Output: 0
   0.217 Initialised Direct3D[0]: NVIDIA GeForce GTX 1060 6GB; driver: nvd3dumx.dll 25.21.14.1735
   0.217   D3D Feature Level: 11.1, DXGI 1.2+
   0.217   Tiled resources: Tier 2
   0.217   BGR 565 Supported: Yes
   0.217   MaximumFrameLatency: 3, GPUThreadPriority: 0
   0.258 Desktop composition is active.
   0.258 Graphics settings preset: very-high
   0.258   Dedicated video memory size 5972 MB
   0.258 Graphics options: [Graphics quality: high] [Video memory usage: all] [Light scale: 70%] [DXT: high-quality]
   0.258                   [Max load threads: 32] [Max texture size: 0] [Tex.Stream.: 0] [Low quality rotation: 0]
   0.281 DSound: Starting _dsound_update thread
   0.281 DSound: Enter _dsound_update; tid=6076
   0.379 Loading mod core 0.0.0 (data.lua)
   0.471 Loading mod base 0.17.4 (data.lua)
   0.708 Loading mod base 0.17.4 (data-updates.lua)
   0.812 Checksum for core: 3928040144
   0.812 Checksum of base: 60305742
   1.342 Loading sounds...
   1.389 Info PlayerData.cpp:69: Local player-data.json unavailable
   1.389 Info PlayerData.cpp:72: Cloud player-data.json available, timestamp 1551529596
   1.525 Initial atlas bitmap size is 16384
   1.564 Created atlas bitmap 16384x16380 [none]
   1.570 Created atlas bitmap 16384x11284 [none]
   1.571 Created atlas bitmap 16384x2116 [decal]
   1.574 Created atlas bitmap 16384x3808 [low-object]
   1.575 Created atlas bitmap 16384x1888 [mipmap, linear-minification, linear-magnification, linear-mip-level]
   1.577 Created atlas bitmap 16384x6592 [terrain, mipmap, linear-minification, linear-mip-level, no-crop]
   1.578 Created atlas bitmap 16384x480 [smoke, mipmap, linear-minification, linear-magnification]
   1.579 Created atlas bitmap 16384x456 [not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level, no-crop, no-scale]
   1.579 Created atlas bitmap 16384x748 [alpha-mask]
   1.583 Created atlas bitmap 16384x12632 [shadow, linear-magnification, alpha-mask]
   1.584 Created atlas bitmap 16384x1264 [shadow, mipmap, linear-magnification, alpha-mask]
   1.591 Texture processor created. GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
   2.169 Parallel Sprite Loader initialized (threads: 7)
   2.180 Error ParallelSpriteLoader.cpp:223: Parallel sprite loading Failed: Failed to load sprite: loading bitmap failed: OutOfMemory..
RAM: 12127/32712 MB, page: 17779/34760 MB, virtual: 2520/134217727 MB, extended virtual: 0 MB
Falling back to normal sprite loading.
  30.477 Sprites loaded
  30.618 Generated mipmaps for atlas of size 16384x3808
  30.640 Generated mipmaps for atlas of size 16384x1888
  30.662 Generated mipmaps for atlas of size 16384x6592
  30.673 Generated mipmaps for atlas of size 16384x480
  30.684 Generated mipmaps for atlas of size 16384x456
  30.695 Generated mipmaps for atlas of size 16384x1264
  30.702 Custom inputs active: 0
  30.791 Factorio initialised
  35.649 Loading map C:\Users\User\AppData\Roaming\Factorio\saves\_autosave-rebuild.zip: 2646599 bytes.
  35.775 Loading Level.dat: 4338210 bytes.
  35.778 Info Scenario.cpp:147: Map version 0.17.4-1
  35.866 Loading script.dat: 153530 bytes.
  35.885 Checksum for script C:/Users/User/AppData/Roaming/Factorio/temp/currently-playing/control.lua: 4289712941
 141.768 Error CrashHandler.cpp:376: Exception Code: c0000005, Address: 0x00007ff6a0424122
ModuleBase: 0x00007ff69ff00000, ImageSize: 015ed000, RelativeAddress: 00524122
 141.768 Error CrashHandler.cpp:382: Access Violation: Read at address FFFFFFFFFFFFFFFF
 141.768 Error CrashHandler.cpp:396: Exception Context:
rax=000000f65edfcd50, rbx=000000f65caa45c0, rcx=000000f65caa45c0,
rdx=0000000000000002, rsi=000000f6608a6fa0, rdi=0000000000000000,
rip=00007ff6a0424122, rsp=000000f630afebc0, rbp=0000000000000001,
 r8=000000f692571a88,  r9=0000000000008000, r10=000000f6499e1030,
r11=000000f630afec48, r12=0000000000107ac0, r13=0000000000000000,
r14=000000f6608a7068, r15=0000000000000003
 141.768 Crashed in E:\Steam\steamapps\common\Factorio\bin\x64\Factorio.exe (0x00007ff69ff00000 - 0x00007ff6a14ed000)
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: 00007FFB62921B92)
00007FFB62921B92 (KERNELBASE): (filename not available): UnhandledExceptionFilter
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB6536F1B3)
00007FFB6536F1B3 (ntdll): (filename not available): memset
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB65351E26)
00007FFB65351E26 (ntdll): (filename not available): _C_specific_handler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB6536349D)
00007FFB6536349D (ntdll): (filename not available): _chkstk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB653248D7)
00007FFB653248D7 (ntdll): (filename not available): RtlRaiseException
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB6536262A)
00007FFB6536262A (ntdll): (filename not available): KiUserExceptionDispatcher
c:\cygwin64\tmp\factorio-build-ocil06\src\logistics\constructionmanager.cpp (664): ConstructionManager::processToDeconstructQueue
c:\cygwin64\tmp\factorio-build-ocil06\src\logistics\constructionmanager.cpp (488): ConstructionManager::sendRobotsToDeconstruct
c:\cygwin64\tmp\factorio-build-ocil06\src\force\forcemanager.cpp (108): ForceManager::update
c:\cygwin64\tmp\factorio-build-ocil06\src\map\map.cpp (1446): 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
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: 00007FFB644A13D2)
00007FFB644A13D2 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB652E54F4)
00007FFB652E54F4 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
 143.463 Error CrashHandler.cpp:174: Map tick at moment of crash: 4224003
 143.463 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.
 162.485 Uploading log file
 162.512 Error CrashHandler.cpp:221: Heap validation: success.
 162.513 Creating crash dump.
 162.649 CrashDump success

Re: [0.17.4] Crash in campaign with items marked for deconstruction (mod related)

Posted: Tue May 07, 2019 3:56 am
by Rseding91
I believe this is fixed in the latest version of 0.17. Can you please confirm it is?

Re: [0.17.4] Crash in campaign with items marked for deconstruction (mod related)

Posted: Tue May 07, 2019 7:46 am
by shentlyn
Can't reproduce steps.

When loading _autosave3 as in step 3, 4 the game gives notice about unrecoverable error in scenario:
_load_of_autosave3.PNG
_load_of_autosave3.PNG (2.84 MiB) Viewed 200 times
When loading _autosave-rebuild as in step 3.3 then game crashes during load as seen in the attached files:
factorio-current.log
(7.24 KiB) Downloaded 3 times
Will try to see if I have saves that can be loaded after work.

Re: [0.17.4] Crash in campaign with items marked for deconstruction (mod related)

Posted: Tue May 07, 2019 8:15 am
by Rseding91
After looking into it more, I remembered that we don't support any mods when running the campaign scenarios so you'll just have to disable the mods if you want to play the campaign.

Re: [0.17.4] Crash: ConstructionManager for force 1 has queued to deconstruct an entity with force=5

Posted: Tue May 07, 2019 9:27 am
by Bilka
We do care about game-breaking bugs in the campaign (the not lua kind), but the above post doesn't make it very clear that it is that kind of bug.

Here is the log file with the error:

Code: Select all

   0.000 2019-05-07 10:35:40; Factorio 0.17.36 (build 44798, win64, steam)
   0.000 Operating system: Windows 8.1 
   0.000 Program arguments: "E:\Steam\steamapps\common\Factorio\bin\x64\Factorio.exe" 
   0.000 Read data path: E:/Steam/SteamApps/common/Factorio/data
   0.000 Write data path: C:/Users/User/AppData/Roaming/Factorio [10777/204849MB]
   0.000 Binaries path: E:/Steam/SteamApps/common/Factorio/bin
   0.007 System info: [CPU:        Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz, 8 cores, RAM: 8040/32712 MB, page: 10400/34760 MB, virtual: 188/134217727 MB, extended virtual: 0 MB]
   0.007 Display options: [FullScreen: 1] [VSync: 1] [UIScale: automatic (100.0%)] [Native DPI: 1] [Screen: 255] [Special: 00] [Lang: en]
   0.013 Available displays: 1
   0.013  [0]: \\.\DISPLAY1 - NVIDIA GeForce GTX 1060 6GB {0x05, [0,0], 1920x1080, 32bit, 60Hz}
   0.125 [Direct3D11] Display: 0, Output: 0, DisplayAdapter: 0, RenderingAdapter: 0; d3dcompiler_47.dll
   0.190 Initialised Direct3D[0]: NVIDIA GeForce GTX 1060 6GB; id: 10de-1c03; driver: nvd3dumx.dll 25.21.14.1735
   0.190   D3D Feature Level: 11.1, DXGI 1.2+, SwapChain: 1,discard,-,-,none
   0.190   Tiled resources: Tier 2
   0.190   BGR 565 Supported: Yes
   0.190   MaximumFrameLatency: 3, GPUThreadPriority: 0
   0.233 Desktop composition is active.
   0.233 Graphics settings preset: very-high
   0.233   Dedicated video memory size 5972 MB
   0.233 Graphics options: [Graphics quality: high] [Video memory usage: all] [Light scale: 70%] [DXT: high-quality]
   0.233                   [Max load threads: 32] [Max texture size: 0] [Tex.Stream.: 0] [Rotation quality: normal] [Color: 32bit]
   0.256 DSound: Starting _dsound_update thread
   0.256 DSound: Enter _dsound_update; tid=7600
   0.348 Loading mod core 0.0.0 (data.lua)
   0.425 Loading mod base 0.17.36 (data.lua)
   0.654 Loading mod base 0.17.36 (data-updates.lua)
   0.759 Checksum for core: 1237570159
   0.759 Checksum of base: 1882531248
   1.293 Loading sounds...
   1.339 Info PlayerData.cpp:69: Local player-data.json unavailable
   1.339 Info PlayerData.cpp:72: Cloud player-data.json available, timestamp 1557211013
   1.480 Initial atlas bitmap size is 16384
   1.530 Created atlas bitmap 16384x16368 [no-crop]
   1.537 Created atlas bitmap 16384x11412 [none]
   1.538 Created atlas bitmap 8192x3872 [decal]
   1.540 Created atlas bitmap 16384x4288 [low-object]
   1.541 Created atlas bitmap 2048x192 [icon-background, not-compressed, linear-minification, linear-magnification, linear-mip-level, , no-crop, no-scale]
   1.542 Created atlas bitmap 8192x3552 [mipmap, linear-minification, linear-magnification, linear-mip-level]
   1.544 Created atlas bitmap 16384x6880 [terrain, mipmap, linear-minification, linear-mip-level, no-crop]
   1.545 Created atlas bitmap 4096x1600 [smoke, mipmap, linear-minification, linear-magnification]
   1.545 Created atlas bitmap 4096x1408 [not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level, no-crop, no-scale]
   1.546 Created atlas bitmap 8192x1496 [alpha-mask]
   1.550 Created atlas bitmap 16384x12632 [shadow, linear-magnification, alpha-mask]
   1.551 Created atlas bitmap 8192x2352 [shadow, mipmap, linear-magnification, alpha-mask]
   1.558 Texture processor created (2048). GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
   2.178 Parallel Sprite Loader initialized (threads: 7)
  13.325 Sprites loaded
  13.369 Generated mipmaps for atlas [3] of size 16384x4288   
  13.395 Generated mipmaps for atlas [5] of size 8192x3552   
  13.429 Generated mipmaps for atlas [6] of size 16384x6880   
  13.441 Generated mipmaps for atlas [7] of size 4096x1600   
  13.454 Generated mipmaps for atlas [8] of size 4096x1408   
  13.466 Generated mipmaps for atlas [11] of size 8192x2352   
  13.474 Custom inputs active: 6
  13.571 Factorio initialised
  19.385 Loading map C:\Users\User\AppData\Roaming\Factorio\saves\_autosave-rebuild.zip: 2695460 bytes.
  19.510 Loading level.dat: 4488370 bytes.
  19.513 Info Scenario.cpp:161: Map version 0.17.4-1
  19.515 Info PrototypeMigrationList.cpp:60: Activating migration base/2019-03-29_Factorio_0.17.23.json
  19.516 Info PrototypeMigrationList.cpp:60: Activating migration base/2019-04-27_Factorio_0.17.35.json
  19.516 Info PrototypeMigrationList.cpp:60: Activating migration base/2019-04-30_Factorio_0.17.35.json
  19.516 Info PrototypeMigrationList.cpp:60: Activating migration base/2019-05-01_Factorio_0.17.35.json
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\cygwin64\tmp\factorio-build-zau9u9\libraries\stackwalker\stackwalker.cpp (924): StackWalker::ShowCallstack
c:\cygwin64\tmp\factorio-build-zau9u9\src\util\logger.cpp (376): Logger::writeStacktrace
c:\cygwin64\tmp\factorio-build-zau9u9\src\util\logger.cpp (527): Logger::logStacktrace
c:\cygwin64\tmp\factorio-build-zau9u9\src\util\logging.cpp (90): Logging::logAndAbortOrThrow
c:\cygwin64\tmp\factorio-build-zau9u9\src\util\logging.cpp (84): Logging::logAndAbortOrThrow
c:\cygwin64\tmp\factorio-build-zau9u9\src\logistics\constructionmanager.cpp (403): ConstructionManager::checkConsistency
c:\cygwin64\tmp\factorio-build-zau9u9\src\map\map.cpp (1986): Map::checkConsistency
c:\cygwin64\tmp\factorio-build-zau9u9\src\map\map.cpp (1077): Map::setupEntities
c:\cygwin64\tmp\factorio-build-zau9u9\src\scenario\scenario.cpp (270): Scenario::loadFactory
c:\cygwin64\tmp\factorio-build-zau9u9\src\scenario\parallelscenarioloader.cpp (157): ParallelScenarioLoader::doLoad
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*)(ParallelScenarioLoader *,MapDeserialiser *,enum InputType,InputHandler *,MultiplayerManagerBase *,bool),ParallelScenarioLoader *,MapDeserialiser *,enum InputType,InputHandler *,MultiplayerManagerBase *,bool>,std::default_delete<std::tuple<void (__cdecl*)(ParallelScenarioLoader *,MapDeserialiser *,enum InputType,InputHandler *,MultiplayerManagerBase *,bool),ParallelScenarioLoader *,MapDeserialiser *,enum InputType,InputHandler *,MultiplayerManagerBase *,bool> > > >::_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: 00007FFFD8CE13D2)
00007FFFD8CE13D2 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFFDB6654F4)
00007FFFDB6654F4 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
  22.093 Error ConstructionManager.cpp:405: ConstructionManager for force 1 has queued to deconstruct an entity with force=5
Logger::writeStacktrace skipped.
  22.094 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.
  26.444 Uploading log file
  26.469 Error CrashHandler.cpp:215: Heap validation: success.
  26.470 Creating crash dump.
  26.588 CrashDump success

Re: [0.17.4] Crash in campaign with items marked for deconstruction (mod related)

Posted: Thu May 16, 2019 6:58 am
by kovarex
Rseding91 wrote:
Tue May 07, 2019 8:15 am
After looking into it more, I remembered that we don't support any mods when running the campaign scenarios so you'll just have to disable the mods if you want to play the campaign.
We should probably have a mechanism for that.
Scenario could probably specify, that it doesn't allow any mods (or allow only specific set of mods).

Re: [0.17.4] Crash in campaign with items marked for deconstruction (mod related)

Posted: Thu May 16, 2019 7:55 am
by eradicator
kovarex wrote:
Thu May 16, 2019 6:58 am
Rseding91 wrote:
Tue May 07, 2019 8:15 am
After looking into it more, I remembered that we don't support any mods when running the campaign scenarios so you'll just have to disable the mods if you want to play the campaign.
We should probably have a mechanism for that.
Scenario could probably specify, that it doesn't allow any mods (or allow only specific set of mods).
How about a soft warning based on table_size(game.active_mods) > 0? That way you don't completely remove the ability to have campaign mods.

Re: [kovarex] [0.17.36] Crash: ConstructionManager for force 1 has queued to deconstruct an entity with force=5

Posted: Thu May 16, 2019 9:49 am
by kovarex
The save file is already in a wrong state. There is more to this puzzle then just the auto deconstruct, as there is probably some force-altering mod related.

Moving to pending until there is a way to reproduce it.

Re: [kovarex] [0.17.36] Crash: ConstructionManager for force 1 has queued to deconstruct an entity with force=5

Posted: Thu May 16, 2019 11:34 am
by Twinsen
Related: viewtopic.php?f=29&t=67353
Maybe something related to campaign script?