p0deje / Maccy

Lightweight clipboard manager for macOS
https://maccy.app
MIT License
11.94k stars 512 forks source link

Maccy keeps crashing #708

Closed f2404 closed 7 months ago

f2404 commented 7 months ago

Before Submitting Your Bug Report

Maccy Version (see 'About' window)

0.29.3

macOS Version

14.2.1

Maccy Settings

$ defaults read org.p0deje.Maccy
{
    "KeyboardShortcuts_popup" = "{\\"carbonModifiers\\":768,\\"carbonKeyCode\\":8}";
    "LaunchAtLogin__hasMigrated" = 1;
    "NSWindow Frame SUStatusFrame" = "1080 975 400 134 0 0 2560 1415 ";
    "NSWindow Frame com.sindresorhus.Preferences.FrameAutosaveName" = "1009 543 542 440 0 0 2560 1415 ";
    SUEnableAutomaticChecks = 1;
    SUHasLaunchedBefore = 1;
    SULastCheckTime = "2023-03-16 14:17:09 +0000";
    SUUpdateGroupIdentifier = 42899588;
    avoidTakingFocus = 1;
    enabledPasteboardTypes =     (
        "public.file-url",
        "public.png",
        "public.rtf",
        "public.utf8-plain-text",
        "public.html",
        "public.tiff"
    );
    ignoredPasteboardTypes =     (
        "com.typeit4me.clipping",
        "de.petermaurer.TransientPasteboardType",
        "com.agilebits.onepassword",
        "net.antelle.keeweb",
        "Pasteboard generator type"
    );
    migrations =     {
        "2020-04-25-allow-custom-ignored-types" = 1;
        "2020-06-19-use-keyboardshortcuts" = 1;
        "2020-09-01-ignore-keeweb" = 1;
        "2021-02-20-allow-to-customize-supported-types" = 1;
        "2021-06-28-add-title-to-history-item" = 1;
        "2021-10-16-remove-dynamic-pasteboard-types" = 1;
        "2022-08-01-rename-suppress-clear-alert" = 1;
        "2022-11-14-add-html-rtf-to-supported-types" = 1;
        "2023-01-22-add-regexp-search-mode" = 1;
    };
    pasteByDefault = 1;
}

Description

Maccy keeps crashing on me, please see the stack trace below. Please let me know if you need more info.

