Page 1 of 1

[Dominik][0.17.17][mod] Error FluidBox.cpp:509: FluidManager::runningReinit was not true

Posted: Fri Mar 22, 2019 9:52 am
by eduran
I am afraid to say I am still experiencing crashes when loading a save game with modded underground pipes.
Former, probably related bug report (fixed with 0.17.17): viewtopic.php?f=11&t=67749

After the above bug was fixed I could play the game for some time. I did change some of the pipe connections without any trouble while playing. Now it is refusing to load again.

Logfile:

Code: Select all

   0.002 2019-03-22 10:39:47; Factorio 0.17.17 (build 43958, win64, alpha)
   0.002 Operating system: Windows 10 (version 1803) 
   0.002 Program arguments: "C:\Games\Factorio_0.17.x\bin\x64\factorio.exe" "--wait-to-close" "9268" 
   0.002 Read data path: C:/Games/Factorio_0.17.x/data
   0.002 Write data path: C:/Users/edura/AppData/Roaming/Factorio [63458/121650MB]
   0.002 Binaries path: C:/Games/Factorio_0.17.x/bin
   0.013 System info: [CPU: Intel(R) Core(TM) i5 CPU         750  @ 2.67GHz, 4 cores, RAM: 2069/4087 MB, page: 3665/8695 MB, virtual: 4247/134217727 MB, extended virtual: 0 MB]
   0.013 Display options: [FullScreen: 1] [VSync: 1] [UIScale: automatic (100.0%)] [Native DPI: 1] [Screen: 255] [Special: 00] [Lang: en]
   0.017 Available displays: 1
   0.017  [0]: \\.\DISPLAY1 - AMD Radeon HD 7800 Series {0x8080005, [0,0], 1920x1080, 32bit, 60Hz}
   0.058 [Direct3D11] Display: 0, Output: 0, DisplayAdapter: 0, RenderingAdapter: 0; d3dcompiler_47.dll
   0.108 Initialised Direct3D[0]: AMD Radeon HD 7800 Series; id: 1002-6819; driver: aticfx64.dll 22.19.677.257
   0.108   D3D Feature Level: 11.1, DXGI 1.5+, SwapChain: 1,discard,-,-,none
   0.108   [Local Video Memory] Budget: 853MB, CurrentUsage: 0MB, Reservation: 0/451MB
   0.108   [Non-Local Vid.Mem.] Budget: 1839MB, CurrentUsage: 0MB, Reservation: 0/970MB
   0.108   Tiled resources: Tier 1
   0.109   Unified Memory Architecture: No
   0.109   BGR 565 Supported: Yes
   0.109   MaximumFrameLatency: 3, GPUThreadPriority: 0
   0.171 Desktop composition is active.
   0.171 Graphics settings preset: medium-with-low-vram
   0.171   Dedicated video memory size 1004 MB
   0.171 Graphics options: [Graphics quality: normal] [Video memory usage: low] [Light scale: 25%] [DXT: low-quality]
   0.171                   [Max load threads: 32] [Max texture size: 2048] [Tex.Stream.: 1] [Rotation quality: low] [Color: 32bit]
   0.218 DSound: Starting _dsound_update thread
   0.218 DSound: Enter _dsound_update; tid=10152
   0.405 Info ModManager.cpp:240: Found duplicate mod LogisticTrainNetwork, using higher version (1.10.4 > 1.10.3).
   0.445 Info ModManager.cpp:240: Found duplicate mod SchallMachineScaling, using higher version (0.17.1 > 0.17.0).
   0.499 Loading mod core 0.0.0 (data.lua)
   0.620 Loading mod base 0.17.17 (data.lua)
   0.961 Loading mod underground-pipe-pack 0.17.0 (data.lua)
   1.159 Loading mod base 0.17.17 (data-updates.lua)
   1.351 Checksum for core: 2126933501
   1.351 Checksum of base: 1967292039
   1.351 Checksum of underground-pipe-pack: 3900016632
   2.086 Warning EnergySourcePrototype.cpp:81: emissions in prototype definition, use emissions_per_second_per_watt (proposed value 4e-06) as emissions will be not used soon: ROOT.pump.underground-mini-pump.energy_source
   2.146 Loading sounds...
   2.272 Info PlayerData.cpp:67: Local player-data.json available, timestamp 1553247587
   2.272 Info PlayerData.cpp:74: Cloud player-data.json unavailable
   2.436 Crop bitmaps.
   2.468 Parallel Sprite Loader initialized (threads: 0)
   2.550 Initial atlas bitmap size is 2048
   2.550 Created atlas bitmap 2048x896 [none]
   2.551 Created atlas bitmap 2048x1992 [decal]
   2.551 Created atlas bitmap 2048x1856 [decal]
   2.553 Created atlas bitmap 2048x2016 [low-object]
   2.555 Created atlas bitmap 2048x2048 [low-object]
   2.557 Created atlas bitmap 2048x2048 [low-object]
   2.558 Created atlas bitmap 2048x1808 [low-object]
   2.558 Created atlas bitmap 2048x2032 [mipmap, linear-minification, linear-magnification, linear-mip-level]
   2.558 Created atlas bitmap 2048x1904 [mipmap]
   2.560 Created atlas bitmap 2048x2032 [terrain, mipmap, linear-minification, linear-mip-level, no-crop]
   2.561 Created atlas bitmap 2048x2048 [terrain, mipmap, linear-minification, linear-mip-level, no-crop]
   2.562 Created atlas bitmap 2048x2048 [terrain, mipmap, linear-minification, linear-mip-level, no-crop]
   2.563 Created atlas bitmap 2048x2048 [terrain, mipmap, linear-minification, linear-mip-level, no-crop]
   2.564 Created atlas bitmap 2048x1936 [terrain, mipmap, linear-minification, linear-mip-level, no-crop]
   2.564 Created atlas bitmap 2048x2016 [terrain, mipmap, linear-minification, linear-mip-level, no-crop]
   2.564 Created atlas bitmap 2048x2016 [terrain, mipmap, linear-minification, linear-mip-level, no-crop]
   2.565 Created atlas bitmap 2048x2032 [terrain, mipmap, linear-minification, linear-mip-level, no-crop]
   2.565 Created atlas bitmap 2048x1168 [terrain, mipmap, linear-minification, linear-mip-level, no-crop]
   2.565 Created atlas bitmap 2048x2016 [smoke, mipmap, linear-minification, linear-magnification]
   2.565 Created atlas bitmap 2048x1200 [smoke, mipmap, linear-minification, linear-magnification]
   2.567 Created atlas bitmap 2048x2040 [not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level, no-crop, no-scale]
   2.567 Created atlas bitmap 2048x772 [not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level, no-crop, no-scale]
   2.568 Created atlas bitmap 2048x1692 [alpha-mask]
   2.572 Created atlas bitmap 2048x2048 [shadow, linear-magnification, alpha-mask]
   2.575 Created atlas bitmap 2048x2036 [shadow, linear-magnification, alpha-mask]
   2.578 Created atlas bitmap 2048x2040 [shadow, linear-magnification, alpha-mask]
   2.580 Created atlas bitmap 2048x2036 [shadow, linear-magnification, alpha-mask]
   2.582 Created atlas bitmap 2048x2048 [shadow, linear-magnification, alpha-mask]
   2.584 Created atlas bitmap 2048x1996 [shadow, linear-magnification, alpha-mask]
   2.587 Created atlas bitmap 2048x2012 [shadow, linear-magnification, alpha-mask]
   2.589 Created atlas bitmap 2048x2048 [shadow, linear-magnification, alpha-mask]
   2.592 Created atlas bitmap 2048x2044 [shadow, linear-magnification, alpha-mask]
   2.594 Created atlas bitmap 2048x2044 [shadow, linear-magnification, alpha-mask]
   2.596 Created atlas bitmap 2048x2024 [shadow, linear-magnification, alpha-mask]
   2.600 Created atlas bitmap 2048x2048 [shadow, linear-magnification, alpha-mask]
   2.600 Created atlas bitmap 2048x1664 [shadow, linear-magnification, alpha-mask]
   2.601 Created atlas bitmap 2048x2048 [shadow, mipmap, linear-magnification, alpha-mask]
   2.601 Created atlas bitmap 2048x544 [shadow, mipmap, linear-magnification, alpha-mask]
   3.101 Created virtual atlas pages 4096x4096x8
   3.114 Texture processor created. GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
   4.013 Parallel Sprite Loader initialized (threads: 1)
  14.826 Sprites loaded
  14.857 Generated mipmaps for atlas of size 2048x2016
  14.878 Generated mipmaps for atlas of size 2048x2048
  14.900 Generated mipmaps for atlas of size 2048x2048
  14.922 Generated mipmaps for atlas of size 2048x1808
  14.944 Generated mipmaps for atlas of size 2048x2032
  14.966 Generated mipmaps for atlas of size 2048x1904
  14.988 Generated mipmaps for atlas of size 2048x2032
  15.010 Generated mipmaps for atlas of size 2048x2048
  15.032 Generated mipmaps for atlas of size 2048x2048
  15.054 Generated mipmaps for atlas of size 2048x2048
  15.076 Generated mipmaps for atlas of size 2048x1936
  15.098 Generated mipmaps for atlas of size 2048x2016
  15.120 Generated mipmaps for atlas of size 2048x2016
  15.142 Generated mipmaps for atlas of size 2048x2032
  15.164 Generated mipmaps for atlas of size 2048x1168
  15.186 Generated mipmaps for atlas of size 2048x2016
  15.208 Generated mipmaps for atlas of size 2048x1200
  15.219 Generated mipmaps for atlas of size 2048x2040
  15.230 Generated mipmaps for atlas of size 2048x772
  15.242 Generated mipmaps for atlas of size 2048x2048
  15.253 Generated mipmaps for atlas of size 2048x544
  15.615 Generated mipmaps for virtual atlas of size 8192x16384
  15.621 Custom inputs active: 9
  15.696 Factorio initialised
  15.697 Info HttpSharedState.cpp:54: Downloading https://updater.factorio.com/updater/get-available-versions?username=eduran&token=<private>&apiVersion=2
  16.741 0 packages available to download (experimental updates enabled).
 184.915 Loading map C:\Users\edura\AppData\Roaming\Factorio\saves\d_01.zip: 29799445 bytes.
 185.096 Loading level.dat: 73862733 bytes.
 185.104 Info Scenario.cpp:161: Map version 0.17.17-2
 193.113 Fluid amount lowered from 68787.7 to 25000 in storage-tank
 193.115 Fluid amount lowered from 95506.6 to 25000 in storage-tank
 193.115 Fluid amount lowered from 95565.6 to 25000 in storage-tank
 193.115 Fluid amount lowered from 95622.3 to 25000 in storage-tank
 193.115 Fluid amount lowered from 95570 to 25000 in storage-tank
 193.115 Fluid amount lowered from 95680.1 to 25000 in storage-tank
 193.115 Fluid amount lowered from 95758.6 to 25000 in storage-tank
 193.115 Fluid amount lowered from 96016.1 to 25000 in storage-tank
 193.115 Fluid amount lowered from 95973.6 to 25000 in storage-tank
 193.115 Fluid amount lowered from 95798.6 to 25000 in storage-tank
 193.115 Fluid amount lowered from 95675.8 to 25000 in storage-tank
 193.115 Fluid amount lowered from 95463.4 to 25000 in storage-tank
 193.115 Fluid amount lowered from 95411.1 to 25000 in storage-tank
 193.117 Fluid amount lowered from 95491.3 to 25000 in storage-tank
 193.117 Fluid amount lowered from 95812.1 to 25000 in storage-tank
 193.117 Fluid amount lowered from 96264.7 to 25000 in storage-tank
 193.117 Fluid amount lowered from 96235 to 25000 in storage-tank
 193.117 Fluid amount lowered from 95552.3 to 25000 in storage-tank
 193.117 Fluid amount lowered from 95368.5 to 25000 in storage-tank
 193.136 Fluid amount lowered from 32453.7 to 25000 in storage-tank
 193.136 Fluid amount lowered from 31346.5 to 25000 in storage-tank
 193.136 Fluid amount lowered from 28751.3 to 25000 in storage-tank
 193.136 Fluid amount lowered from 27718.2 to 25000 in storage-tank
 193.136 Repaired wrong fluid system disconnect.
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\cygwin64\tmp\factorio-build-vcsmqf\libraries\stackwalker\stackwalker.cpp (924): StackWalker::ShowCallstack
c:\cygwin64\tmp\factorio-build-vcsmqf\src\util\logger.cpp (376): Logger::writeStacktrace
c:\cygwin64\tmp\factorio-build-vcsmqf\src\util\logger.cpp (527): Logger::logStacktrace
c:\cygwin64\tmp\factorio-build-vcsmqf\src\util\logging.cpp (90): Logging::logAndAbortOrThrow
c:\cygwin64\tmp\factorio-build-vcsmqf\src\util\logging.cpp (84): Logging::logAndAbortOrThrow
c:\cygwin64\tmp\factorio-build-vcsmqf\src\fluid\fluidbox.cpp (509): FluidBox::FluidBox
c:\cygwin64\tmp\factorio-build-vcsmqf\src\fluid\fluidsystem.cpp (215): FluidSystem::absorb
c:\cygwin64\tmp\factorio-build-vcsmqf\src\fluid\fluidbox.cpp (725): FluidBox::setupUndergroundConnection
c:\cygwin64\tmp\factorio-build-vcsmqf\src\fluid\fluidbox.cpp (576): FluidBox::setup
c:\cygwin64\tmp\factorio-build-vcsmqf\src\entity\pump.cpp (200): Pump::setup
c:\cygwin64\tmp\factorio-build-vcsmqf\src\map\map.cpp (824): Map::setupEntities
c:\cygwin64\tmp\factorio-build-vcsmqf\src\scenario\scenario.cpp (267): Scenario::loadFactory
c:\cygwin64\tmp\factorio-build-vcsmqf\src\scenario\parallelscenarioloader.cpp (156): 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: 00007FFB25863DC4)
00007FFB25863DC4 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB28403691)
00007FFB28403691 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
 197.773 Error FluidBox.cpp:509: FluidManager::runningReinit was not true
