[2.0.13][macOS] Crash on loading saved game with solar panels

Things that has been reported already before.
metacollin
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Nov 01, 2024 5:19 pm
Contact:

[2.0.13][macOS] Crash on loading saved game with solar panels

Post by metacollin »

Code: Select all

   0.000 2024-11-01 11:09:34; Factorio 2.0.13 (build 79912, mac-x64, steam, space-age)
   0.000 Operating system: macOS 14.2.1
   0.000 Initializing Steam API.
   0.000 Program arguments: "/Users/metacollin/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/MacOS/factorio" "–dxgi-blit-model" 
   0.000 Config path: /Users/metacollin/Library/Application Support/factorio/config/config.ini
   0.000 Read data path: /Users/metacollin/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/data
   0.000 Write data path: /Users/metacollin/Library/Application Support/factorio [42689/1907529MB]
   0.000 Binaries path: /Users/metacollin/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents
   0.091 System info: [CPU: Intel(R) Xeon(R) Platinum 8260M CPU @ 2.30GHz, 48 cores, RAM: 196608 MB]
   0.410 Display options: [FullScreen: false] [VSync: true] [UIScale: manual-pixels (150.0%)] [Native DPI: true] [Screen: 255] [Special: lmW] [Lang: en]
   0.655 Video driver: cocoa
   0.655 Available displays: 1
   0.655  [0]: LG HDR 4K - {[0,0], 3840x2160, SDL_PIXELFORMAT_ARGB8888, 60Hz, 0x1b5d2350(0x01)}
   0.689 Initialised OpenGL:[0] AMD Radeon Pro W5500 OpenGL Engine; driver: 4.1 ATI-5.2.4
   0.689   [Extensions] s3tc:yes; KHR_debug:NO; ARB_clear_texture:NO, ARB_copy_image:NO, ARB_pipeline_statistics_query:NO, ARB_gl_spirv:NO, ARB_ES2_compatibility:yes
   0.689   [Version] 4.1
   0.689 Graphics settings preset: very-high
   0.689   Dedicated video memory size 8176 MB (detected from AMD Radeon Pro W5500 Compute Engine; VendorID: 0x1021e00)
   0.701 Graphics options: [Graphics quality: high] [Video memory usage: all] [DXT: high-quality]
   0.701                   [Max threads (load/render): 32/32] [Max texture size: 0] [Tex.Stream.: false] [Rotation quality: normal] [Other: STDCWTl] [B:0,C:0,S:100]
   0.887 [Audio] Driver:coreaudio, Device:Default device, Depth:16, Channels:2, Frequency:44100
   1.099 Joystick device connected: instance: 0, 3Dconnexion CadMouse Pro
   1.751 Info ModManager.cpp:434: FeatureFlag expansion-shaders = true
   1.751 Info ModManager.cpp:434: FeatureFlag freezing = true
   1.751 Info ModManager.cpp:434: FeatureFlag quality = true
   1.751 Info ModManager.cpp:434: FeatureFlag rail-bridges = true
   1.751 Info ModManager.cpp:434: FeatureFlag segmented-units = true
   1.751 Info ModManager.cpp:434: FeatureFlag space-travel = true
   1.751 Info ModManager.cpp:434: FeatureFlag spoiling = true
   1.756 Loading mod core 0.0.0 (data.lua)
   1.783 Loading mod base 2.0.13 (data.lua)
   1.982 Loading mod elevated-rails 2.0.13 (data.lua)
   2.018 Loading mod quality 2.0.13 (data.lua)
   2.036 Loading mod space-age 2.0.13 (data.lua)
   2.418 Loading mod base 2.0.13 (data-updates.lua)
   2.433 Loading mod quality 2.0.13 (data-updates.lua)
   2.506 Loading mod space-age 2.0.13 (data-updates.lua)
   2.656 Checksum for core: 3480657504
   2.656 Checksum of base: 2691306720
   2.656 Checksum of elevated-rails: 2288905443
   2.656 Checksum of quality: 4264147466
   2.656 Checksum of space-age: 542481865
   3.195 Prototype list checksum: 124222065
   3.283 Loading sounds...
   3.896 Info PlayerData.cpp:68: Local player-data.json unavailable
   3.896 Info PlayerData.cpp:71: Cloud player-data.json available, timestamp 1730448551
   4.370 Initial atlas bitmap size is 16384
   4.387 Created an atlas bitmap (size 16384x16380) [none]
   4.409 Created an atlas bitmap (size 16384x16384) [none]
   4.436 Created an atlas bitmap (size 16384x16372) [none]
   4.436 Created an atlas bitmap (size 16384x15440) [none]
   4.436 Created an atlas bitmap (size 16384x8376) [decal]
   4.441 Created an atlas bitmap (size 16384x16384) [low-object]
   4.441 Created an atlas bitmap (size 4096x1088) [low-object]
   4.442 Created an atlas bitmap (size 16384x13472) [corpse-decay]
   4.442 Created an atlas bitmap (size 16384x5580) [none]
   4.442 Created an atlas bitmap (size 1676x79) [not-compressed]
   4.442 Created an atlas bitmap (size 8192x6112) [mipmap, linear-minification, linear-magnification, linear-mip-level]
   4.450 Created an atlas bitmap (size 16384x16320) [terrain, mipmap, linear-minification, linear-mip-level]
   4.451 Created an atlas bitmap (size 16384x4832) [terrain, mipmap, linear-minification, linear-mip-level]
   4.451 Created an atlas bitmap (size 8192x3872) [terrain-effect-map, mipmap, linear-minification, linear-mip-level]
   4.451 Created an atlas bitmap (size 4096x3088) [smoke, mipmap, linear-minification, linear-magnification]
   4.451 Created an atlas bitmap (size 8192x2576) [mipmap]
   4.451 Created an atlas bitmap (size 2048x1520) [mipmap]
   4.451 Created an atlas bitmap (size 4096x3152) [mipmap]
   4.451 Created an atlas bitmap (size 4096x3152) [mipmap]
   4.451 Created an atlas bitmap (size 4096x3152) [mipmap]
   4.451 Created an atlas bitmap (size 8192x3792) [icon, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level]
   4.452 Created an atlas bitmap (size 16384x6120) [alpha-mask]
   4.476 Created an atlas bitmap (size 16384x16384) [shadow, linear-magnification, alpha-mask]
   4.483 Created an atlas bitmap (size 16384x16384) [shadow, linear-magnification, alpha-mask]
   4.483 Created an atlas bitmap (size 16384x8376) [shadow, linear-magnification, alpha-mask]
   4.483 Created an atlas bitmap (size 8192x2336) [shadow, mipmap, linear-magnification, alpha-mask]
   4.483 Created an atlas bitmap (size 2048x496) [icon-background, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level, ]
   4.483 Loading 3D bitmaps.
   4.608 Texture processor created (2048). GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
   4.620 Parallel sprite loader initialized (threads: 32, bitmaps: 8227)
  34.487 Sprites loaded
  34.702 Generated mipmaps (4) for atlas [5] of size 16384x16384   
  34.712 Generated mipmaps (4) for atlas [6] of size 4096x1088   
  34.748 Generated mipmaps (3) for atlas [10] of size 8192x6112   
  34.821 Generated mipmaps (3) for atlas [11] of size 16384x16320   
  34.850 Generated mipmaps (3) for atlas [12] of size 16384x4832   
  34.860 Generated mipmaps (3) for atlas [13] of size 8192x3872   
  34.867 Generated mipmaps (3) for atlas [14] of size 4096x3088   
  34.940 Generated mipmaps (3) for atlas [15] of size 8192x2576   
  34.946 Generated mipmaps (3) for atlas [16] of size 2048x1520   
  34.954 Generated mipmaps (3) for atlas [17] of size 4096x3152   
  34.983 Generated mipmaps (3) for atlas [18] of size 4096x3152   
  34.990 Generated mipmaps (3) for atlas [19] of size 4096x3152   
  35.122 Generated mipmaps (5) for atlas [20] of size 8192x3792   
  35.138 Generated mipmaps (3) for atlas [25] of size 8192x2336   
  35.154 Custom mipmaps uploaded (3203)
  35.187 Video memory usage: 3556.75 MB (Atlases: 3426.45 MB, Textures: 130.30 MB)
  35.320 Factorio initialised
  35.343 Steam Storage Quota: 22653/23841
 150.241 Loading map /Users/metacollin/Library/Application Support/factorio/saves/_autosave2.zip: 5709910 bytes.
 150.271 Loading level.dat: 10868037 bytes.
 150.274 Info Scenario.cpp:178: Map version 2.0.11-3
 150.622 Loading blueprint storage: Local timestamp -1, Cloud timestamp -1
 150.622 Blueprint storage "blueprint-storage-2.dat" was not found, trying to load previous version storage "blueprint-storage.dat"
 150.622 Loading blueprint storage: Local timestamp 1657773574, Cloud timestamp 1657773573
 150.771 Loading script.dat: 1222 bytes.
 150.776 Checksum for script __level__/control.lua: 2463946943
 150.831 Error CrashHandler.cpp:641: Received SIGSEGV