$ /Applications/Maccy.app/Contents/MacOS/Maccy
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSPopover showRelativeToRect:ofView:preferredEdge:]: view has no window. You must supply a view in a window.'
*** First throw call stack:
(
    0   CoreFoundation                      0x0000000184104570 __exceptionPreprocess + 176
    1   libobjc.A.dylib                     0x0000000183bf5eb4 objc_exception_throw + 60
    2   CoreFoundation                      0x0000000184104460 +[NSException exceptionWithName:reason:userInfo:] + 0
    3   AppKit                              0x0000000187aed228 -[NSPopover showRelativeToRect:ofView:preferredEdge:] + 244
    4   Maccy                               0x0000000104d7305c Maccy + 176220
    5   Maccy                               0x0000000104d6a774 Maccy + 141172
    6   Maccy                               0x0000000104d81ce4 Maccy + 236772
    7   libdispatch.dylib                   0x0000000183e0f860 _dispatch_block_async_invoke2 + 148
    8   libdispatch.dylib                   0x0000000183e00910 _dispatch_client_callout + 20
    9   libdispatch.dylib                   0x0000000183e03dc8 _dispatch_continuation_pop + 600
    10  libdispatch.dylib                   0x0000000183e17be4 _dispatch_source_latch_and_call + 420
    11  libdispatch.dylib                   0x0000000183e167b4 _dispatch_source_invoke + 832
    12  libdispatch.dylib                   0x0000000183e0eeb8 _dispatch_main_queue_drain + 744
    13  libdispatch.dylib                   0x0000000183e0ebc0 _dispatch_main_queue_callback_4CF + 44
    14  CoreFoundation                      0x00000001840d0ecc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
    15  CoreFoundation                      0x000000018408e7d0 __CFRunLoopRun + 1996
    16  CoreFoundation                      0x000000018408d9ac CFRunLoopRunSpecific + 608
    17  HIToolbox                           0x000000018e63c448 RunCurrentEventLoopInMode + 292
    18  HIToolbox                           0x000000018e63c284 ReceiveNextEventCommon + 648
    19  HIToolbox                           0x000000018e63bfdc _BlockUntilNextEventMatchingListInModeWithFilter + 76
    20  AppKit                              0x000000018786a8a4 _DPSNextEvent + 660
    21  AppKit                              0x0000000188044980 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
    22  AppKit                              0x0000000187e8dd0c -[NSMenuTrackingSession startRunningMenuEventLoop:] + 160
    23  AppKit                              0x00000001885c3308 -[NSContextMenuTrackingSession startMonitoringEventsInMode:] + 76
    24  AppKit                              0x0000000187e47220 +[NSContextMenuImpl presentPopup:fromView:withContext:animated:] + 640
    25  AppKit                              0x00000001880701f4 _NSPopUpMenu + 2104
    26  AppKit                              0x000000018806f8e8 -[NSCocoaMenuImpl popUpMenu:atLocation:width:view:selectedItemIndexProvider:font:positioningRect:flags:options:] + 432
    27  AppKit                              0x000000018806f710 -[NSCocoaMenuImpl popUpMenu:atLocation:width:forView:withSelectedItem:withFont:withFlags:withOptions:] + 96
    28  AppKit                              0x0000000188037f4c +[NSStatusBarButtonCell popUpStatusBarMenu:ofItem:ofBar:inRect:ofView:withEvent:] + 320
    29  AppKit                              0x00000001880378a4 -[NSStatusBarButtonCell performClick:] + 188
    30  Maccy                               0x0000000104d86074 Maccy + 254068
    31  Maccy                               0x0000000104d83db0 Maccy + 245168
    32  Maccy                               0x0000000104d8855c Maccy + 263516
    33  Maccy                               0x0000000104d52090 Maccy + 41104
    34  Maccy                               0x0000000104d81cac Maccy + 236716
    35  Foundation                          0x00000001851d0b98 __NSFireTimer + 104
    36  CoreFoundation                      0x00000001840aba20 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32
    37  CoreFoundation                      0x00000001840ab6c8 __CFRunLoopDoTimer + 972
    38  CoreFoundation                      0x00000001840ab200 __CFRunLoopDoTimers + 356
    39  CoreFoundation                      0x000000018408e744 __CFRunLoopRun + 1856
    40  CoreFoundation                      0x000000018408d9ac CFRunLoopRunSpecific + 608
    41  HIToolbox                           0x000000018e63c448 RunCurrentEventLoopInMode + 292
    42  HIToolbox                           0x000000018e63c284 ReceiveNextEventCommon + 648
    43  HIToolbox                           0x000000018e63bfdc _BlockUntilNextEventMatchingListInModeWithFilter + 76
    44  AppKit                              0x000000018786a8a4 _DPSNextEvent + 660
    45  AppKit                              0x0000000188044980 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
    46  AppKit                              0x000000018785dd50 -[NSApplication run] + 476
    47  AppKit                              0x0000000187835014 NSApplicationMain + 880
    48  Maccy                               0x0000000104d4cba4 Maccy + 19364
    49  dyld                                0x0000000183c310e0 start + 2360
)
libc++abi: terminating due to uncaught exception of type NSException
Abort trap: 6

Steps to Reproduce

  1. Run Maccy
  2. Open the dropdown with saved clipboard entries
  3. Hover the mouse cursor over an item in the list for a second
  4. Maccy crashes
p0deje commented 7 months ago

@f2404 Can you please record a video showing the problem?

f2404 commented 7 months ago

@p0deje Here you go. This time, I clicked the search icon, but last time, I don't think I did, I just scrolled the list up and down. The stack traces were identical in both cases.

https://github.com/p0deje/Maccy/assets/14939413/5a4f0c06-e6cb-4c18-ba3b-0b5b0b73eab8

p0deje commented 7 months ago

Hmm, this looks strange, I will take a closer look. On Jan 22, 2024, at 15:21, Igor @.***> wrote: @p0deje Here you go. This time, I clicked the search icon, but last time, I don't think I did, I just scrolled the list up and down. The stack trace was identical in both cases. https://github.com/p0deje/Maccy/assets/14939413/5a4f0c06-e6cb-4c18-ba3b-0b5b0b73eab8

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

f2404 commented 7 months ago

@p0deje I seem to have found the steps that 100% reproduce the crash for me:

  1. open the dropdown
  2. hover the mouse cursor over the 1st item in the list for a moment
  3. move the mouse cursor over the search field
  4. crash
p0deje commented 7 months ago

Still cannot reproduce, I'll see if there is a way to make code more reliable and avoid such a crash.

p0deje commented 7 months ago

@f2404 Can you please try on a 0.29.4 version?

f2404 commented 7 months ago

@f2404 Can you please try on a 0.29.4 version?

Can't reproduce it on 0.29.4.

I think I've been using an older version, not 0.29.3 as I stated before... had to run brew upgrade -g to make it upgrade Maccy. I'll close the issue, sorry about the noise.