Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Game hangs on MAC Book Pro Catalina  (Read 927 times)

orvi

  • Ensign
  • *
  • Posts: 3
    • View Profile
Game hangs on MAC Book Pro Catalina
« on: February 16, 2020, 08:57:26 PM »

Hello :). I love open word trading/roleplaying games and I'm really happy to have found this game here. But the game hangs on startup.

Below is the log file:

Code
Date/Time:        2020-02-16 19:55:53 -0800
End time:         2020-02-16 19:56:22 -0800
OS Version:       Mac OS X 10.15.3 (Build 19D76)
Architecture:     x86_64h
Report Version:   29

Data Source:      Stackshots
Shared Cache:     0x10f3000 7CC20A3F-9E0A-35C5-81C0-B4AF07D6A053

Command:          com.fs.starfarer.StarfarerLauncher
Path:             /Applications/Starsector.app/Contents/Home/bin/java
Version:          ??? (???)
Parent:           bash [9341]
Responsible:      bash [9341]
PID:              9345

Event:            hang
Duration:         29.22s
Duration Sampled: 2.99s (process was unresponsive for 26 seconds before sampling)
Steps:            30 (100ms sampling interval)

Hardware model:   MacBookPro15,3
Active cpus:      16
Boot args:        chunklist-security-epoch=0 -chunklist-no-rev2-dev

Time Awake Since Boot: 320000s
Time Since Wake:  3000s


--------------------------------------------------
Timeline format: stacks are sorted chronologically
Use -i and -heavy to re-report with count sorting
--------------------------------------------------


Heaviest stack for the main thread of the target process:
  30  start + 52 (java + 5044) [0x109dc23b4]
  30  main + 101 (java + 30477) [0x109dc870d]
  30  JLI_Launch + 1952 (java + 7004) [0x109dc2b5c]
  30  CreateExecutionEnvironment + 871 (java + 29616) [0x109dc83b0]
  30  CFRunLoopRunSpecific + 499 (CoreFoundation + 535507) [0x7fff2ccb2bd3]
  30  __CFRunLoopRun + 1272 (CoreFoundation + 538432) [0x7fff2ccb3740]
  30  __CFRunLoopDoSources0 + 209 (CoreFoundation + 542932) [0x7fff2ccb48d4]
  30  __CFRunLoopDoSource0 + 103 (CoreFoundation + 543424) [0x7fff2ccb4ac0]
  30  __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 (CoreFoundation + 543521) [0x7fff2ccb4b21]
  30  __NSThreadPerformPerform + 254 (Foundation + 641195) [0x7fff2f3918ab]
  30  ??? (<42DF3C5F-499D-3B54-B3C5-E0B8D3CCED65> + 57725) [0x1155a017d]
  30  ??? (<5EDED103-5C6A-3DD1-83C0-F116FA9670EF> + 9030) [0x10b3db346]
  30  -[NSApplication run] + 658 (AppKit + 200862) [0x7fff29e6909e]
  30  ??? (<5EDED103-5C6A-3DD1-83C0-F116FA9670EF> + 9443) [0x10b3db4e3]
  30  -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352 (AppKit + 258944) [0x7fff29e77380]
  30  _DPSNextEvent + 990 (AppKit + 265124) [0x7fff29e78ba4]
  30  _BlockUntilNextEventMatchingListInModeWithFilter + 64 (HIToolbox + 192807) [0x7fff2b808127]
  30  ReceiveNextEventCommon + 600 (HIToolbox + 193437) [0x7fff2b80839d]
  30  RunCurrentEventLoopInMode + 292 (HIToolbox + 194141) [0x7fff2b80865d]
  30  CFRunLoopRunSpecific + 499 (CoreFoundation + 535507) [0x7fff2ccb2bd3]
  30  __CFRunLoopRun + 1272 (CoreFoundation + 538432) [0x7fff2ccb3740]
  30  __CFRunLoopDoSources0 + 209 (CoreFoundation + 542932) [0x7fff2ccb48d4]
  30  __CFRunLoopDoSource0 + 103 (CoreFoundation + 543424) [0x7fff2ccb4ac0]
  30  __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 (CoreFoundation + 543521) [0x7fff2ccb4b21]
  30  __NSThreadPerformPerform + 254 (Foundation + 641195) [0x7fff2f3918ab]
  19  ??? (<42DF3C5F-499D-3B54-B3C5-E0B8D3CCED65> + 71189) [0x1155a3615]
  19  -[NSOpenGLPixelFormat initWithAttributes:] + 52 (AppKit + 4079227) [0x7fff2a21be7b]
  19  CGLChoosePixelFormat + 85 (OpenGL + 36181) [0x7fff374f6d55]
  19  ??? (OpenGL + 39003) [0x7fff374f785b]
  19  ??? (OpenGL + 25413) [0x7fff374f4345]
  19  cglBadApplicationNotMuxAwareLockDown + 44 (OpenGL + 25093) [0x7fff374f4205]
  18  ??? (OpenGL + 23041) [0x7fff374f3a01]
  18  IOServiceOpen + 39 (IOKit + 10205) [0x7fff2fa377dd]
  18  io_service_open_extended + 137 (IOKit + 10371) [0x7fff2fa37883]
  18  mach_msg_trap + 10 (libsystem_kernel.dylib + 4698) [0x7fff6449925a]
 *18  hndl_mach_scall64 + 22 (kernel + 930342) [0xffffff80002e3226]
 *18  mach_call_munger64 + 517 (kernel + 2405749) [0xffffff800044b575]
 *18  mach_msg_overwrite_trap + 741 (kernel + 1241317) [0xffffff800032f0e5]
 *18  ipc_kmsg_send + 309 (kernel + 1148469) [0xffffff8000318635]
 *18  ipc_kobject_server + 568 (kernel + 1317336) [0xffffff80003419d8]
 *18  ??? (kernel + 2238431) [0xffffff80004227df]
 *18  is_io_service_open_extended + 297 (kernel + 8844425) [0xffffff8000a6f489]
 *18  ??? (AppleMuxControl2 + 35337) [0xffffff7f845fea09]
 *18  IOWorkLoop::runAction(int (*)(OSObject*, void*, void*, void*, void*), OSObject*, void*, void*, void*, void*) + 62 (kernel + 8648750) [0xffffff8000a3f82e]
 *18  ??? (AppleMuxControl2 + 35176) [0xffffff7f845fe968]
 *18  ??? (AppleMuxControl2 + 37058) [0xffffff7f845ff0c2]
 *18  ??? (AppleMuxControl2 + 37285) [0xffffff7f845ff1a5]
 *18  ??? (AppleMuxControl2 + 59159) [0xffffff7f84604717]
 *18  ??? (AppleMuxControl2 + 5048) [0xffffff7f845f73b8]
 *18  IOEventSource::sleepGate(void*, unsigned int) + 75 (kernel + 8653851) [0xffffff8000a40c1b]
 *18  IOGraphicsSystemWorkLoop::sleepGate(void*, unsigned int) + 9 (IOGraphicsFamily + 139807) [0xffffff7f83fc021f]
 *18  IOGraphicsWorkLoop::sleepGate(void*, unsigned int) + 100 (IOGraphicsFamily + 37120) [0xffffff7f83fa7100]
 *18  lck_mtx_sleep + 112 (kernel + 1362816) [0xffffff800034cb80]
 *18  thread_block_reason + 175 (kernel + 1425263) [0xffffff800035bf6f]
 *18  ??? (kernel + 1431409) [0xffffff800035d771]
 *18  machine_switch_context + 200 (kernel + 2490744) [0xffffff8000460178]


