Page 1 of 1

[1.1.87][mac-arm] Crash during --dump-icon-sprites

Posted: Wed Jul 26, 2023 2:57 am
by fserb
Tried to run --dump-icon-sprites with a SE mod, and Factorio crashes.

After a few "Warning! Sprite at XX is defined with 4 mipmap levels, but level 1 is expected to be at YY which is out of bounds", I get:

Code: Select all

  20.943 Error CrashHandler.cpp:641: Received 6
Factorio crashed. Generating symbolized stacktrace, please wait ...
src/Util/StacktraceToStream.cpp (51): walkStackAndPrintToStream
src/Util/StacktraceToStream.cpp (59): printStacktraceToStream
src/Util/Logger.cpp (336): writeStacktrace
src/Util/Logger.cpp (346): logStacktrace
src/Util/CrashHandler.cpp (188): writeStackTrace
src/Util/CrashHandler.cpp (642): commonSignalHandler
src/Util/CrashHandler.cpp (648): SignalHandler
0x1a40e6a23
0x1a40b7c27
0x1a3fc5ae7
abort_message
_ZL28demangling_terminate_handlerv
_ZSt11__terminatePFvvE
_ZN10__cxxabiv1L12failed_throwEPNS_15__cxa_exceptionE
_ZN10__cxxabiv121__isOurExceptionClassEPK17_Unwind_Exception
src/Graphics/LoadingSplashScreen.cpp (302): processWindowEvents
src/Graphics/AtlasSystem.cpp (703): loadSprites
src/Graphics/AtlasSystem.cpp (1555): tryLoadSpritesWithFallbackToMinimalMode
src/Graphics/AtlasSystem.cpp (1741): build
src/GlobalContext.cpp (600): init
src/Main.cpp (936): main
Stack trace logging done
  21.960 Error Util.cpp:100: 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.
  25.695 Error CrashHandler.cpp:611: Unhandled exception type: 27CloseDuringLoadingException
  25.695 Error CrashHandler.cpp:622: Unhandled exception: UNKNOWN
I've attached the whole log below. --dump-data seems to work fine.

The zip with all mods has 900M, so it's a bit hard to share. But I can try to isolate the mod that causes the crash, if the log is not enough.

Re: Crash during --dump-icon-sprites

Posted: Wed Jul 26, 2023 4:14 am
by fserb
I was able to repro this now even without any mods. Just the vanilla base game on Mac.

When I run it, the console just outputs:

Code: Select all

0.000 Initializing Steam API.
0.000 Steam requires game restart, restarting...
the app keeps running, and when I close it, it crashes and this is the log.

Re: [1.1.87][mac-arm] Crash during --dump-icon-sprites

Posted: Wed Jul 26, 2023 12:45 pm
by Rseding91
Thanks for the report. Crashing isn't intended but the issue you're seeing is; steam does not let you just 'launch' steam games without doing it through steam. You'd need to use the standalone version of the game or go into the steam properties to add the command line argument and launch through steam.

Re: [1.1.87][mac-arm] Crash during --dump-icon-sprites

Posted: Wed Jul 26, 2023 1:32 pm
by fserb
That's interesting, because, if I run the binary directly (~/Library/Application\ Support/Steam/steamapps/common/Factorio/factorio.app/Contents/MacOS/factorio) with -h or --dump-data, it works perfectly.

Code: Select all

$ ~/Library/Application\ Support/Steam/steamapps/common/Factorio/factorio.app/Contents/MacOS/factorio --dump-data            
   0.000 2023-07-26 09:29:49; Factorio 1.1.87 (build 61545, mac-arm64, steam)
   0.002 Operating system: OS X 13.4.1
   0.002 Program arguments: "/Users/fserb/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/MacOS/factorio" "--dump-data" 
   0.002 Config path: /Users/fserb/Library/Application Support/factorio/config/config.ini
   0.002 Read data path: /Users/fserb/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/data
   0.002 Write data path: /Users/fserb/Library/Application Support/factorio [119711/1902788MB]
   0.002 Binaries path: /Users/fserb/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents
   0.045 System info: [CPU: arm64, 10 cores, RAM: 32768 MB]
   0.045 Running in headless mode
   0.219 Loading mod core 0.0.0 (data.lua)
   0.233 Loading mod base 1.1.87 (data.lua)
   0.327 Loading mod base 1.1.87 (data-updates.lua)
   0.371 Checksum for core: 1996978587
   0.371 Checksum of base: 4153197346
   0.451 Prototype list checksum: 3034860339
   0.833 Info PlayerData.cpp:78: Local player-data.json unavailable
   0.833 Info PlayerData.cpp:83: Cloud player-data.json unavailable
   0.833 Factorio initialised
   0.847 Goodbye
vs

Code: Select all

~/Library/Application\ Support/Steam/steamapps/common/Factorio/factorio.app/Contents/MacOS/factorio --dump-icon-sprites 
   0.000 Initializing Steam API.
   0.000 Steam requires game restart, restarting...
I'm guessing there's something that triggers the Steam API initialization with --dump-icon-sprites.

But do you mean that the crash is not related?

Re: [1.1.87][mac-arm] Crash during --dump-icon-sprites

Posted: Wed Jul 26, 2023 1:35 pm
by fserb
I tried to run within steam flags, and it did finish correctly. :)