Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Ribbit app Error signal SIGABRT

I just finished the Ribbit app videos, and last week I was capable of running the app. And now, I can't run

This is the error:

    return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));

in the console shows this

2015-06-02 12:10:59.600 Ribbit[1672:41250] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Cannot do a comparison query for type: (null)' *** First throw call stack: ( 0 CoreFoundation 0x000000010a053f35 exceptionPreprocess + 165 1 libobjc.A.dylib 0x0000000109cecbb7 objc_exception_throw + 45 2 CoreFoundation 0x000000010a053e6d +[NSException raise:format:] + 205 3 Ribbit 0x0000000106f16cf1 +[PFInternalUtils assertValidClassForQuery:] + 333 4 Ribbit 0x0000000106ef4349 -[PFQuery whereKey:equalTo:] + 86 5 Ribbit 0x0000000106ed42b6 -[InboxViewController viewWillAppear:] + 230 6 UIKit 0x00000001086be821 -[UIViewController _setViewAppearState:isAnimating:] + 487 7 UIKit 0x00000001086e9960 -[UINavigationController _startTransition:fromViewController:toViewController:] + 776 8 UIKit 0x00000001086ea487 -[UINavigationController _startDeferredTransitionIfNeeded:] + 523 9 UIKit 0x00000001086eaf47 -[UINavigationController __viewWillLayoutSubviews] + 43 10 UIKit 0x0000000108830509 -[UILayoutContainerView layoutSubviews] + 202 11 UIKit 0x000000010860e973 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 521 12 QuartzCore 0x000000010809ede8 -[CALayer layoutSublayers] + 150 13 QuartzCore 0x0000000108093a0e _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380 14 QuartzCore 0x000000010809387e _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24 15 QuartzCore 0x000000010800163e _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242 16 QuartzCore 0x000000010800274a _ZN2CA11Transaction6commitEv + 390 17 UIKit 0x000000010859354d -[UIApplication _reportMainSceneUpdateFinished:] + 44 18 UIKit 0x0000000108594238 -[UIApplication _runWithMainScene:transitionContext:completion:] + 2642 19 UIKit 0x0000000108592bf2 -[UIApplication workspaceDidEndTransaction:] + 179 20 FrontBoardServices 0x000000010d8362a3 __31-[FBSSerialQueue performAsync:]_block_invoke + 16 21 CoreFoundation 0x0000000109f8953c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 12 22 CoreFoundation 0x0000000109f7f285 __CFRunLoopDoBlocks + 341 23 CoreFoundation 0x0000000109f7f045 __CFRunLoopRun + 2389 24 CoreFoundation 0x0000000109f7e486 CFRunLoopRunSpecific + 470 25 UIKit 0x0000000108592669 -[UIApplication _run] + 413 26 UIKit 0x0000000108595420 UIApplicationMain + 1282 27 Ribbit 0x0000000106ed3953 main + 115 28 libdyld.dylib 0x000000010c05c145 start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException

2 Answers

The first line you have posted does not indicate where the error occurred, you will almost always end up there when your app crashes. In order to debug your code, the first thing you should do is adding an Exception breakpoint, set to All. This way, you might get more detailed information on why and where your error occurred whenever the app crashes.

The console info, however, points in the right direction. I don't know anything about your code, but my guess is that you are trying to use equalTo: with an object that is null at this point, hence the error:

NSInvalidArgumentException', reason: 'Cannot do a comparison query for type: (null)'

Does that help you?

Thanks Martin! I already solve, and you really help. The problem was trying to list the messages from a user that was null at the time. I just write a condition to check if the user isn't null and it worked. Thanks very much ;)

Great, glad that I could help. Also, good job with debugging and finding the error yourself! Don't forget to accept the answer :p