Process:          com.fs.starfarer.StarfarerLauncher [9345]
UUID:             819AA297-12E5-328D-ACD2-4431DFA913E5
Path:             /Applications/Starsector.app/Contents/Home/bin/java
Architecture:     x86_64
Parent:           bash [9341]
Responsible:      bash [9341]
UID:              501
Footprint:        60.42 MB -> 66.20 MB (+5916 KB)
Pageins:          54 pages
Start time:       2020-02-16 19:56:19 -0800
End time:         2020-02-16 19:56:22 -0800
Num samples:      30 (1-30)
CPU Time:         0.037s (101.0M cycles, 66.4M instructions, 1.52c/i)
Note:             Unresponsive for 26 seconds before sampling
Note:             2 idle work queue threads omitted

  Thread 0x14f9bf    DispatchQueue "com.apple.main-thread"(1)    Thread name "AppKit Thread"    30 samples (1-30)    priority 4-46 (base 4)    cpu time 0.016s (44.6M cycles, 42.9M instructions, 1.04c/i)
  <thread QoS utility (requested user interactive), process unclamped, process received importance donation from WindowServer [286], IO tier 1, priority 46 (4)>
  30  start + 52 (java + 5044) [0x109dc23b4] 1-30
    30  main + 101 (java + 30477) [0x109dc870d] 1-30
      30  JLI_Launch + 1952 (java + 7004) [0x109dc2b5c] 1-30
        30  CreateExecutionEnvironment + 871 (java + 29616) [0x109dc83b0] 1-30
          30  CFRunLoopRunSpecific + 499 (CoreFoundation + 535507) [0x7fff2ccb2bd3] 1-30
            30  __CFRunLoopRun + 1272 (CoreFoundation + 538432) [0x7fff2ccb3740] 1-30
              30  __CFRunLoopDoSources0 + 209 (CoreFoundation + 542932) [0x7fff2ccb48d4] 1-30
                30  __CFRunLoopDoSource0 + 103 (CoreFoundation + 543424) [0x7fff2ccb4ac0] 1-30
                  30  __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 (CoreFoundation + 543521) [0x7fff2ccb4b21] 1-30
                    30  __NSThreadPerformPerform + 254 (Foundation + 641195) [0x7fff2f3918ab] 1-30
                      30  ??? (<42DF3C5F-499D-3B54-B3C5-E0B8D3CCED65> + 57725) [0x1155a017d] 1-30
                        30  ??? (<5EDED103-5C6A-3DD1-83C0-F116FA9670EF> + 9030) [0x10b3db346] 1-30
                          30  -[NSApplication run] + 658 (AppKit + 200862) [0x7fff29e6909e] 1-30
                            30  ??? (<5EDED103-5C6A-3DD1-83C0-F116FA9670EF> + 9443) [0x10b3db4e3] 1-30
                              30  -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352 (AppKit + 258944) [0x7fff29e77380] 1-30
                                30  _DPSNextEvent + 990 (AppKit + 265124) [0x7fff29e78ba4] 1-30
                                  30  _BlockUntilNextEventMatchingListInModeWithFilter + 64 (HIToolbox + 192807) [0x7fff2b808127] 1-30
                                    30  ReceiveNextEventCommon + 600 (HIToolbox + 193437) [0x7fff2b80839d] 1-30
                                      30  RunCurrentEventLoopInMode + 292 (HIToolbox + 194141) [0x7fff2b80865d] 1-30
                                        30  CFRunLoopRunSpecific + 499 (CoreFoundation + 535507) [0x7fff2ccb2bd3] 1-30
                                          30  __CFRunLoopRun + 1272 (CoreFoundation + 538432) [0x7fff2ccb3740] 1-30
                                            30  __CFRunLoopDoSources0 + 209 (CoreFoundation + 542932) [0x7fff2ccb48d4] 1-30
                                              30  __CFRunLoopDoSource0 + 103 (CoreFoundation + 543424) [0x7fff2ccb4ac0] 1-30
                                                30  __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 (CoreFoundation + 543521) [0x7fff2ccb4b21] 1-30
                                                  30  __NSThreadPerformPerform + 254 (Foundation + 641195) [0x7fff2f3918ab] 1-30
                                                    19  ??? (<42DF3C5F-499D-3B54-B3C5-E0B8D3CCED65> + 71189) [0x1155a3615] 1-19
                                                      19  -[NSOpenGLPixelFormat initWithAttributes:] + 52 (AppKit + 4079227) [0x7fff2a21be7b] 1-19
                                                        19  CGLChoosePixelFormat + 85 (OpenGL + 36181) [0x7fff374f6d55] 1-19
                                                          19  ??? (OpenGL + 39003) [0x7fff374f785b] 1-19
                                                            19  ??? (OpenGL + 25413) [0x7fff374f4345] 1-19
                                                              19  cglBadApplicationNotMuxAwareLockDown + 44 (OpenGL + 25093) [0x7fff374f4205] 1-19
                                                                18  ??? (OpenGL + 23041) [0x7fff374f3a01] 1-18
                                                                  18  IOServiceOpen + 39 (IOKit + 10205) [0x7fff2fa377dd] 1-18
                                                                    18  io_service_open_extended + 137 (IOKit + 10371) [0x7fff2fa37883] 1-18
                                                                      18  mach_msg_trap + 10 (libsystem_kernel.dylib + 4698) [0x7fff6449925a] 1-18
                                                                       *18  hndl_mach_scall64 + 22 (kernel + 930342) [0xffffff80002e3226] 1-18
                                                                         *18  mach_call_munger64 + 517 (kernel + 2405749) [0xffffff800044b575] 1-18
                                                                           *18  mach_msg_overwrite_trap + 741 (kernel + 1241317) [0xffffff800032f0e5] 1-18
                                                                             *18  ipc_kmsg_send + 309 (kernel + 1148469) [0xffffff8000318635] 1-18
                                                                               *18  ipc_kobject_server + 568 (kernel + 1317336) [0xffffff80003419d8] 1-18
                                                                                 *18  ??? (kernel + 2238431) [0xffffff80004227df] 1-18
                                                                                   *18  is_io_service_open_extended + 297 (kernel + 8844425) [0xffffff8000a6f489] 1-18
                                                                                     *18  ??? (AppleMuxControl2 + 35337) [0xffffff7f845fea09] 1-18
                                                                                       *18  IOWorkLoop::runAction(int (*)(OSObject*, void*, void*, void*, void*), OSObject*, void*, void*, void*, void*) + 62 (kernel + 8648750) [0xffffff8000a3f82e] 1-18
                                                                                         *18  ??? (AppleMuxControl2 + 35176) [0xffffff7f845fe968] 1-18
                                                                                           *18  ??? (AppleMuxControl2 + 37058) [0xffffff7f845ff0c2] 1-18
                                                                                             *18  ??? (AppleMuxControl2 + 37285) [0xffffff7f845ff1a5] 1-18
                                                                                               *18  ??? (AppleMuxControl2 + 59159) [0xffffff7f84604717] 1-18
                                                                                                 *18  ??? (AppleMuxControl2 + 5048) [0xffffff7f845f73b8] 1-18
                                                                                                   *18  IOEventSource::sleepGate(void*, unsigned int) + 75 (kernel + 8653851) [0xffffff8000a40c1b] 1-18
                                                                                                     *18  IOGraphicsSystemWorkLoop::sleepGate(void*, unsigned int) + 9 (IOGraphicsFamily + 139807) [0xffffff7f83fc021f] 1-18
                                                                                                       *18  IOGraphicsWorkLoop::sleepGate(void*, unsigned int) + 100 (IOGraphicsFamily + 37120) [0xffffff7f83fa7100] 1-18
                                                                                                         *18  lck_mtx_sleep + 112 (kernel + 1362816) [0xffffff800034cb80] 1-18
                                                                                                           *18  thread_block_reason + 175 (kernel + 1425263) [0xffffff800035bf6f] 1-18
                                                                                                             *18  ??? (kernel + 1431409) [0xffffff800035d771] 1-18
                                                                                                               *18  machine_switch_context + 200 (kernel + 2490744) [0xffffff8000460178] 1-18
