Skip to content

Crashing when using Pod, working fine if copied to project. #8

@rasmuslp

Description

@rasmuslp

Fair warning: I'm new to Obj-C and all that it entails.

I have made a minimum example here using CocoaPods: https://github.com/rasmuslp/AXStatusItemPopupCrash
Just download zip, open workspace, build/run, and press on cloud in menubar.
For me, this stalls on line 161:

        [_popover showRelativeToRect:self.frame ofView:self preferredEdge:NSMinYEdge];

With the message

2014-01-06 21:30:40.791 AXStatusItemPopupCrash[12696:303] -[NSLock view]: unrecognized selector sent to instance 0x6000000deca0
2014-01-06 21:30:40.792 AXStatusItemPopupCrash[12696:303] -[NSLock view]: unrecognized selector sent to instance 0x6000000deca0
2014-01-06 21:30:40.795 AXStatusItemPopupCrash[12696:303] (
    0   CoreFoundation                      0x00007fff8d71b41c __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x00007fff880f1e75 objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff8d71e2ed -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
    3   CoreFoundation                      0x00007fff8d6795b2 ___forwarding___ + 1010
    4   CoreFoundation                      0x00007fff8d679138 _CF_forwarding_prep_0 + 120
    5   AppKit                              0x00007fff926b83a2 -[NSPopover showRelativeToRect:ofView:preferredEdge:] + 172
    6   AXStatusItemPopupCrash              0x0000000100001d61 -[AXStatusItemPopup showPopoverAnimated:] + 513
    7   AXStatusItemPopupCrash              0x0000000100001b57 -[AXStatusItemPopup showPopover] + 55
    8   AXStatusItemPopupCrash              0x0000000100001655 -[AXStatusItemPopup mouseDown:] + 101
    9   AppKit                              0x00007fff92614d9a forwardMethod + 122
    10  AppKit                              0x00007fff92697373 -[NSControl mouseDown:] + 1080
    11  AppKit                              0x00007fff92618d08 -[NSWindow sendEvent:] + 11296
    12  AppKit                              0x00007fff9271411b -[NSStatusBarWindow sendEvent:] + 247
    13  AppKit                              0x00007fff92a8b461 -[NSStatusItemReplicant _retargetEvent:fromWindow:] + 765
    14  AppKit                              0x00007fff927140f5 -[NSStatusBarWindow sendEvent:] + 209
    15  AppKit                              0x00007fff925b7744 -[NSApplication sendEvent:] + 2021
    16  AppKit                              0x00007fff92407a29 -[NSApplication run] + 646
    17  AppKit                              0x00007fff923f2803 NSApplicationMain + 940
    18  AXStatusItemPopupCrash              0x0000000100001042 main + 34
    19  libdyld.dylib                       0x00007fff88ff75fd start + 1
)

Sometimes, instead of NSLock, I get the error on the runloop queue:

2014-01-06 21:32:41.093 AXStatusItemPopupCrash[12776:303] -[OS_dispatch_queue_runloop view]: unrecognized selector sent to instance 0x6080000ca100
<snip>

If I remove the Pod of AXStatusItemPopup, and add the two files to the root group of the project, then it works like expected. Hence, it seems to be related to the podspec or a consequence thereof.

Any idea whats going on here ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions