[0.17.14] Crash while saving -- null ElectricNetwork pointer

Bugs that we were not able to reproduce, and/or are waiting for more detailed info.
User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 978
Joined: Sat Apr 09, 2016 8:39 pm
Contact:

[0.17.14] Crash while saving -- null ElectricNetwork pointer

Post by TruePikachu »

I had a debugger already attached (for an unrelated reason, only having been used to probe memory), so the normal crash logic didn't trigger (or rather, it kept getting caught by the debugger). Here are the relevant excerpts from the log file:

Code: Select all

   0.002 2019-03-17 11:21:15; Factorio 0.17.14 (build 43773, win64, steam)
   0.002 Operating system: Windows 7 Service Pack 1
   0.002 Program arguments: "C:\Program Files (x86)\Steam\steamapps\common\Factorio\bin\x64\Factorio.exe" 
   0.002 Read data path: C:/Program Files (x86)/Steam/SteamApps/common/Factorio/data
   0.002 Write data path: C:/Users/Chris/AppData/Roaming/Factorio [114634/589910MB]
   0.002 Binaries path: C:/Program Files (x86)/Steam/SteamApps/common/Factorio/bin
   0.019 System info: [CPU: AMD A6-4400M APU with Radeon(tm) HD Graphics   , 2 cores, RAM: 3957/7650 MB, page: 4482/15840 MB, virtual: 171/8388607 MB, extended virtual: 0 MB]
   0.019 Display options: [FullScreen: 1] [VSync: 1] [UIScale: custom (85.0%)] [Native DPI: 1] [Screen: 255] [Special: 00] [Lang: en]
   0.064 Available displays: 1
   0.064  [0]: \\.\DISPLAY1 - AMD Radeon HD 7520G {0x80005, [0,0], 1366x768, 32bit, 60Hz}
   0.156 [Direct3D11] Display: 0, Output: 0, DisplayAdapter: 0, RenderingAdapter: 0; d3dcompiler_47.dll
   0.211 Initialised Direct3D[0]: AMD Radeon HD 7520G; id: 1002-9990; driver: aticfx64.dll 8.17.10.1333
   0.211   D3D Feature Level: 11.0, DXGI 1.2+, SwapChain: 3,discard,-,-
   0.211   BGR 565 Supported: No
   0.211   SetMaximumFrameLatency: 4, GPUThreadPriority: 0
   0.295 Desktop composition is active.
   0.295 Graphics settings preset: medium-with-low-vram
   0.295   Dedicated video memory size 479 MB
   0.295 Graphics options: [Graphics quality: normal] [Video memory usage: high] [Light scale: 25%] [DXT: low-quality]
   0.295                   [Max load threads: 32] [Max texture size: 4096] [Tex.Stream.: 1] [Rotation quality: low] [Color: 32bit]
   0.398 DSound: Starting _dsound_update thread
   0.403 DSound: Enter _dsound_update; tid=5412
   0.833 Loading mod core 0.0.0 (data.lua)
   1.133 Loading mod base 0.17.14 (data.lua)
   1.862 Loading mod base 0.17.14 (data-updates.lua)
   2.169 Checksum for core: 2126933501
   2.169 Checksum of base: 1281086707
   3.359 Loading sounds...
   3.441 Info PlayerData.cpp:69: Local player-data.json unavailable
   3.441 Info PlayerData.cpp:72: Cloud player-data.json available, timestamp 1552796644
   3.716 Initial atlas bitmap size is 4096
   3.730 Created atlas bitmap 4096x4096 [none]
   3.744 Created atlas bitmap 4096x4096 [none]
   3.752 Created atlas bitmap 4096x4096 [none]
   3.756 Created atlas bitmap 4096x4080 [none]
   3.760 Created atlas bitmap 4096x4048 [none]
   3.764 Created atlas bitmap 4096x4096 [none]
   3.764 Created atlas bitmap 4096x336 [none]
   3.764 Created atlas bitmap 4096x1960 [decal]
   3.765 Created atlas bitmap 4096x3824 [low-object]
   3.765 Created atlas bitmap 4096x2000 [mipmap, linear-minification, linear-magnification, linear-mip-level, no-crop, no-scale]
   3.769 Created atlas bitmap 4096x4064 [terrain, mipmap, linear-minification, linear-mip-level, no-crop]
   3.770 Created atlas bitmap 4096x4080 [terrain, mipmap, linear-minification, linear-mip-level, no-crop]
   3.770 Created atlas bitmap 4096x368 [terrain, mipmap, linear-minification, linear-mip-level, no-crop]
   3.770 Created atlas bitmap 4096x1600 [smoke, mipmap, linear-minification, linear-magnification]
   3.770 Created atlas bitmap 4096x1392 [not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level, no-crop, no-scale]
   3.771 Created atlas bitmap 4096x836 [alpha-mask]
   3.777 Created atlas bitmap 4096x4096 [shadow, linear-magnification, alpha-mask]
   3.783 Created atlas bitmap 4096x4088 [shadow, linear-magnification, alpha-mask]
   3.795 Created atlas bitmap 4096x4096 [shadow, linear-magnification, alpha-mask]
   3.795 Created atlas bitmap 4096x540 [shadow, linear-magnification, alpha-mask]
   3.795 Created atlas bitmap 4096x1296 [shadow, mipmap, linear-magnification, alpha-mask]
   3.862 Created virtual atlas pages 4096x4096x2
   3.872 Texture processor created. GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
   4.533 Parallel Sprite Loader initialized (threads: 1)
  20.819 Sprites loaded
  20.984 Generated mipmaps for atlas of size 4096x3824
  21.114 Generated mipmaps for atlas of size 4096x2000
  21.254 Generated mipmaps for atlas of size 4096x4064
  21.394 Generated mipmaps for atlas of size 4096x4080
  21.524 Generated mipmaps for atlas of size 4096x368
  21.656 Generated mipmaps for atlas of size 4096x1600
  21.726 Generated mipmaps for atlas of size 4096x1392
  21.796 Generated mipmaps for atlas of size 4096x1296
  21.837 Generated mipmaps for virtual atlas of size 4096x8192
  21.844 Custom inputs active: 6
  21.918 Factorio initialised