Factorio crashed. Generating symbolized stacktrace, please wait ...
src/Util/StacktraceToStream.cpp (52): walkStackAndPrintToStream
src/Util/StacktraceToStream.cpp (60): printStacktraceToStream
src/Util/Logger.cpp (334): writeStacktrace
src/Util/Logger.cpp (379): logStacktrace
src/Util/CrashHandler.cpp (183): writeStackTrace
src/Util/CrashHandler.cpp (644): commonSignalHandler
src/Util/CrashHandler.cpp (652): SignalHandler
0x7ff809a9d37c
libraries/trio/trio.c (3494): TrioWriteDouble
libraries/trio/trio.c (3919): TrioFormatProcess
libraries/trio/trio.c (3994): TrioFormat
libraries/trio/trio.c (4655): trio_vsnprintf
libraries/CommonUtil/StringUtil.cpp (0): ssprintf
/usr/local/opt/llvm@16/bin/../include/c++/v1/string (1682): __is_long
/usr/local/opt/llvm@16/bin/../include/c++/v1/string (2361): ~basic_string
/usr/local/opt/llvm@16/bin/../include/c++/v1/string (2359): ~basic_string
src/Util/StringUtil.cpp (66): shortNumberFormat
src/Energy/Energy.cpp (124): str
/usr/local/opt/llvm@16/bin/../include/c++/v1/string (1682): __is_long
/usr/local/opt/llvm@16/bin/../include/c++/v1/string (1803): __get_pointer
/usr/local/opt/llvm@16/bin/../include/c++/v1/string (1462): data
/usr/local/opt/llvm@16/bin/../include/c++/v1/string (1460): c_str
src/Entity/SolarPanel.cpp (67): addToDescription
src/Gui/SelectedInfo.cpp (117): addToDescription
src/Gui/SelectedInfo.cpp (42): update
src/Graphics/SelectedInfoRenderer.cpp (34): update
src/GameView.cpp (0): update
src/Game.cpp (323): prepareRender
src/MainLoop.cpp (0): prepare
src/MainLoop.cpp (0): mainLoopStep
src/MainLoop.cpp (412): run
src/Main.cpp (1348): fmain
src/Main.cpp (1377): main
0x7ff8096e4386
Stack trace logging done
 154.314 Error CrashHandler.cpp:190: Map tick at moment of crash: 3060001
 154.314 Uploading log file
 154.724 Info SystemUtil.cpp:871: Started /Users/metacollin/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/MacOS/factorio; trampoline PID: 2188
 154.725 Error Util.cpp:95: 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.
