简体   繁体   中英

Methods that use convertPoint:fromLayer implicitly in Xamarin.iOS/MonoTouch

Can anybody give me clues as to which methods use convertPoint:fromLayer implicitly? Thank you very much in advance.

After the last update of my Xamarin.iOS app I get frequent crash reports from users that all look like the one below (UIButtonContent can be any other (possibly generated) type like UImage, __NSCFType, __NSCFDictionary, OS_voucher, etc.).

Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[UIButtonContent convertPoint:fromLayer:]: unrecognized selector sent to instance 0x145c52e0 at ObjCRuntime.Runtime.ThrowNSException (IntPtr ns_exception) [0x00000] in :0 at ObjCRuntime.Runtime.throw_ns_exception (IntPtr exc) [0x00000] in :0 at (wrapper native-to-managed) ObjCRuntime.Runtime:throw_ns_exception (intptr) at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr) at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00000] in :0 at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00000]

The cause of the crashes seems to be a memory management issue in my app (multiple posts found on this type of exception). However, I have trouble pinpointing the error in my app, because the error message points to code - convertPoint:fromLayer - I do not explicitly use myself.

Btw the problem seems to be iOS 8 specific. My app supports lower iOS versions, however crashes only occur on devices with iOS 8.

That methods would be ConvertPointFromLayer if you are using it from C#. And it would indicate that you are calling this method on a CALayer that is no longer in memory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM