Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 7    Views: 1097

Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
04/06/14 07:04 PM (10 years ago)

Strange Xcode error, cannot trace it

I just tried my messenger menu in the scringo section of my app, and it crashes the app. As far as I can tell, I something has the wrong priority set, but I cannot decipher what it is, or where to set the priority. Google only shows 2 results, neither of which are helpful for this error (although I can't even tell which file or object it's referring to): Mutating a priority from required to not on an installed constraint (or vice-versa) is not supported. You passed priority 500 and the existing priority was 1000.' Here is the error log: 2014-04-06 21:54:23.811 universal[575:60b] Scringo - Opening Scringo's Menu 2014-04-06 21:54:24.138 universal[575:60b] Scringo - No apps yet, or feature disabled - no use in showing this side-bar item 2014-04-06 21:54:24.655 universal[575:60b] Cr_html_pro: fadeOutOnExit (super): 2014-04-06 21:54:24.688 universal[575:60b] Scringo - Not sending a page. offset is 166, ids left -83 2014-04-06 21:54:24.698 universal[575:60b] universal_appDelegate: supportedInterfaceOrientationsForWindow 2014-04-06 21:54:24.779 universal[575:60b] universal_appDelegate: supportedInterfaceOrientationsForWindow 2014-04-06 21:54:26.373 universal[575:60b] Scringo - Dynamically loaded library at /System/Library/Frameworks/QuartzCore.framework/QuartzCore 2014-04-06 21:54:26.375 universal[575:60b] *** Assertion failure in -[NSLayoutConstraint setPriority:], /SourceCache/Foundation/Foundation-1047.25/Layout.subproj/NSLayoutConstraint.m:154 2014-04-06 21:54:26.376 universal[575:60b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Mutating a priority from required to not on an installed constraint (or vice-versa) is not supported. You passed priority 500 and the existing priority was 1000.' *** First throw call stack: (0x2e7fbf03 0x38f90ce7 0x2e7fbdd5 0x2f1a8e2f 0x2f169d1f 0x34e123 0x34e083 0x310ff873 0x310fee39 0x310fec95 0x310feafd 0x3118c3c7 0x34ba81 0x3102fa53 0x3102f811 0x311bbc13 0x310d948f 0x310d9299 0x310d9231 0x3102b305 0x30ca731b 0x30ca2b3f 0x30ca29d1 0x30ca23e5 0x30ca21f7 0x30c9bf1d 0x2e7c7031 0x2e7c49bf 0x2e7c4d0b 0x2e72f7a9 0x2e72f58b 0x3369c6d3 0x3108e891 0xac795 0x3948eab7) libc++abi.dylib: terminating with uncaught exception of type NSException I'd even be happy removing the messenger option from the scringo menu, but cant even seem to tell which file to edit to do that, lol
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
04/06/14 10:03 PM (10 years ago)
Dude -- you just released that app ... put that keyboard down! ... hahaha :-)
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
04/06/14 10:04 PM (10 years ago)
Yeah, but the error is in the release! lol
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
04/06/14 11:57 PM (10 years ago)
Figured it out. Reuploading the fixed binary to Apple as we speak. For anyone else that ever encounters it, it was a very obscure error. One of my plugins, Motion View (used for the ride speed radar gun) had a file with code that made Scringo messenger crash because it was setting the view priority ahead of scringos. I commented out the conflicting code from the file BTM_UIView+Localizable.m not sure of the resulting adverse effect, if any, since everything in the motion view plugin still seems to work, but here is the code I commented out to fix the conflict: /* if ([self.class isSubclassOfClass:[UIButton class]]) { UIButton *view = (UIButton *)self; NSString *str = NSLocalizedString(view.titleLabel.text, nil); if(self.fontName.length) { view.titleLabel.font = [UIFont fontWithName:view.fontName size:view.titleLabel.font.pointSize]; } [view setTitle:str forState:UIControlStateNormal]; } else if ([self.class isSubclassOfClass:[UILabel class]]) { UILabel *view = (UILabel *)self; if(self.fontName.length) { view.font = [UIFont fontWithName:view.fontName size:view.font.pointSize]; } NSString *str = NSLocalizedString([view text], nil); str = [str stringByReplacingOccurrencesOfString:@"{newline}" withString:@"\n"]; view.text = str; } else if([self.class isSubclassOfClass:[UITabBar class]]) { UITabBar *view = (UITabBar*)self; for (UITabBarItem *item in view.items) { item.title = NSLocalizedString(item.title,nil); } } else if([self.class isSubclassOfClass:[UITextField class]]) { UITextField *view = (UITextField*)self; if (![view.text isEqualToString:@""]) { NSString *str = NSLocalizedString(view.text, nil);; view.text = str; } if(self.fontName.length) { view.font = [UIFont fontWithName:view.fontName size:view.font.pointSize]; } view.placeholder = NSLocalizedString(view.placeholder, nil); } else if([self.class isSubclassOfClass:[UITextView class]]) { UITextView *view = (UITextView*)self; NSString *str = NSLocalizedString(view.text, nil); str = [str stringByReplacingOccurrencesOfString:@"{newline}" withString:@"\n"]; view.text = str; if(self.fontName.length) { view.font = [UIFont fontWithName:view.fontName size:view.font.pointSize]; } } else if([self.class isSubclassOfClass:[UINavigationBar class]]) { UINavigationBar *view = (UINavigationBar *)self; view.topItem.title = NSLocalizedString(view.topItem.title, nil); } else if(![self.class isSubclassOfClass:[UIImageView class]] && ![self.class isSubclassOfClass:[UIScrollView class]] && ![self.class isSubclassOfClass:[UITableViewCell class]]) { } */
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
04/07/14 12:16 AM (10 years ago)
Nice sleuthing ! Now go to sleep ... :-)
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
04/07/14 12:19 AM (10 years ago)
Sleep? What's that? lol
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
04/07/14 02:21 PM (10 years ago)
You should give the guy who made that motion view plugin a piece of your mind! But glad you figured it out :-) David https://btmods.com/chat/
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
04/07/14 02:25 PM (10 years ago)
Yeah, I'll give him hell... he hasn't helped me at all with anything (insert implied sarcasm here), haha ;)
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.