Logger::writeStacktrace skipped.
 197.774 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.
 200.842 Uploading log file
 200.871 Error CrashHandler.cpp:197: Heap validation: success.
 200.876 Creating crash dump.
 201.416 CrashDump success
Savegame to reproduce: https://1drv.ms/u/s!AoyBknbNbiYNpHlGGErpNgqhA6Iz
Logfile, crash dump and the mod required to produce the crash are attached.

Thanks for taking the time to get 0.17 working with modded fluid handling and putting all that effort in for fixing something that is not part of the base game!

Re: [Dominik][0.17.17][mod] Error FluidBox.cpp:509: FluidManager::runningReinit was not true

Posted: Fri Mar 22, 2019 2:03 pm
by Dominik
Thanks, keep posting bugs and we will get it perfect.
I see it crashes on the modded pump. So probably something is wrong with connecting to it. Can you recall anything you did with it?

Re: [Dominik][0.17.17][mod] Error FluidBox.cpp:509: FluidManager::runningReinit was not true

Posted: Fri Mar 22, 2019 2:50 pm
by eduran
I just tried to recreate the crash from an earlier save. This time the game crashed while I was testing. Here is what I did:

1. Connect a pipe-to-ground with an underground extension at long range:
step_1.jpg
step_1.jpg (134.05 KiB) Viewed 2787 times
2. Place pump in between the two, such that it is connected to only one side:
step_2.jpg
step_2.jpg (151.01 KiB) Viewed 2787 times
3. Now you are in a buggy state: the left outlet is not just connected to the pump, but also to the extension on the right:
step_3.jpg
step_3.jpg (104.04 KiB) Viewed 2787 times
From this point onward any number of actions involving the pump can crash: mining the pump, mousing over the pump, mousing over the left pipe-to-ground. Or, sometimes, saving and loading. Its somewhat inconsistent. Not every action causes a crash every time, but it usually happens very quickly.


