Q:

macOS - Objects in Custom Framework throwing unrecognized selector error

I am creating a custom framework for the first time and I plan to use it in a plug-in.  Since it is not an app, I can't simply drag my custom framework in the application target's Embedded Binaries section.  Scraped together from different tutorials, I have performed the following steps:

Created additional copy files entry in the plugin target's build phase that adds my framework to the ./Frameworks path of my product. 
Added the framework in the target's Linked Binary with Libraries section
Added entry in the target's framework search paths in Build Settings

From there, my plugin's XCode project was able to successfully reference the classes I defined in my custom framework, as well as instantiate objects while running it in its respective host application.  However, upon instantiating one of my subclassed NSViewControllers defined in the framework, it soon crashed when I tried calling one of its methods.  According from the console, the reason was an unrecognized selector sent to instance <memory_address> abort() called, where the selector in question was a setter method that I called.  
I have used and defined subclassed NSViewControllers in my plugin projects before, just not from a framework.  I'm not sure whether my framework setup to my plugin project is the issue, or some nib loading strangeness.  Another weirdness I have observed is that, some of my NSViewController's properties were missing on random occassions, as in not listed in XCode's debugger.  When this happens, that's where my plugin crashes and tells me about the unrecognized selector issue.  Can anyone shed some light here?  
Thank you in advance.  

A:

It's likely that the memory address is pointing to some other kind of object, or chunk of deallocated memory.  Perhaps due to an over-release/under-retain somewhere.  Have you used NSZombies?  The Address Sanitizer?  I would believe the fact that this is in a plugin is actually irrelevant.