Occurs every time, happened shortly after I built solar panels for the first time and then tried to load the game later.

Here is a copy of the save file:
_autosave3.zip
(5.32 MiB) Downloaded 6 times


metacollin
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Nov 01, 2024 5:19 pm
Contact:

Re: [2.0.13][macOS] Crash on loading saved game with solar panels

Post by metacollin »

I don't think this is an issue with having an AMD GPU, those known issues are specific to windows/DirectX (D3D) drivers and not Apple's AMD drivers for macOS. Besides which, the crash occurs when trying to write a double using an XML library, so I don't see how a graphics issue could be involved.

Actually, confirmed: I found the culprit.

Not sure why they did this, but libc++ is linked via an @rpath (runtime path) which lets you change the path of a dylib at runtime using an environment variable ($LC_RPATH). I don't know how or why, but it was deciding to link to a random version of libc++ included with LLVM16 which I had installed ages ago on my system. This can be seen in the crash log.

Code: Select all

src/Util/StringUtil.cpp (66): shortNumberFormat
src/Energy/Energy.cpp (124): str
/usr/local/opt/llvm@16/bin/../include/c++/v1/string (1682): __is_long
/usr/local/opt/llvm@16/bin/../include/c++/v1/string (1803): __get_pointer
/usr/local/opt/llvm@16/bin/../include/c++/v1/string (1462): data
/usr/local/opt/llvm@16/bin/../include/c++/v1/string (1460): c_str
I relinked the factorio binary to the default library that lives in the dyld cache (which can be linked simply with the default path, /usr/lib/libc++.dylib

This made it crash in a new but less exciting way, complaining about the space ' ' in the path to Factorio's save files. Also strange.

So I just linked it to a more recent version of LLVM's libc++, the one from LLVM19 and the problem went away completely:

Code: Select all

install_name_tool -change @rpath/libc++.1.dylib /usr/local/Cellar/llvm/19.1.1/lib/c++/libc++.1.dylib /Users/$USER/Library/Application\ Support/Steam/steamapps/common/Factorio/factorio.app/Contents/MacOS/factorio
This is not a real fix, just a workaround. It might be worth double checking what the linker situation is for the macOS version of Factorio - it seems to be linking to things it shouldn't be depending on what is on a user's computer, which will cause weirdness like this albeit probably for just a handful of users.

Post Reply

Return to “Duplicates”