Page 1 of 1

[0.17.16]Loading Scenario Crashs Game

Posted: Wed Mar 20, 2019 6:58 pm
by Muppet9010
Loading the attached scenario for a SP game crashes the game.
The scenario has a known issue of not being MP save/load safe.

I obtained the scenario by joining another player who was hosting it. On joining I got the unsafe for MP error and then tried to load the scenario locally for an SP game myself.

Code: Select all

   0.001 2019-03-20 18:49:19; Factorio 0.17.16 (build 43906, win64, steam)
   0.001 Operating system: Windows 10 (version 1803) 
   0.001 Program arguments: "D:\Applications\Steam\steamapps\common\Factorio\bin\x64\Factorio.exe" 
   0.001 Read data path: C:/Symbolic Linked Folders/Steam Factorio/data
   0.001 Write data path: C:/Users/mike/AppData/Roaming/Factorio [54288/243241MB]
   0.001 Binaries path: C:/Symbolic Linked Folders/Steam Factorio/bin
   0.060 System info: [CPU: Intel(R) Pentium(R) CPU G3258 @ 3.20GHz, 2 cores, RAM: 4158/8127 MB, page: 6179/16319 MB, virtual: 4326/134217727 MB, extended virtual: 0 MB]
   0.061 Display options: [FullScreen: 1] [VSync: 1] [UIScale: automatic (100.0%)] [Native DPI: 1] [Screen: 255] [Special: 00] [Lang: en]
   0.082 Available displays: 2
   0.082  [0]: \\.\DISPLAY1 - AMD Radeon R9 200 Series {0x8080005, [0,0], 1920x1080, 32bit, 59Hz}
   0.088  [1]: \\.\DISPLAY2 - AMD Radeon R9 200 Series {0x80001, [-1920,0], 1920x1080, 32bit, 60Hz}
   0.223 [Direct3D11] Display: 0, Output: 0, DisplayAdapter: 0, RenderingAdapter: 0; d3dcompiler_47.dll
   0.344 Initialised Direct3D[0]: AMD Radeon R9 200 Series; id: 1002-6810; driver: aticfx64.dll 23.20.15002.11
   0.344   D3D Feature Level: 11.1, DXGI 1.5+, SwapChain: 1,discard,-,-,none
   0.344   [Local Video Memory] Budget: 1723MB, CurrentUsage: 0MB, Reservation: 0/912MB
   0.344   [Non-Local Vid.Mem.] Budget: 3657MB, CurrentUsage: 0MB, Reservation: 0/1930MB
   0.344   Tiled resources: Tier 1
   0.344   Unified Memory Architecture: No
   0.344   BGR 565 Supported: Yes
   0.344   MaximumFrameLatency: 3, GPUThreadPriority: 0
   0.521 Desktop composition is active.
   0.521 Graphics settings preset: very-high
   0.521   Dedicated video memory size 2028 MB
   0.521 Graphics options: [Graphics quality: high] [Video memory usage: all] [Light scale: 100%] [DXT: high-quality]
   0.521                   [Max load threads: 32] [Max texture size: 0] [Tex.Stream.: 0] [Rotation quality: normal] [Color: 32bit]
   0.613 DSound: Starting _dsound_update thread
   0.614 DSound: Enter _dsound_update; tid=2188
   1.116 Loading mod core 0.0.0 (data.lua)
   1.486 Loading mod base 0.17.16 (data.lua)
   3.172 Loading mod base 0.17.16 (data-updates.lua)
   3.564 Checksum for core: 2126933501
   3.564 Checksum of base: 1967292039
   5.155 Loading sounds...
  13.941 Info PlayerData.cpp:69: Local player-data.json unavailable
  13.941 Info PlayerData.cpp:72: Cloud player-data.json available, timestamp 1553037474
  14.806 Crop bitmaps.
  14.806 Atlases were not loaded from disk cache.
  35.702 Parallel Sprite Loader initialized (threads: 1)
  87.622 Initial atlas bitmap size is 16384
  87.681 Created atlas bitmap 16384x16376 [none]
  87.688 Created atlas bitmap 16384x11296 [none]
  87.689 Created atlas bitmap 16384x2116 [decal]
  87.690 Created atlas bitmap 16384x3808 [low-object]
  87.691 Created atlas bitmap 16384x1888 [mipmap, linear-minification, linear-magnification, linear-mip-level, no-crop, no-scale]
  87.698 Created atlas bitmap 16384x6880 [terrain, mipmap, linear-minification, linear-mip-level, no-crop]
  87.698 Created atlas bitmap 16384x480 [smoke, mipmap, linear-minification, linear-magnification]
  87.699 Created atlas bitmap 16384x456 [not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level, no-crop, no-scale]
  87.699 Created atlas bitmap 16384x748 [alpha-mask]
  87.702 Created atlas bitmap 16384x12644 [shadow, linear-magnification, alpha-mask]
  87.702 Created atlas bitmap 16384x1264 [shadow, mipmap, linear-magnification, alpha-mask]
  87.707 Atlases were not loaded from disk cache.
  87.719 Texture processor created. GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
  89.022 Parallel Sprite Loader initialized (threads: 1)
 134.858 Sprites loaded
 140.102 Sprite atlas cached.
 140.378 Generated mipmaps for atlas of size 16384x3808
 140.466 Generated mipmaps for atlas of size 16384x1888
 140.510 Generated mipmaps for atlas of size 16384x6880
 140.543 Generated mipmaps for atlas of size 16384x480
 140.568 Generated mipmaps for atlas of size 16384x456
 140.581 Generated mipmaps for atlas of size 16384x1264
 140.610 Custom inputs active: 6
 140.812 Factorio initialised
 140.869 Game is running on selected version branch on Steam.
 148.865 Info UDPSocket.cpp:27: Opening socket at (IP ADDR:({0.0.0.0:0}))
 158.073 Info UDPSocket.cpp:210: Closing socket
 158.073 Info UDPSocket.cpp:240: Socket closed
 158.073 Info UDPSocket.cpp:210: Closing socket
 158.075 Joining game IP ADDR:({46.231.78.232:34197})
 158.075 Info UDPSocket.cpp:33: Opening socket
 158.075 Info ClientMultiplayerManager.cpp:572: UpdateTick(4294967295) changing state from(Ready) to(Connecting)
 158.287 Info UnparsedNetworkMessage.cpp:91: Invalid packet (type ConnectionRequestReply) received from IP ADDR:({46.231.78.232:34197}): invalid state (WaitingForAccept) for packet type
 158.340 Connection refused
 158.343 Info ClientMultiplayerManager.cpp:189: Quitting multiplayer connection.
 158.343 Info ClientMultiplayerManager.cpp:572: UpdateTick(4294967295) changing state from(Connecting) to(Disconnected)
 158.343 Info HttpSharedState.cpp:54: Downloading https://auth.factorio.com/generate-user-server-key-2
 158.868 Info AuthServerConnector.cpp:139: Received key(k5rsPGrTMYCgyPiSjmKZNw==) for username(muppet9010) from auth server.
 158.869 Info UDPSocket.cpp:210: Closing socket
 158.869 Info UDPSocket.cpp:240: Socket closed
 158.869 Joining game IP ADDR:({46.231.78.232:34197})
 158.869 Info UDPSocket.cpp:33: Opening socket
 158.870 Info ClientMultiplayerManager.cpp:572: UpdateTick(4294967295) changing state from(Ready) to(Connecting)
 159.053 Info UnparsedNetworkMessage.cpp:91: Invalid packet (type ConnectionRequestReply) received from IP ADDR:({46.231.78.232:34197}): invalid state (WaitingForAccept) for packet type
 159.053 Info UnparsedNetworkMessage.cpp:91: Invalid packet (type ConnectionRequestReply) received from IP ADDR:({46.231.78.232:34197}): invalid state (WaitingForAccept) for packet type
 159.053 Info UnparsedNetworkMessage.cpp:91: Invalid packet (type ConnectionRequestReply) received from IP ADDR:({46.231.78.232:34197}): invalid state (WaitingForAccept) for packet type
 159.053 Info UnparsedNetworkMessage.cpp:91: Invalid packet (type ConnectionRequestReply) received from IP ADDR:({46.231.78.232:34197}): invalid state (WaitingForAccept) for packet type
 159.053 Info UnparsedNetworkMessage.cpp:91: Invalid packet (type ConnectionRequestReply) received from IP ADDR:({46.231.78.232:34197}): invalid state (WaitingForAccept) for packet type
 159.053 Info UnparsedNetworkMessage.cpp:91: Invalid packet (type ConnectionRequestReply) received from IP ADDR:({46.231.78.232:34197}): invalid state (WaitingForAccept) for packet type
 159.053 Info UnparsedNetworkMessage.cpp:91: Invalid packet (type ConnectionRequestReply) received from IP ADDR:({46.231.78.232:34197}): invalid state (WaitingForAccept) for packet type
 159.153 Info ClientSynchronizer.cpp:35: Initialized Synchronizer local peer(1) latency(32).
 159.153 Info ClientMultiplayerManager.cpp:572: UpdateTick(4294967295) changing state from(Connecting) to(ConnectedWaitingForMap)
 159.153 Info ClientRouter.cpp:224: ConnectionAccepted
 159.987 Info ClientMultiplayerManager.cpp:744: Received mapReadyForDownload
 159.987 Downloading file C:\Users\mike\AppData\Roaming\Factorio\temp\mp-download.zip (6278542 B, 12483 blocks)
 159.991 Info ClientMultiplayerManager.cpp:572: UpdateTick(4294967295) changing state from(ConnectedWaitingForMap) to(ConnectedDownloadingMap)
 164.468 Finished download (4 s, 6.2 MB, 1.4 MB/s)
 164.492 Info ClientMultiplayerManager.cpp:724: updateTick(4294967295) map download finished creating scenario
 164.500 Info ClientMultiplayerManager.cpp:572: UpdateTick(4294967295) changing state from(ConnectedDownloadingMap) to(ConnectedLoadingMap)
 164.501 Loading map C:\Users\mike\AppData\Roaming\Factorio\temp\mp-download.zip: 6278542 bytes.
 173.563 Loading level.dat: 10127776 bytes.
 173.570 Info Scenario.cpp:161: Map version 0.17.16-0
 173.863 Loading script.dat: 311227 bytes.
 174.582 Checksum for script C:/Users/mike/AppData/Roaming/Factorio/temp/currently-playing/control.lua: 306280461
 178.506 Error ClientMultiplayerManager.cpp:1206: level was registered for the following commands when the map was saved but has not registered for any commands as a result of loading: community
 178.508 Error ClientMultiplayerManager.cpp:96: MultiplayerManager failed: "" + multiplayer.script-command-mismatch + "
