sindresorhus / Settings

⚙ Add a settings window to your macOS app in minutes
MIT License
1.43k stars 100 forks source link

Function signature specialization <Arg[0] = Owned To Guaranteed, Arg[1] = Owned To Guaranteed> error #63

Open teologov opened 3 years ago

teologov commented 3 years ago

Hi, I've just replaced the MASPreferences with your package, amazing work! It works perfectly on macOS Big Sur 11.0.1.

But I've faced with next issue when I open the preferences window on macOS Catalina 10.15.6. My app crashes with this error:

function signature specialization <Arg[0] = Owned To Guaranteed, Arg[1] = Owned To Guaranteed> of SnipperApp_2.GeneralPreferencesController.init(nibName: Swift.String?, bundle: __C.NSBundle?) -> SnipperApp_2.GeneralPreferencesController GeneralPreferencesController.swift:0
SnipperApp 2
@objc SnipperApp_2.GeneralPreferencesController.init(nibName: Swift.String?, bundle: __C.NSBundle?) -> SnipperApp_2.GeneralPreferencesController <compiler-generated>:0
SnipperApp 2
SnipperApp_2.AppDelegate.preferencesWindowController.getter : Preferences.PreferencesWindowController <compiler-generated>:0
SnipperApp 2
function signature specialization <Arg[0] = Dead> of SnipperApp_2.AppDelegate.showPreferences(Swift.AnyObject) -> () AppDelegate.swift:420
SnipperApp 2
merged @objc SnipperApp_2.AppDelegate.showPreferences(Swift.AnyObject) -> ()
AppKit
-[NSApplication(NSResponder) sendAction:to:from:]
AppKit
-[NSMenuItem _corePerformAction]
AppKit
-[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:]
AppKit
-[NSMenu performActionForItemAtIndex:]
AppKit
-[NSMenu _internalPerformActionForItemAtIndex:]
AppKit
-[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:]
AppKit
NSSLMMenuEventHandler
HIToolbox
DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*)
HIToolbox
SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*)
HIToolbox
SendEventToEventTarget
HIToolbox
SendHICommandEvent(unsigned int, HICommand const*, unsigned int, unsigned int, unsigned char, void const*, OpaqueEventTargetRef*, OpaqueEventTargetRef*, OpaqueEventRef**)
HIToolbox
SendMenuCommandWithContextAndModifiers
HIToolbox
SendMenuItemSelectedEvent
HIToolbox
FinishMenuSelection(SelectionData*, MenuResult*, MenuResult*)
HIToolbox
MenuSelectCore(MenuData*, Point, double, unsigned int, OpaqueMenuRef**, unsigned short*)
HIToolbox
_HandleMenuSelection2
AppKit
_NSHandleCarbonMenuEvent
AppKit
_DPSEventHandledByCarbon
AppKit
-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
AppKit
-[NSApplication run]
AppKit
NSApplicationMain
SnipperApp 2
main AppDelegate.swift:32
libdyld.dylib
start

Preferences version: 2.1.0, installed via cocoapods.

sindresorhus commented 3 years ago

Looks like a problem with loading your bundle. I don't think this is a problem with Preferences though. I recommend trying to do some debugging with breakpoints to try to track it down.

teologov commented 3 years ago

Looks like a problem with loading your bundle. I don't think this is a problem with Preferences though. I recommend trying to do some debugging with breakpoints to try to track it down.

@sindresorhus thanks for the reply! Ok, I'll debug it to get some more details.