lwouis / alt-tab-macos

Windows alt-tab on macOS
https://alt-tab-macos.netlify.app
GNU General Public License v3.0
10.67k stars 323 forks source link

AltTab exits on alt-tab hotkey press. #3437

Closed MlsDmitry closed 3 months ago

MlsDmitry commented 3 months ago

Describe the bug

I've downloaded the 6.70.1 release from github. Unzipped, double clicked with ctrl. After that I can see alttab appear in process monitor. After pressing the alt+tab hotkey it disappears from process monitor, perhaps crashing.

Expected behavior: Application icon appear in top bar, alt-tab hotkey switches windows.

When app opened via double clicking on (1) AltTab/Contents/MacOS/AltTab it launches, alt-tab hotkey works as expected. At least it switches windows) Also, there is an error "Illegal instruction 4" when trying to press "check permission" button

The window "send or /don't send crash" only appeared after launching it via (1) and enabling option like "ask before sending crash" in app settings.

Screenshots / video

Watch the video

Steps to reproduce the bug

  1. Download https://github.com/lwouis/alt-tab-macos/releases/download/v6.70.1/AltTab-6.70.1.zip
  2. Double click with ctrl. Move to Applications folder or open in place(without moving, as I did on screen recording)
  3. Try to press alt-tab
  4. Nothing happens. No apple crash log window, nor any sign of crash.

Your environment

MlsDmitry commented 3 months ago

Tested few versions. This one https://github.com/lwouis/alt-tab-macos/releases/tag/v6.52.1 works without this issue. In this version a dialog appeares that guides to enable accessbility permission for an app. After granting this version, latest version 6.70.1 starts okay and switches tabs without a crash. Nevertheless, click on Check permissions button crashes the app.

lwouis commented 3 months ago

Hi @MlsDmitry,

Thank you for reporting this issue.

Before reading the text bellow, could you please try out this local build? If it works for you, I may have found the issue.

I noticed that you're running an old version of macOS which doesn't have Screen Recording Permission yet. I think there may be a bug with AltTab in that regard.


Indeed, I see the crash report you sent in AppCenter:

image

Looking at the code involved, it seems that the permissionsWindow is nil. I don't see how this can happen since that window is always instanciated before.

Could you please try running AltTab v6.70.1 from the Applications folder? I notice that you open it from another folder. MacOs has invisible systems that could pose problems. Launching an app from Applications is the right way to launch an app. It will avoid macOS putting the app into quarantine or other invisible breaking behaviors.

You mentioned that v6.52.1 is able to show the Permissions Window without crashing. Have you tried every version between v6.70.1 and v6.52.1? I'd like to confirm exactly on which version the crash starts to happen.

Thank you

MlsDmitry commented 3 months ago

Hi @lwouis,

Thank you for such a detailed reply!

Before reading the text bellow, could you please try out this local build? If it works for you, I may have found the issue.

This build works okay. Alt-tab hotkey switches windows and check permission button shows a dialog.

Could you please try running AltTab v6.70.1 from the Applications folder?

I've run few versions from Applications folder and from Downloads. For this version the result was the same (for the others too actually).

Have you tried every version between v6.70.1 and v6.52.1?

No. I wasn't that patient to try every version😅 I've just tried versions from v6.67.0 to v6.64.0 inclusive. Starting from v6.65.0 the app shows behavior with the bug described. v6.64.0 does not have 'check permission' button in toolbar menu list. Alt-tab hotkey works in this versions but I can't say sure if it would work on fresh install since I used older version to enable required permission for an app, so it won't cause the crash.