rxhanson / Rectangle

Move and resize windows on macOS with keyboard shortcuts and snap areas
https://rectangleapp.com
Other
25.86k stars 777 forks source link

Rectangle gone each time Mac wakes from long sleep #557

Open marlonrichert opened 3 years ago

marlonrichert commented 3 years ago

Each time I wake my Mac from sleep, Rectangle is gone and I have to launch it again by hand.

This is a new bug that hasn't been documented in a closed issue or in the Readme.

macOS version: Big Sur 11.5.2 Rectangle version: 0.48 (53) Logs if applicable: The log is empty.

rxhanson commented 3 years ago

Is there a crash report for Rectangle in the Console.app?

Do you keep the menu bar icon hidden?

marlonrichert commented 3 years ago

Is there a crash report for Rectangle in the Console.app?

Nope.

Do you keep the menu bar icon hidden?

Nope.

I just tried to willfully reproduce it by putting my Mac to sleep and waking it, but then, Rectangle was there just fine. It seems to happen only when my Mac has been asleep for a longer period of time.

rxhanson commented 3 years ago

Strange. If it’s not running and there’s no crash log, then it’s going to be hard to get to the bottom of this. In some of my other apps, like Middle, the app will restart itself on wake and I had a bug where the app failed to relaunch itself. In Rectangle, this is not the case.

I’ll look to add some debug in the next release and then we can revisit this.

marlonrichert commented 3 years ago

It seems to happen only when my Mac has gone to sleep by itself, never when I deliberately put it to sleep.

hoosierEE commented 3 years ago

What do you mean by "gone"?

I noticed Rectangle being unresponsive a couple times lately (on MacOS 10.14.6). Activity Monitor shows it using high CPU (which is very unusual). Force-quitting (from Activity Monitor) and restarting brings Rectangle back to normal.

marlonrichert commented 3 years ago

What do you mean by "gone"?

The thing that happens when you uncheck this box:

Screen Shot 2021-09-01 at 18 52 36
rxhanson commented 3 years ago

@hoosierEE High CPU is usually an indicator that an application you are using has issues with Rectangle’s click listening for the snap windows by dragging feature. Any idea which application might cause Rectangle’s CPU spike?

@marlonrichert Correct me if my understanding is incorrect: When you have that setting unchecked, and you wake from sleep after long inactivity, then Rectangle is no longer running (and not present in Activity Monitor), rather than just being unresponsive.

marlonrichert commented 3 years ago

Correct me if my understanding is incorrect: When you have that setting unchecked, and you wake from sleep after long inactivity, then Rectangle is no longer running (and not present in Activity Monitor), rather than just being unresponsive.

Yes, that is correct. Although, at present, it seems the problem has gone away. 🤷 Perhaps it was just some temporary fluke. It seems have fixed itself after I finally rebooted my machine.

hoosierEE commented 3 years ago

@rxhanson thanks for the info. The applications I use 99% of the time are Brave, Emacs, Iterm2, Mail.app, and Spotify. Spotify is the most buggy of these, and sometimes I'll do something foolish to hang Emacs, but I can't say for sure which app correlates with Rectangle using more CPU. If it happens again, I'll pay closer attention to provide an actionable report.

marlonrichert commented 3 years ago

It's happening again, but this time, Rectangle was there and functioned when I woke up my Mac, and disappeared only later. Again, no log, no crash report.

rxhanson commented 3 years ago

@marlonrichert, There is no logic in Rectangle that would close itself. I think it’s safe to rule out a crash since there is no report and I have nobody else experiencing a crash otherwise. This leads me to believe that something external to Rectangle is causing this issue.

From Rectangle’s perspective, the only thing I can think to do is uninstall the app, reboot, and reinstall it. I don’t think that adding more logging to Rectangle will give us anything further than telling us when Rectangle is closed, so I probably won’t bother with that. If I can think of anything else, I’ll post back here.