{"id":6272,"date":"2014-04-15T08:19:50","date_gmt":"2014-04-15T08:19:50","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/15\/nscftimer-supportscontentdimensionvariables-crash-collection-of-common-programming-errors-2\/"},"modified":"2014-04-15T08:19:50","modified_gmt":"2014-04-15T08:19:50","slug":"nscftimer-supportscontentdimensionvariables-crash-collection-of-common-programming-errors-2","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/15\/nscftimer-supportscontentdimensionvariables-crash-collection-of-common-programming-errors-2\/","title":{"rendered":"NSCFTimer supportsContentDimensionVariables crash-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m getting an odd crash using a modal UIViewController that is managing a Zbar scanner.<\/p>\n<p>I&#8217;m displaying it:<\/p>\n<pre><code>UIViewController *viewController = [[self scannerManager] instantiateScannerViewController];\n[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];\n[self presentViewController:viewController animated:YES completion:NULL];\n<\/code><\/pre>\n<p>Then dismissing it:<\/p>\n<pre><code>[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];\n[self dismissViewControllerAnimated:YES completion:NULL];\n<\/code><\/pre>\n<p>The crash sometimes is :<\/p>\n<blockquote>\n<p><em>*<\/em> Terminating app due to uncaught exception &#8216;NSInvalidArgumentException&#8217;, reason: &#8216;-[__NSCFTimer _supportsContentDimensionVariables]: unrecognized selector sent to instance 0xb2e3b40&#8217;<\/p>\n<\/blockquote>\n<p>The crash sometimes is:<\/p>\n<blockquote>\n<p><em>*<\/em> Terminating app due to uncaught exception &#8216;NSGenericException&#8217;, reason: &#8216;Unable to install constraint on view. Does the constraint reference something from outside the subtree of the view? That&#8217;s illegal.<\/p>\n<\/blockquote>\n<pre><code>&gt;  constraint: h=--- v=--- UIView:0xb4257f0.midX == UITransitionView:0x1521ce50.midX&gt;\n&gt; view: clipsToBounds = YES; autoresize = H; layer = &gt;'\n<\/code><\/pre>\n<p>In tracking this down, it&#8217;s definitely related to an auto-layout message I get on the presenting UIViewController:<\/p>\n<blockquote>\n<p>All dependent constraints should have been removed from the engine and also from the view&#8217;s list of dependent constraints<\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m getting an odd crash using a modal UIViewController that is managing a Zbar scanner. I&#8217;m displaying it: UIViewController *viewController = [[self scannerManager] instantiateScannerViewController]; [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade]; [self presentViewController:viewController animated:YES completion:NULL]; Then dismissing it: [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade]; [self dismissViewControllerAnimated:YES completion:NULL]; The crash sometimes is : * Terminating app due to uncaught exception &#8216;NSInvalidArgumentException&#8217;, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6272","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6272"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6272\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}