[StrangePan] [1.1.101] Hang after switching macOS user

User avatar
SupplyDepoo
Filter Inserter
Filter Inserter
Posts: 305
Joined: Sat Oct 29, 2016 8:42 pm
Contact:

[StrangePan] [1.1.101] Hang after switching macOS user

Post by SupplyDepoo »

Summary: The game freezes (showing the spinning color wheel as the cursor) after temporarily switching to another user account, and can only be force-quit.

Reproduction steps:
  1. Launch Factorio.
  2. Switch to another user.
  3. Switch back again.
  4. Factorio has stopped responding. Menu simulation and gameplay stopped, but music and some sound effects still play.
Factorio version: 1.1.101 (Steam)

Operating System: macOS Sonoma 14.2.1

Log:

Code: Select all

   0.000 2024-01-27 17:02:26; Factorio 1.1.101 (build 62011, mac-arm64, steam)
   0.000 Operating system: OS X 14.2.1
   0.000 Initializing Steam API.
   0.000 Program arguments: "/Users/game/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/MacOS/factorio" 
   0.000 Config path: /Users/game/Library/Application Support/factorio/config/config.ini
   0.000 Read data path: /Users/game/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/data
   0.000 Write data path: /Users/game/Library/Application Support/factorio [231812/471482MB]
   0.000 Binaries path: /Users/game/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents
   0.052 System info: [CPU: arm64, 8 cores, RAM: 16384 MB]
   0.052 Display options: [FullScreen: 0] [VSync: 1] [UIScale: custom (100.0%)] [Native DPI: 0] [Screen: 255] [Special: lmW] [Lang: en]
   0.222 Video driver: cocoa
   0.222 Available displays: 1
   0.222  [0]: 0 - {[0,0], 1680x1050, SDL_PIXELFORMAT_ARGB8888, 60Hz, 0x0001(0x01)}
   0.242 Initialised OpenGL:[0] Apple M1; driver: 4.1 Metal - 88
   0.242   [Extensions] s3tc:yes; KHR_debug:NO; ARB_clear_texture:NO, ARB_copy_image:NO
   0.242   [Version] 4.1
   0.242 Graphics settings preset: very-high
   0.242   Dedicated video memory size 10922 MB (detected from Apple M1; VendorID: 0x1027f00)
   0.305 Graphics options: [Graphics quality: high] [Video memory usage: all] [DXT: high-quality] [Color: 32bit]
   0.305                   [Max threads (load/render): 32/8] [Max texture size: 0] [Tex.Stream.: 0] [Rotation quality: normal] [Other: STDCWT] [B:0,C:0,S:100]
   0.434 [Audio] Backend:SDL(default); Driver:coreaudio, Device:Default device, Depth:16, Channels:2, Frequency:44100
   0.882 Loading mod settings blueprint_flip_and_turn 101.8.6 (settings.lua)
   0.883 Loading mod core 0.0.0 (data.lua)
   0.922 Loading mod base 1.1.101 (data.lua)
   1.029 Loading mod blueprint_flip_and_turn 101.8.6 (data.lua)
   1.041 Loading mod rail-flip 0.0.1 (data.lua)
   1.051 Loading mod base 1.1.101 (data-updates.lua)
   1.103 Checksum for core: 905122912
   1.103 Checksum of base: 1054619811
   1.103 Checksum of blueprint_flip_and_turn: 1320428747
   1.103 Checksum of rail-flip: 1130860799
   1.200 Prototype list checksum: 3040085481
   1.225 Loading sounds...
   1.643 Info PlayerData.cpp:78: Local player-data.json unavailable
   1.643 Info PlayerData.cpp:81: Cloud player-data.json available, timestamp 1706374937
   1.763 Initial atlas bitmap size is 16384
   1.774 Created atlas bitmap 16384x16384 [none]
   1.775 Created atlas bitmap 16384x13060 [none]
   1.775 Created atlas bitmap 8192x4208 [decal]
   1.775 Created atlas bitmap 16384x5568 [low-object]
   1.775 Created atlas bitmap 8192x4432 [mipmap, linear-minification, linear-magnification, linear-mip-level]
   1.776 Created atlas bitmap 16384x6064 [terrain, mipmap, linear-minification, linear-mip-level]
   1.776 Created atlas bitmap 4096x3216 [terrain-effect-map, mipmap, linear-minification, linear-mip-level]
   1.776 Created atlas bitmap 4096x1840 [smoke, mipmap, linear-minification, linear-magnification]
   1.776 Created atlas bitmap 4096x3104 [mipmap]
   1.776 Created atlas bitmap 8192x2288 [icon, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level]
   1.776 Created atlas bitmap 8192x1496 [alpha-mask]
   1.777 Created atlas bitmap 16384x14780 [shadow, linear-magnification, alpha-mask]
   1.777 Created atlas bitmap 8192x2336 [shadow, mipmap, linear-magnification, alpha-mask]
   1.777 Created atlas bitmap 2048x240 [icon-background, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level, ]
   1.780 Texture processor created (2048). GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 36.09, BC3 PSNR: 33.82
   2.926 Parallel Sprite Loader initialized (threads: 7)
  11.449 Sprites loaded
  11.482 Generated mipmaps (4) for atlas [3] of size 16384x5568   
  11.492 Generated mipmaps (3) for atlas [4] of size 8192x4432   
  11.512 Generated mipmaps (3) for atlas [5] of size 16384x6064   
  11.516 Generated mipmaps (3) for atlas [6] of size 4096x3216   
  11.522 Generated mipmaps (3) for atlas [7] of size 4096x1840   
  11.557 Generated mipmaps (3) for atlas [8] of size 4096x3104   
  11.580 Generated mipmaps (5) for atlas [9] of size 8192x2288   
  11.584 Generated mipmaps (3) for atlas [12] of size 8192x2336   
  11.590 Custom mipmaps uploaded (1942)
  11.597 Custom inputs active: 5
  11.665 Factorio initialised
  11.666 Steam Storage Quota: 23696/23841
  12.445 Loading map /Users/game/Library/Application Support/factorio/saves/rail-flip-tests.zip: 18919952 bytes.
  12.465 Loading level.dat: 51517895 bytes.
  12.472 Info Scenario.cpp:204: Map version 1.1.101-1
  13.018 Loading script.dat: 503 bytes.
  13.020 Checksum for script /Users/game/Library/Application Support/factorio/temp/currently-playing/control.lua: 3093115639
  13.021 Script @__blueprint_flip_and_turn__/modwarning.lua:9: COOL log exists !
  13.021 Checksum for script __blueprint_flip_and_turn__/control.lua: 455899406
  13.022 Checksum for script __rail-flip__/control.lua: 888830947
 217.652 Received SIGTERM, shutting down
 217.825 Quitting: signal.
 218.371 Steam API shutdown.
 218.373 Goodbye
