Our app opens an NSPopOver
, with content of an NSView
descendant which contains a complex UI, layed out with AutoLayout.
This works on OS X 10.10 for long; but we have discovered today it does not work on OS X 10.11.
The the below exception will be thrown:
=======================================================(inner most exception)===
(1) ObjCRuntime.RuntimeException
================================================================================
Thread ID : 1
Message:
"Cannot get the method descriptor for the selector '_original_setFrame:' on the type '...MarginBorderPaddingView', because the selector does not correspond to a method"
Properties:
RuntimeException.Code = "8007"
RuntimeException.Error = "True"
Stack Trace:
at Registrar.DynamicRegistrar.GetMethodNoThrow (System.Type original_type, System.Type type, System.String selector) <0x10e5e4d80 + 0x002b3> in <filename unknown>:0
at Registrar.DynamicRegistrar.GetMethodNoThrow (System.Type original_type, System.Type type, System.String selector) <0x10e5e4d80 + 0x000de> in <filename unknown>:0
at Registrar.DynamicRegistrar.GetMethodNoThrow (System.Type original_type, System.Type type, System.String selector) <0x10e5e4d80 + 0x000de> in <filename unknown>:0
at Registrar.DynamicRegistrar.GetMethodNoThrow (System.Type original_type, System.Type type, System.String selector) <0x10e5e4d80 + 0x000de> in <filename unknown>:0
at Registrar.DynamicRegistrar.GetMethodNoThrow (System.Type original_type, System.Type type, System.String selector) <0x10e5e4d80 + 0x000de> in <filename unknown>:0
at Registrar.DynamicRegistrar.GetMethodNoThrow (System.Type original_type, System.Type type, System.String selector) <0x10e5e4d80 + 0x000de> in <filename unknown>:0
at Registrar.DynamicRegistrar.GetMethodDescriptionAndObject (System.Type type, IntPtr selector, IntPtr obj, System.IntPtr& mthis) <0x10e5e6030 + 0x000ab> in <filename unknown>:0
at ObjCRuntime.Runtime.GetMethodAndObjectForSelector (IntPtr klass, IntPtr sel, IntPtr obj, System.IntPtr& mthis) <0x10e5e5fa0 + 0x0006e> in <filename unknown>:0
at ObjCRuntime.Runtime.get_method_and_object_for_selector (IntPtr cls, IntPtr sel, IntPtr obj, System.IntPtr& mthis) <0x10e5e5f30 + 0x00041> in <filename unknown>:0
at (wrapper native-to-managed) ObjCRuntime.Runtime:get_method_and_object_for_selector (intptr,intptr,intptr,intptr&)
at (wrapper managed-to-native) AppKit.NSApplication:NSApplicationMain (int,string[])
at AppKit.NSApplication.Main (System.String[] args) <0x10e5e4310 + 0x000c3> in <filename unknown>:0
at ...MainClass.Main (System.String[] args) <0x1022a4ea0 + 0x003f4> in <filename unknown>:0
================================================================================
This exception is thrown after NSPopOver.Show
is called, but not immediately (as visible from StackTrace). My guess would be an AutoLayout calculation would like to set the frame of smg, but via calling a private selector (!?) which probably has been removed in OS X 10.11. This is a blind guess, of course.
The MarginBorderPaddingView
in the exception is the direct content view of the NSPopOver
. (It is set via: popOverInstance.ContentViewController = new NSViewController(){ View = theMarginBorderPaddingView }
). So the _original_setFrame:
is tried to be called on this view.
This is all we could debug/figure out, we are stuck here.
Did anyone met similar?
Any advices how to debug this problem is appreciated!