{"action":"opened","issue":{"url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/13058","repository_url":"https://api.github.com/repos/lionheart/openradar-mirror","labels_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/13058/labels{/name}","comments_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/13058/comments","events_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/13058/events","html_url":"https://github.com/lionheart/openradar-mirror/issues/13058","id":148865620,"number":13058,"title":"15413818: MFMessageComposeViewController crashes MessagesViewService when using UIEdgeInsets appearance","user":{"login":"openradar-mirror","id":13605213,"avatar_url":"https://avatars.githubusercontent.com/u/13605213?v=3","gravatar_id":"","url":"https://api.github.com/users/openradar-mirror","html_url":"https://github.com/openradar-mirror","followers_url":"https://api.github.com/users/openradar-mirror/followers","following_url":"https://api.github.com/users/openradar-mirror/following{/other_user}","gists_url":"https://api.github.com/users/openradar-mirror/gists{/gist_id}","starred_url":"https://api.github.com/users/openradar-mirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openradar-mirror/subscriptions","organizations_url":"https://api.github.com/users/openradar-mirror/orgs","repos_url":"https://api.github.com/users/openradar-mirror/repos","events_url":"https://api.github.com/users/openradar-mirror/events{/privacy}","received_events_url":"https://api.github.com/users/openradar-mirror/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/classification:crash","name":"classification:crash","color":"e11d21"},{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/reproducible:yes","name":"reproducible:yes","color":"5319e7"},{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/status:open","name":"status:open","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/lionheart/openradar-mirror/milestones/2","html_url":"https://github.com/lionheart/openradar-mirror/milestones/iOS","labels_url":"https://api.github.com/repos/lionheart/openradar-mirror/milestones/2/labels","id":1237416,"number":2,"title":"iOS","description":null,"creator":{"login":"openradar-mirror","id":13605213,"avatar_url":"https://avatars.githubusercontent.com/u/13605213?v=3","gravatar_id":"","url":"https://api.github.com/users/openradar-mirror","html_url":"https://github.com/openradar-mirror","followers_url":"https://api.github.com/users/openradar-mirror/followers","following_url":"https://api.github.com/users/openradar-mirror/following{/other_user}","gists_url":"https://api.github.com/users/openradar-mirror/gists{/gist_id}","starred_url":"https://api.github.com/users/openradar-mirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openradar-mirror/subscriptions","organizations_url":"https://api.github.com/users/openradar-mirror/orgs","repos_url":"https://api.github.com/users/openradar-mirror/repos","events_url":"https://api.github.com/users/openradar-mirror/events{/privacy}","received_events_url":"https://api.github.com/users/openradar-mirror/received_events","type":"User","site_admin":false},"open_issues":2153,"closed_issues":6,"state":"open","created_at":"2015-08-03T02:08:30Z","updated_at":"2016-04-16T16:01:04Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2016-04-16T16:01:04Z","updated_at":"2016-04-16T16:01:04Z","closed_at":null,"body":"#### Description\n\nSummary:\r\nIf you build an app with only 32 bit support and then run on a 64 bit device like a 5s and use MFMessageComposeViewController together with a UIEdgeInsets appearance setting the MessagesViewService will crash.\r\n\r\nSteps to Reproduce:\r\n1. Build included test app\r\n2. Run on 64 bit device\r\n\r\nExpected Results:\r\nShould show MFMessageComposeViewController\r\n\r\nActual Results:\r\nDoes not MFMessageComposeViewController and MessagesViewService crashes.\r\n\r\nVersion:\r\niOS 7.0.3\r\n\r\nSample app:\r\n\r\nAppDelegate.h:\r\n#import <UIKit/UIKit.h>\r\n\r\n@interface AppDelegate : UIResponder <UIApplicationDelegate>\r\n@property (strong, nonatomic) UIWindow *window;\r\n@end\r\n\r\n\r\nAppDelegate.m:\r\n// Compile with armv7, arm7s etc but exclude arm64. Then run on 64 bit device like 5s.\r\n\r\n// MFMessageComposeViewController seems to be a remote view controller handled by\r\n// MessagesViewService. The UIApperenace settings are replicated over to MessagesViewService\r\n// but there is some kind of mismatch for UIEdgeInsets apperance proprties.\r\n// MessagesViewService runs as 64 bit i guess.\r\n\r\n// app log:\r\n// init Error Domain=NSCocoaErrorDomain Code=4097 \"The operation couldn’t be completed. (Cocoa error 4097.)\"\r\n// Remote compose controller timed out (NO)!\r\n\r\n// console log:\r\n/*\r\nMessagesViewService[185] <Warning>: *** Assertion failure in -[_UIAppearanceRecorder _applyCustomizations](), /SourceCache/UIKit/UIKit-2903.2/UIAppearance.m:1877\r\nMessagesViewService[185] <Error>: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Illegal property type, {UIEdgeInsets=ffff}'\r\n*** First throw call stack:\r\n(0x182b7709c 0x18ea91d78 0x182b76f5c 0x1836a3420 0x185f5e938 0x186063a6c 0x185ff24f8 0x182b7b810 0x182a94dfc 0x182a99654 0x186047e64 0x182b7988c 0x182a994ec 0x182b7b810 0x182a94dfc 0x182a99654 0x18600f144 0x182b7988c 0x182a994ec 0x182b7b810 0x182a94dfc 0x182a99654 0x182b7988c 0x182a994ec 0x182b7b810 0x182a94dfc 0x18f06043c 0x18f0603fc 0x18f063578 0x182b36d64 0x182b350a4 0x182a75b78 0x188497830 0x185ab305c 0x100073d80 0x18f07baa0)\r\nReportCrash[186] <Notice>: ReportCrash acting against PID 185\r\nReportCrash[186] <Notice>: Formulating crash report for process MessagesViewService[185]\r\ncom.apple.launchd[1] (UIKitApplication:com.apple.mobilesms.compose[0x5c33][185]) <Warning>: (UIKitApplication:com.apple.mobilesms.compose[0x5c33]) Job appears to have crashed: Abort trap: 6\r\nApp[181] <Warning>: init Error Domain=NSCocoaErrorDomain Code=4097 \"The operation couldn’t be completed. (Cocoa error 4097.)\"\r\nApp[181] <Warning>: Remote compose controller timed out (NO)!\r\nbackboardd[31] <Warning>: Application 'UIKitApplication:com.apple.mobilesms.compose[0x5c33]' exited abnormally with signal 6: Abort trap: 6\r\nReportCrash[186] <Notice>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/MessagesViewService_2013-11-06-175025_iPhone.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0\r\n*/\r\n\r\n// MessageViewService crash backtrace:\r\n/*\r\n Last Exception Backtrace:\r\n 0   CoreFoundation                \t0x188b7b09c __exceptionPreprocess + 132\r\n 1   libobjc.A.dylib               \t0x194a95d78 objc_exception_throw + 60\r\n 2   CoreFoundation                \t0x188b7af5c +[NSException raise:format:arguments:] + 116\r\n 3   Foundation                    \t0x1896a7420 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 88\r\n 4   UIKit                         \t0x18bf62938 -[_UIAppearanceRecorder _applyCustomizations] + 2088\r\n 5   UIKit                         \t0x18c067a6c UIViewServiceUpdateAppearanceWithSerializedRepresentations + 404\r\n 6   UIKit                         \t0x18bff64f8 -[_UIViewServiceViewControllerOperator __createViewController:withAppearanceSerializedRepresentations:legacyAppearance:hostAccessibilityServerPort:canShowTextServices:replyHandler:] + 848\r\n 7   CoreFoundation                \t0x188b7f810 __invoking___ + 144\r\n 8   CoreFoundation                \t0x188a98dfc -[NSInvocation invoke] + 308\r\n 9   CoreFoundation                \t0x188a9d654 -[NSInvocation invokeWithTarget:] + 72\r\n 10  UIKit                         \t0x18c04be64 -[_UIViewServiceImplicitAnimationDecodingProxy forwardInvocation:] + 252\r\n 11  CoreFoundation                \t0x188b7d88c ___forwarding___ + 416\r\n 12  CoreFoundation                \t0x188a9d4ec __forwarding_prep_0___ + 92\r\n 13  CoreFoundation                \t0x188b7f810 __invoking___ + 144\r\n 14  CoreFoundation                \t0x188a98dfc -[NSInvocation invoke] + 308\r\n 15  CoreFoundation                \t0x188a9d654 -[NSInvocation invokeWithTarget:] + 72\r\n 16  UIKit                         \t0x18c013144 -[_UIQueueingProxy forwardInvocation:] + 344\r\n 17  CoreFoundation                \t0x188b7d88c ___forwarding___ + 416\r\n 18  CoreFoundation                \t0x188a9d4ec __forwarding_prep_0___ + 92\r\n 19  CoreFoundation                \t0x188b7f810 __invoking___ + 144\r\n 20  CoreFoundation                \t0x188a98dfc -[NSInvocation invoke] + 308\r\n 21  CoreFoundation                \t0x188a9d654 -[NSInvocation invokeWithTarget:] + 72\r\n 22  CoreFoundation                \t0x188b7d88c ___forwarding___ + 416\r\n 23  CoreFoundation                \t0x188a9d4ec __forwarding_prep_0___ + 92\r\n 24  CoreFoundation                \t0x188b7f810 __invoking___ + 144\r\n 25  CoreFoundation                \t0x188a98dfc -[NSInvocation invoke] + 308\r\n 26  libdispatch.dylib             \t0x19506443c _dispatch_call_block_and_release + 24\r\n 27  libdispatch.dylib             \t0x1950643fc _dispatch_client_callout + 16\r\n 28  libdispatch.dylib             \t0x195067578 _dispatch_main_queue_callback_4CF + 344\r\n 29  CoreFoundation                \t0x188b3ad64 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12\r\n 30  CoreFoundation                \t0x188b390a4 __CFRunLoopRun + 1452\r\n 31  CoreFoundation                \t0x188a79b78 CFRunLoopRunSpecific + 452\r\n 32  GraphicsServices              \t0x18e49b830 GSEventRunModal + 168\r\n 33  UIKit                         \t0x18bab705c UIApplicationMain + 1156\r\n 34  MessagesViewService           \t0x1000d3d80 0x1000d0000 + 15744\r\n 35  libdyld.dylib                 \t0x19507faa0 start + 4\r\n*/\r\n\r\n#import \"AppDelegate.h\"\r\n#import <MessageUI/MessageUI.h>\r\n\r\n@interface AppDelegate () <MFMessageComposeViewControllerDelegate>\r\n@end\r\n\r\n@implementation AppDelegate\r\n\r\n- (void)messageComposeViewController:(MFMessageComposeViewController *)controller\r\n                 didFinishWithResult:(MessageComposeResult)result\r\n{    \r\n    [controller dismissViewControllerAnimated:YES completion:NULL];\r\n}\r\n\r\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\r\n{\r\n    id appearance = [UIButton appearance];\r\n    [appearance setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];\r\n    \r\n    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];\r\n    [self.window  makeKeyAndVisible];\r\n    self.window.rootViewController = [[UINavigationController alloc]\r\n                                      initWithRootViewController:[[UIViewController alloc] init]];\r\n    \r\n    MFMessageComposeViewController *composerViewController = [[MFMessageComposeViewController alloc] init];\r\n    composerViewController.messageComposeDelegate = self;\r\n    [self.window.rootViewController presentViewController:composerViewController\r\n                                                 animated:YES\r\n                                               completion:NULL];\r\n\r\n    return YES;\r\n}\r\n\r\n@end\n\n-\nProduct Version: 7.0.3\nCreated: 2013-11-07T14:31:18.255012\nOriginated: 2013-11-07T00:00:00\nOpen Radar Link: http://www.openradar.me/15413818"}}