" + "
level"
 178.508 Info ClientMultiplayerManager.cpp:572: UpdateTick(19128) changing state from(ConnectedLoadingMap) to(Failed)
 265.846 Info ClientMultiplayerManager.cpp:189: Quitting multiplayer connection.
 265.846 Info ClientMultiplayerManager.cpp:572: UpdateTick(19128) changing state from(Failed) to(Disconnected)
 266.271 Info UDPSocket.cpp:210: Closing socket
 266.271 Info UDPSocket.cpp:240: Socket closed
 283.029 Loading level.dat: 1081358 bytes.
 283.031 Info Scenario.cpp:161: Map version 0.17.16-0
 283.036 Info PrototypeMigrationList.cpp:60: Activating migration base/2017-12-03_Factorio_0.16.0.json
 283.036 Info PrototypeMigrationList.cpp:60: Activating migration base/2018-05-22_Factorio_0.17.0.json
 283.036 Info PrototypeMigrationList.cpp:60: Activating migration base/2018-06-12_Factorio_0.17.0.json
 283.037 Info PrototypeMigrationList.cpp:60: Activating migration base/2018-12-21_Factorio_0.17.0.json
 283.037 Info PrototypeMigrationList.cpp:60: Activating migration base/2018-12-27_Factorio_0.17.0.json
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\cygwin64\tmp\factorio-build-cuunb3\libraries\stackwalker\stackwalker.cpp (924): StackWalker::ShowCallstack
c:\cygwin64\tmp\factorio-build-cuunb3\src\util\logger.cpp (376): Logger::writeStacktrace
c:\cygwin64\tmp\factorio-build-cuunb3\src\util\logger.cpp (527): Logger::logStacktrace
c:\cygwin64\tmp\factorio-build-cuunb3\src\util\logging.cpp (89): Logging::logAndAbortOrThrow
c:\cygwin64\tmp\factorio-build-cuunb3\src\util\logging.cpp (83): Logging::logAndAbortOrThrow
c:\cygwin64\tmp\factorio-build-cuunb3\src\fluid\fluidsystem.cpp (52): FluidSystem::~FluidSystem
f:\dd\vctools\crt\vcruntime\src\eh\amd64\handlers.asm (50): _CallSettingFrame
f:\dd\vctools\crt\vcruntime\src\eh\frame.cpp (1210): __FrameHandler3::FrameUnwindToState
f:\dd\vctools\crt\vcruntime\src\eh\risctrnsctrl.cpp (246): __FrameHandler3::FrameUnwindToEmptyState
f:\dd\vctools\crt\vcruntime\src\eh\frame.cpp (318): __InternalCxxFrameHandler<__FrameHandler3>
f:\dd\vctools\crt\vcruntime\src\eh\risctrnsctrl.cpp (272): __CxxFrameHandler3
f:\dd\vctools\crt\vcstartup\src\gs\amd64\gshandlereh.cpp (181): __GSHandlerCheck_EH
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFCF0FDF85D)
00007FFCF0FDF85D (ntdll): (filename not available): _chkstk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFCF0F4E240)
00007FFCF0F4E240 (ntdll): (filename not available): RtlUnwindEx
f:\dd\vctools\crt\vcruntime\src\eh\risctrnsctrl.cpp (744): __FrameHandler3::UnwindNestedFrames
f:\dd\vctools\crt\vcruntime\src\eh\frame.cpp (1367): CatchIt<__FrameHandler3>
f:\dd\vctools\crt\vcruntime\src\eh\frame.cpp (627): FindHandler<__FrameHandler3>
f:\dd\vctools\crt\vcruntime\src\eh\frame.cpp (367): __InternalCxxFrameHandler<__FrameHandler3>
f:\dd\vctools\crt\vcruntime\src\eh\risctrnsctrl.cpp (272): __CxxFrameHandler3
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFCF0FDF7DD)
00007FFCF0FDF7DD (ntdll): (filename not available): _chkstk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFCF0F4D856)
00007FFCF0F4D856 (ntdll): (filename not available): RtlWalkFrameChain
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFCF0F4BE9A)
00007FFCF0F4BE9A (ntdll): (filename not available): RtlRaiseException
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFCEE08A388)
00007FFCEE08A388 (KERNELBASE): (filename not available): RaiseException
f:\dd\vctools\crt\vcruntime\src\eh\throw.cpp (133): _CxxThrowException
c:\cygwin64\tmp\factorio-build-cuunb3\src\fluid\fluidbox.cpp (27): FluidBox::PipeConnection::PipeConnection
c:\cygwin64\tmp\factorio-build-cuunb3\src\fluid\fluidbox.cpp (473): FluidBox::FluidBox
c:\cygwin64\tmp\factorio-build-cuunb3\src\fluid\fluidsystem.cpp (36): FluidSystem::FluidSystem
c:\cygwin64\tmp\factorio-build-cuunb3\src\map\map.cpp (560): Map::loadData
c:\cygwin64\tmp\factorio-build-cuunb3\src\map\map.cpp (292): Map::load
c:\cygwin64\tmp\factorio-build-cuunb3\src\scenario\scenario.cpp (199): Scenario::loadFactory
c:\cygwin64\tmp\factorio-build-cuunb3\src\appmanager.cpp (596): AppManager::createGame
c:\cygwin64\tmp\factorio-build-cuunb3\src\appmanagerstates.cpp (812): InNewGameFromScenarioDialog::process
c:\cygwin64\tmp\factorio-build-cuunb3\src\appmanager.cpp (217): AppManager::process
c:\cygwin64\tmp\factorio-build-cuunb3\src\mainloop.cpp (471): MainLoop::prePrepare
c:\cygwin64\tmp\factorio-build-cuunb3\src\mainloop.cpp (572): MainLoop::mainLoopStep
c:\cygwin64\tmp\factorio-build-cuunb3\src\mainloop.cpp (364): MainLoop::run
c:\cygwin64\tmp\factorio-build-cuunb3\src\main.cpp (1246): wmain
f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl (288): __scrt_common_main_seh
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFCF0CB3DC4)
00007FFCF0CB3DC4 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFCF0FB3691)
00007FFCF0FB3691 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
 287.051 Error FluidSystem.cpp:52: this->fluidBoxes.empty() was not true