…
8191.730 Error CrashHandler.cpp:409: Exception Code: c0000005, Address: 0x000000013fb7ebb4
ModuleBase: 0x000000013fa80000, ImageSize: 01616000, RelativeAddress: 000febb4
8191.730 Error CrashHandler.cpp:415: Access Violation: Read at address 0000000000000024
8191.730 Error CrashHandler.cpp:429: Exception Context:
rax=00000000249b0040, rbx=0000000000000000, rcx=0000000000000000,
rdx=000000000f23f1d0, rsi=000000000f23f1d0, rdi=000000000f23f1d0,
rip=000000013fb7ebb4, rsp=000000000f23ef20, rbp=0000000000000000,
 r8=0000000000000004,  r9=000000013fa80000, r10=000000000f23eff0,
r11=00000000249fe7ba, r12=000000000f23f3c8, r13=0000000000000000,
r14=0000000140a5f3b8, r15=0000000140a948b8
8191.730 Crashed in C:\Program Files (x86)\Steam\steamapps\common\Factorio\bin\x64\Factorio.exe (0x000000013fa80000 - 0x0000000141096000)
Factorio crashed. Generating symbolized stacktrace, please wait ...
Here is the backtrace from a dump created with WinDbg at the first-chance (as Factorio kept stealing the focus, I couldn't do analysis in the debugger at the time; additionally, I had only used the `.dump` command which didn't result in the entire address space being saved):

Code: Select all

0:024> kc
Call Site
factorio!ElectricNetwork::save
factorio!ElectricNetworkManager::save
factorio!Map::save
factorio!Scenario::saveMap
factorio!Scenario::saveAs
factorio!ParallelScenarioSaver::doSave
factorio!std::_Invoker_pmf_pointer::_Call
factorio!std::invoke
factorio!std::_LaunchPad<std::unique_ptr<std::tuple<void (__cdecl RouterBase::*)(void),ClientRouter *>,std::default_delete<std::tuple<void (__cdecl RouterBase::*)(void),ClientRouter *> > > >::_Execute
factorio!std::_LaunchPad<std::unique_ptr<std::tuple<void (__cdecl RouterBase::*)(void),ClientRouter *>,std::default_delete<std::tuple<void (__cdecl RouterBase::*)(void),ClientRouter *> > > >::_Run
factorio!std::_LaunchPad<std::unique_ptr<std::tuple<void (__cdecl RouterBase::*)(void),ClientRouter *>,std::default_delete<std::tuple<void (__cdecl RouterBase::*)(void),ClientRouter *> > > >::_Go
factorio!std::_Pad::_Call_func
factorio!invoke_thread_procedure
factorio!thread_start<unsigned int (__cdecl*)(void * __ptr64)>
kernel32!BaseThreadInitThunk
ntdll!RtlUserThreadStart
Most notably, when checking the local variables in the faulting frame, `this` is nullptr:

Code: Select all

0:024> dv
           this = 0x00000000`00000000
         output = 0x00000000`0f23f1d0
     <begin>$L0 = <value unavailable>
 __tagWriter257 = struct Serialiser::TagWriter
Attachments
factorio.dmp
(139.05 KiB) Downloaded 31 times
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.17.14] Crash while saving -- null ElectricNetwork pointer

Post by kovarex »

Hi, thanks for the report, but without a save and a way to reproduce it, there isn't much we could do.
Post Reply

Return to “Pending”