Edit: Attached log. This one is from a crash while hovering the mouse over the pump.

Code: Select all

 
 335.096 Error CrashHandler.cpp:548: Received SIGSEGV
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\cygwin64\tmp\factorio-build-vcsmqf\libraries\stackwalker\stackwalker.cpp (924): StackWalker::ShowCallstack
c:\cygwin64\tmp\factorio-build-vcsmqf\src\util\logger.cpp (376): Logger::writeStacktrace
c:\cygwin64\tmp\factorio-build-vcsmqf\src\util\logger.cpp (527): Logger::logStacktrace
c:\cygwin64\tmp\factorio-build-vcsmqf\src\util\crashhandler.cpp (170): CrashHandler::writeStackTrace
c:\cygwin64\tmp\factorio-build-vcsmqf\src\util\crashhandler.cpp (557): CrashHandler::SignalHandler
minkernel\crts\ucrt\src\appcrt\misc\exception_filter.cpp (219): _seh_filter_exe
f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl (304): `__scrt_common_main_seh'::`1'::filt$0
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF60B0070A8)
00007FF60B0070A8 (factorio): (filename not available): __C_specific_handler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB2842F7DD)
00007FFB2842F7DD (ntdll): (filename not available): _chkstk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB2839D856)
00007FFB2839D856 (ntdll): (filename not available): RtlWalkFrameChain
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB2842E70E)
00007FFB2842E70E (ntdll): (filename not available): KiUserExceptionDispatcher
c:\cygwin64\tmp\factorio-build-vcsmqf\src\fluid\fluidbox.cpp (290): FluidBox::drawUndergroundConnections
c:\cygwin64\tmp\factorio-build-vcsmqf\src\entity\entity.cpp (2525): Entity::drawUndergroundConnections
c:\cygwin64\tmp\factorio-build-vcsmqf\src\entity\pump.cpp (415): Pump::drawSelectionInfo
c:\cygwin64\tmp\factorio-build-vcsmqf\src\graphics\cursorrenderer.cpp (260): CursorRenderer::renderEntitySelection
c:\cygwin64\tmp\factorio-build-vcsmqf\src\graphics\cursorrenderer.cpp (173): CursorRenderer::renderPlayerCursor
c:\cygwin64\tmp\factorio-build-vcsmqf\src\graphics\cursorrenderer.cpp (77): CursorRenderer::prepare
c:\cygwin64\tmp\factorio-build-vcsmqf\src\graphics\gamerenderer.cpp (150): GameRenderer::prepareJob
c:\cygwin64\tmp\factorio-build-vcsmqf\src\graphics\gamerenderer.cpp (130): GameRenderer::prepare
c:\cygwin64\tmp\factorio-build-vcsmqf\src\gameview.cpp (1159): GameView::prepareRender
c:\cygwin64\tmp\factorio-build-vcsmqf\src\mainloop.cpp (915): MainLoop::prepare
c:\cygwin64\tmp\factorio-build-vcsmqf\src\mainloop.cpp (606): MainLoop::mainLoopStep
c:\cygwin64\tmp\factorio-build-vcsmqf\src\mainloop.cpp (374): MainLoop::run
c:\cygwin64\tmp\factorio-build-vcsmqf\src\main.cpp (1248): wmain
f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl (288): __scrt_common_main_seh
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB25863DC4)
00007FFB25863DC4 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB28403691)
00007FFB28403691 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
 339.070 Error CrashHandler.cpp:175: Map tick at moment of crash: 48513575
 339.070 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.

Re: [Dominik][0.17.17][mod] Error FluidBox.cpp:509: FluidManager::runningReinit was not true

Posted: Fri Mar 22, 2019 4:50 pm
by Dominik
Yes, that is what I imagined. Thanks!

Re: [Dominik][0.17.17][mod] Error FluidBox.cpp:509: FluidManager::runningReinit was not true

Posted: Mon Mar 25, 2019 2:09 pm
by Dominik
Another case that nobody really encountered until this day :) I have fixed it. But also realized that if you take what you are doing and mix ghosts into it there are things that just should not work ever :D So don't do it. Please.