Logger::writeStacktrace skipped.
 287.052 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.
 327.837 Uploading log file
 327.855 Error CrashHandler.cpp:197: Heap validation: success.
 327.858 Creating crash dump.
 328.326 CrashDump success

Re: [0.17.16]Loading Scenario Crashs Game

Posted: Wed Mar 20, 2019 8:41 pm
by Rseding91
The blueprint.zip file in the scenario is invalid (bad data) almost immediately when loading it.

Do you have the working version of this scenario?

Re: [0.17.16]Loading Scenario Crashs Game

Posted: Wed Mar 20, 2019 10:39 pm
by Muppet9010
There is no blueprint data in the origional scenario (attached). When you load the scenario the map generation options are shown.
Although the scenario code replaces the map generation options automatically.


Should add that we are not the original creators of the scenario. We were just modifying it slightly for a local gam when this error was discovered.

Re: [0.17.16]Loading Scenario Crashs Game

Posted: Thu Mar 21, 2019 10:22 am
by wellczech
I think it crashes because I register custom command in wrong way in the file community_whitelist.lua. Now I do it based on on_player_joined_game event.

Re: [0.17.16]Loading Scenario Crashs Game

Posted: Fri Mar 22, 2019 12:12 pm
by Rseding91
Ok, I've fixed the problem for the next version of 0.17: the reason it was crashing is it would error at some point while loading because the file was invalid and I fixed the file getting invalid.

You'll need to delete the local scenario blueprint.zip file once the fix is out.