.
.
.
.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24111
    • View Profile
Re: Game hangs on MAC Book Pro Catalina
« Reply #1 on: February 16, 2020, 09:00:50 PM »

Hi - sorry about the trouble! Hmm. There should be a file named "starsector.log" in the application package, what does that say?

Also: could you try running the game as an administrator (or root) account?

And, finally: if you have Gatekeeper enabled, and/or some kind of antivirus, could you try temporarily disabling both?
Logged

orvi

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: Game hangs on MAC Book Pro Catalina
« Reply #2 on: February 16, 2020, 09:41:04 PM »

Hi Alex :) the starsector.log is as follows:

Code
0    [main] INFO  com.fs.starfarer.StarfarerLauncher  - Starting Starsector 0.9.1a-RC8 launcher
2    [main] INFO  com.fs.starfarer.StarfarerLauncher  - Running in /Applications/Starsector.app/Contents/Resources/Java
2    [main] INFO  com.fs.starfarer.StarfarerLauncher  - OS: Mac OS X 10.15.3
2    [main] INFO  com.fs.starfarer.StarfarerLauncher  - Java version: 1.7.0_79 (64-bit)
14   [main] INFO  com.fs.starfarer.settings.StarfarerSettings  - Loading settings
18   [main] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading JSON from [ABSOLUTE_AND_CWD: null (data/config/settings.json)]
123  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 640x480, 0Hz, 32bpp
123  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 800x600, 0Hz, 32bpp
123  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 840x524, 0Hz, 32bpp
123  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1024x768, 0Hz, 32bpp
123  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1152x720, 0Hz, 32bpp
123  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1280x800, 0Hz, 32bpp
124  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1440x900, 0Hz, 32bpp
124  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1650x1050, 0Hz, 32bpp
124  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1680x1050, 0Hz, 32bpp
124  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 2048x1280, 0Hz, 32bpp
124  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 2560x1600, 0Hz, 32bpp
124  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 2880x1800, 0Hz, 32bpp
124  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 3360x2100, 0Hz, 32bpp
124  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Assuming native monitor resolution is 3360x2100

The game hangs on startup and doesn't seem to induce an error.
Logged

orvi

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: Game hangs on MAC Book Pro Catalina
« Reply #3 on: February 16, 2020, 09:42:42 PM »

After some digging, it seems to be a race condition caused by OpenGL initialization on startup (via NSOpenGLPixelFormat), which causes the discrete GPU to turn on. It maybe that the dynamic GPU switch causes a reconfiguration in the mac WindowServer, which then hangs subsequent OpenGL processes.

turning off automatic graphics switching in system preferences allows me to start the game.

Chromium had a similar problem in 2012. The work around is to defer OpenGL initializations until after it's made visible:
https://bugs.chromium.org/p/chromium/issues/detail?id=109151
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24111
    • View Profile
Re: Game hangs on MAC Book Pro Catalina
« Reply #4 on: February 16, 2020, 09:50:42 PM »

Thank you for the info - doesn't seem like something I can easily address (with the code in question being inside a 3rd party library for OpenGL bindings), but it's good to know.

Glad you've got a workaround, in any case!
Logged