limelight icon indicating copy to clipboard operation
limelight copied to clipboard

Limelight crash after upgrade to macOS Monterey

Open astocks opened this issue 3 years ago • 15 comments

I can start limelight, and it runs for a few seconds before throwing the below error:

'limelight' terminated by signal SIGSEGV (Address boundary error)

astocks avatar Nov 04 '21 14:11 astocks

yup happens to me too

dlvhdr avatar Nov 08 '21 08:11 dlvhdr

I was getting segmentation faults within seconds. I just went to grab a core dump and start debugging this, but now Limelight seems to be stable and it's not crashing anymore for me. This was after upgrading Yabai to latest master, which at the time of writing is v4.0.0. So I'm not sure if I'm just getting extremely lucky or the issue was with Yabai, not Limelight.

gplusplus314 avatar Nov 22 '21 14:11 gplusplus314

Does anyone know how to get a core dump for Limelight? I tried running Limelight via sudo, but it immediately exits and says running as root is not allowed! abort... So I chowned /cores to be writable, but I still didn't get a core dump. Any ideas?

gplusplus314 avatar Nov 22 '21 14:11 gplusplus314

This is one of the fixes from yabai that you need to apply:

diff --git a/src/workspace.m b/src/workspace.m
index d2c20f8..34b68ff 100644
--- a/src/workspace.m
+++ b/src/workspace.m
@@ -22,7 +22,7 @@ void workspace_event_handler_end(void *context)
 
 void *workspace_application_create_running_ns_application(struct process *process)
 {
-    return [NSRunningApplication runningApplicationWithProcessIdentifier:process->pid];
+    return [[NSRunningApplication runningApplicationWithProcessIdentifier:process->pid] retain];
 }
 
 void workspace_application_destroy_running_ns_application(void *ws_context, struct process *process)

choco avatar Dec 16 '21 17:12 choco

It really needs a rewrite.

koekeishiya avatar Dec 17 '21 18:12 koekeishiya

Limelight needs to be updated to work on Monterey. I have started doing so, but no ETA for when it is ready.

koekeishiya avatar Jan 21 '22 16:01 koekeishiya

Same issue here Except that sometimes the signal is different:

limelight
limelight configuration loaded..
fish: Job 1, 'limelight' terminated by signal SIGTERM (Polite quit request)

SichangHe avatar Jan 23 '22 00:01 SichangHe

Any update for limelight for Monterrey? Anybody has a viable alternative?

Thanks!

vizcay avatar Mar 12 '22 22:03 vizcay

the latest version (master) of yabai (Monterey version) now comes with window borders that do not require SIP to be disabled. limelight will therefore not be updated for Monterey.

koekeishiya avatar Mar 16 '22 17:03 koekeishiya

😢 I was using limelight without yabai..

vizcay avatar Mar 16 '22 21:03 vizcay

😢 I was using limelight without yabai..

You could maybe use yabai and set a rule with regex to not manage anything, though I'm not sure if there's any unintended consequences.

yabai -m rule --add app="^.*$" manage=off

or set the layout to float.

yabai -m config layout float

Minimal Config

# G E N E R A L
  # Load Scripting Additions
    sudo yabai --load-sa
    yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"

# W I N D O W  M A N A G E M E N T
  yabai -m config layout float

# R U L E
  # yabai -m rule --add app="^.*$" manage=off

# B O R D E R S
  yabai -m config window_border on
  yabai -m config window_border_width 6
  yabai -m config active_window_border_color 0XFF50FA7B
  yabai -m config normal_window_border_color 0xFFBD93F9
  yabai -m config insert_feedback_color 0XFF50FA7B

typkrft avatar Mar 16 '22 21:03 typkrft

You could maybe use yabai and set a rule with regex to not manage anything, though I'm not sure if there's any unintended consequences.

yabai -m rule --add app="^.*$" manage=off

or set the layout to float.

yabai -m config layout float

That is pretty much what the limelight codebase is, so yes that should be a decent substitute.

Edit:

You don't need the scripting addition for borders on the latest master. The following should be sufficient if you only want to use the border functionality:

# disable window management
yabai -m config layout float

# enable window borders
yabai -m config window_border on
yabai -m config window_border_width 6
yabai -m config active_window_border_color 0XFF50FA7B
yabai -m config normal_window_border_color 0xFFBD93F9

koekeishiya avatar Mar 16 '22 21:03 koekeishiya

yabai -m config normal_window_border_color 0x000000ff

The 0x00 part isn't making the inactive window border completely transparent. And it would be great if you can try to add the limelight equivalent of radius limelight -m config radius 10

h4wwk3ye avatar Mar 17 '22 13:03 h4wwk3ye

This is one of the fixes from yabai that you need to apply:

diff --git a/src/workspace.m b/src/workspace.m
index d2c20f8..34b68ff 100644
--- a/src/workspace.m
+++ b/src/workspace.m
@@ -22,7 +22,7 @@ void workspace_event_handler_end(void *context)
 
 void *workspace_application_create_running_ns_application(struct process *process)
 {
-    return [NSRunningApplication runningApplicationWithProcessIdentifier:process->pid];
+    return [[NSRunningApplication runningApplicationWithProcessIdentifier:process->pid] retain];
 }
 
 void workspace_application_destroy_running_ns_application(void *ws_context, struct process *process)

Thanks, this patch works for me.

jheroy avatar Apr 02 '22 08:04 jheroy

Just heads up, I am using this with yabai and tried limelight install separately but got segfaults, instead I just used limelight configs built into yabai and now it works - didn't need to disable SIP either

yabairc

yabai -m config window_border on
yabai -m config window_border_width 3
yabai -m config active_window_border_color 0xFF40FF00
yabai -m config normal_window_border_color 0x00FFFFFF
yabai -m config insert_feedback_color        0xffd75f5f

OGProgrammer avatar Aug 17 '22 17:08 OGProgrammer