KeePassium
KeePassium copied to clipboard
MacOS: Random app crashes when opening a context menu
Description When the user tries to open a context (right-click) menu when running on a Mac, the app sometimes crashes.
How to reproduce Steps to reproduce the behavior:
- Launch KeePassium on an M1 Mac
- Start creating a new entry
- Right-click any text field
- With some probability, the app crashes
Expected behavior The app should open the context menu instead.
Environment:
- Device:
MacBookAir10,1 - OS: macOS 12.4
- App Version: 1.32.110
Additional context
Stack trace:
Last Exception Backtrace:
0 CoreFoundation 0x1a5039184 __exceptionPreprocess + 220
1 libobjc.A.dylib 0x1a4d83e04 objc_exception_throw + 60
2 CoreFoundation 0x1a510b16c -[__NSCFString characterAtIndex:].cold.1 + 0
3 CoreFoundation 0x1a5117f80 -[__NSDictionaryM setObject:forKey:].cold.3 + 0
4 CoreFoundation 0x1a4f718a0 -[__NSDictionaryM setObject:forKey:] + 904
5 UIKitCore 0x1cd159824 -[_UIMenuBarItem properties] + 124
6 UIKitMacHelper 0x1ba8711d8 UINSNSMenuItemFromUINSMenuItem + 96
7 UIKitMacHelper 0x1ba870edc _insertUINSMenuItemsIntoNSMenu + 852
8 UIKitMacHelper 0x1ba870934 UINSNSMenuFromUINSMenu + 152
9 UIKitMacHelper 0x1ba870804 -[UINSMenuController _createNSMenu:forContextMenu:] + 92
10 UIKitMacHelper 0x1ba8e2b28 -[UINSMenuController _prepareToShowContextMenu:activityItemsConfiguration:] + 144
11 UIKitMacHelper 0x1ba8e2488 -[UINSMenuController showContextMenu:inWindow:atLocationInWindow:activityItemsConfiguration:] + 312
12 libdispatch.dylib 0x1a4d265f0 _dispatch_call_block_and_release + 32
13 libdispatch.dylib 0x1a4d281b4 _dispatch_client_callout + 20
14 libdispatch.dylib 0x1a4d366cc _dispatch_main_queue_drain + 928
15 libdispatch.dylib 0x1a4d3631c _dispatch_main_queue_callback_4CF + 44
16 CoreFoundation 0x1a4ffaa1c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
17 CoreFoundation 0x1a4fb7ca8 __CFRunLoopRun + 2532
18 CoreFoundation 0x1a4fb6b24 CFRunLoopRunSpecific + 600
19 HIToolbox 0x1adbef338 RunCurrentEventLoopInMode + 292
20 HIToolbox 0x1adbef0b4 ReceiveNextEventCommon + 564
21 HIToolbox 0x1adbeee68 _BlockUntilNextEventMatchingListInModeWithFilter + 72
22 AppKit 0x1a7b1d78c _DPSNextEvent + 860
23 AppKit 0x1a7b1c084 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1328
24 AppKit 0x1a7b0e250 -[NSApplication run] + 596
25 AppKit 0x1a7adf96c NSApplicationMain + 1132
26 AppKit 0x1a7db5a80 +[NSWindow _savedFrameFromString:] + 0
27 UIKitMacHelper 0x1ba86e3b0 UINSApplicationMain + 1276
28 UIKitCore 0x1ccfe6b60 UIApplicationMain + 164
29 KeePassium 0x102c8ad98 0x102c84000 + 28056
30 dyld 0x10321908c start + 520
[Thanks, W]
This is a known macOS Monterey bug that has a workaround. Adding this to keep the issue in the queue.