strongbox-password-safe / Strongbox

A KeePass/Password Safe Client for iOS and OS X
https://strongboxsafe.com
GNU Affero General Public License v3.0
1.34k stars 102 forks source link

(Possible) BUG: Copying from notes with CMD-C locks the Notes view (Strongbox Mac) #747

Open Scryb opened 11 months ago

Scryb commented 11 months ago

Environment: Mac OS 14.1.2, Strongbox 1.58.37 Steps to reproduce: Open Strongbox Mac and select any entry with anything in the Notes section. Select some text in the Notes section. Press CMD-C to copy. Try to paste the text somewhere (in another app, e.g. Mail). Expected Result: Text is pasted, Strongbox keeps acting normal. Actual Result: Text is not pasted, and now the Notes view in Strongbox is frozen and doesn't change when selecting another entry, still showing the notes from the one that was selected when pressing CMD-C. Copying the full notes using either the copy button or … -> Copy still works and copies the correct notes (from the currently selected entry), but CMD-C does not work, even though it shows the blue "Notes copied" notice. Additional Details: When pressing CMD-C when it freezes the view, I can see that it doesn't flash the menubar the way it's supposed to when actually copying, which suggests to me that something is somehow stealing the NSEvent of the CMD-C. I'm not a Mac developer (only iOS so far) so not too familiar with how capturing keyboard events works.

Update: I can also confirm that after the freeze, Strongbox stops responding to any keyboard shortcuts (e.g. CMD-M, CMD-H).

CTRL/right clicking on the selected text and choosing Copy works as expected, so the problem is only with the keyboard shortcut, which is very strange. What's even stranger is that if I have first copied something using right click -> copy, I can select other bits of text and copy using CMD-C and it seems to sometimes work, but not always. And if I select another entry first and select some text there it freezes again as soon as I hit CMD-C.

strongbox-mark commented 11 months ago

Hi @Scryb - How reproducible is this for you, I can't reproduce it on this side. Would you be able to send a screen recording and debug info to support@strongboxsafe.com?

Scryb commented 11 months ago

Weirdly it seems to have gone away by itself, and I didn't reboot the computer even. How very strange. I'll just close it. Carry on 😅

Scryb commented 8 months ago

Hi again, I'm sorry to report that this behavior has showed up again seemingly at random. Sometimes I can copy with cmd-c no problem, other times it freezes the interface so no keyboard shortcuts work and the notes field view doesn't update.

I tried looking for log files but couldn't find any. Not even sure this kind of error is something that would be logged. When it happens, the freeze happens before anything is copied to the clipboard. Just cmd-c and brrr 🥶. After it freezes, I can still get to the notes (of the currently selected item) through editing.

strongbox-mark commented 8 months ago

Hi @Scryb - Can you send us a screen recording of the issue? Is it related to only a single particular entry or any entry?

Scryb commented 8 months ago

Here's a recording that shows the problem and the randomness (made a dummy database). Launching the app three times and it freezes only once. Notice how when I switch between entries it keeps showing the stuck one, and how trying to copy with cmd-c doesn't work (you can't see/hear me click on the keyboard, but that's what I'm doing around 00:50).

hxxps://send.vis.ee/download/800ac663dc4d722b/#Y38desu0HD2aRYJOx6VH6Q

It happens with any entry that has notes. Editing the entry works, but keyboard shortcuts seem to be stuck until quitting and relaunching the app.

strongbox-mark commented 8 months ago

Thank you, the first thing I notice is that you're running quite an old build there. Could you update to 1.59.7 and see if that fixes things for you? There were some changes in the last month or two in this sort of area. Thanks!

Scryb commented 8 months ago

Oops. Thanks MAS 🙄

So far so good, but it has been quite random so I'll wait a few days to make sure.