tinker9
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat Nov 09, 2024 4:51 am
Contact:

Re: [StrangePan] [1.1.101] Hang after switching macOS user

Post by tinker9 »

I've been seeing this bug as well, it's still in 2.0.21. It happens on the opening screen without any simulations. I'm using Factorio via Steam.

I think the hang happens in Cocoa_GL_SwapWindow inside SDLWindow, but it's possible that's just reflecting a hang elsewhere. The MainThrd, CVDisplayLink, and GameUpdate threads appear to hang, all the other threads are doing something occasionally. (And none of them are pegged at 100% CPU.)

I've attached my config, log, a screenshot of the Instruments CPU/hang sample, and the sample file itself (which might need Xcode instruments to open).

This doesn't seem to be related to Steam or Space Age, the 1.1.110 demo has the same hang.
Attachments
Factorio Hang.trace.zip
(6.84 MiB) Downloaded 4 times
Screenshot 2024-11-25 at 12.24.56.png
Screenshot 2024-11-25 at 12.24.56.png (1.28 MiB) Viewed 100 times
config.ini
(56.68 KiB) Downloaded 3 times
factorio-current.log
(7.27 KiB) Downloaded 4 times
tinker9
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat Nov 09, 2024 4:51 am
Contact:

Re: [StrangePan] [1.1.101] Hang after switching macOS user

Post by tinker9 »

Headless/server mode is not impacted by this bug, it runs even during fast user switching.

So running

Code: Select all

./factorio --verbose --start-server-load-latest
in a terminal might be a workaround, if you want to run in the background all the time, and connect via GUI only when you're actively playing.
Attachments
headless.log
(49.07 KiB) Downloaded 2 times
tinker9
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat Nov 09, 2024 4:51 am
Contact:

Re: [StrangePan] [1.1.101] Hang after switching macOS user

Post by tinker9 »

tinker9 wrote: Mon Nov 25, 2024 11:35 pm Headless/server mode is not impacted by this bug, it runs even during fast user switching.
Actually, I think I was wrong here. I ran a save as headless for about 6 hours, did a fast user switch, then came back and re-loaded it.

When I came back, my mining productivity tech was advancing at about 1% every few seconds, but hadn't completed in the 6 hours I was away.


Edit: I forgot to set auto-pause false in the server settings!

The GUI hangs with Fast User switching, but the CLI doesn't.
Post Reply

Return to “Assigned”