As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
When i log a dictionary for example i get a output like this:
2013-04-18 16:24:45.905 pathFinderTest[9650:c07] -[__NSCFDictionary length]: unrecognized selector sent to instance 0x9271ee0
2013-04-18 16:24:45.912 pathFinderTest[9650:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary length]: unrecognized selector sent to instance 0x9271ee0'
*** First throw call stack:
(0x1c91012 0x10cee7e 0x1d1c4bd 0x1c80bbc 0x1c8094e 0x1c07c36 0x1c5113c 0x1cb64b6 0xb3c60a 0xb3c57c 0x2af7 0x28f8 0xf41c7 0xf4232 0x433d5 0x4376f 0x43905 0x4c917 0x25a5 0x10157 0x10747 0x1194b 0x22cb5 0x23beb 0x15698 0x1becdf9 0x1becad0 0x1c06bf5 0x1c06962 0x1c37bb6 0x1c36f44 0x1c36e1b 0x1117a 0x12ffc 0x22dd 0x2205)
libc++abi.dylib: terminate called throwing an exception
(lldb)
Now i know where the error was and in what file. But what if i didn't?
I'm used to java where it points to the correct file and the corresponding line number. Not that that is always the line where the problem is but often it is a good direction.
If you run the app using the debugger, when you encounter an exception, the Xcode debugger will show a stack trace. This will point you at the exact file and line in your app that caused the problem.
If this isn't happening then do the following in Xcode:
View the breakpoints pane on the left side of Xcode
Tap the + button in the bottom left corner and choose "Add Exception Breakpoint"
A new breakpoint appears along with a dialog. Accept the defaults and click on Done
Right-click on the exception and select "Move Breakpoint to" and choose "User"
Now debug your app and cause an exception. You should now get a useful stack trace in the debugger whenever you encounter an exception.
Related
The following is the exception I get from iOS. It looks ridiculously unreadable (my brain is screaming wtf ten thousand miles per second). So this can’t be right. When I am developing for android, and I get an exception, the stack trace is completely readable, no magic such as 0x187d27bc8. So am I looking at the wrong window? Where in Xcode to I go to find a readable version of my stack trace? In eclipse there is a line number I can click on to get to the exact line that caused the error.
* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]'
*** First throw call stack:
(0x1835a6084 0x193b840e4 0x18348f300 0x18349b5b8 0x100185c94 0x100185af4 0x10009f7b4 0x10009ede4 0x10009ec9c 0x10006c5a0 0x1882f32b8 0x10006c358 0x187d5d2f4 0x187d4644c 0x187d5cc90 0x187d1c724 0x187d567b8 0x187d55e58 0x187d29660 0x187fc7d6c 0x187d27bc8 0x18355e324 0x18355d5c8 0x18355b678 0x183489664 0x18c5cb5a4 0x187d8e984 0x100139854 0x1941f2a08)
libc++abi.dylib: terminating with uncaught exception of type NSException
In your menu bar go to: Debug -> BreakPoints -> Create Exception BreakPoints. And that should do it. So the next time you run the code, it will stop at the line that caused the exception. And then to the left, you should see the stack trace.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I got this error while running my app for test:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]'
*** First throw call stack:
(0x30d48fd3 0x3b5c1ccf 0x30c82a8b 0x30c8c391 0x1038ab 0x335d45a7 0x335d3efb 0x335ce58b 0x3356a709 0x33569871 0x335cdcc9 0x35bd6aed 0x35bd66d7 0x30d13ab7 0x30d13a53 0x30d12227 0x30c7cf0f 0x30c7ccf3 0x335ccef1 0x335c816d 0x1053c1 0x3baceab7)
libc++abi.dylib: terminating with uncaught exception of type NSException
Causing the app to crash
Without more context, it'll be tough to give a good answer. That said, inserting a nil object into an NSArray-type class (including NSMutableArray) will cause an e exception to be thrown. If you need an "empty" value in an array, use [NSNull null].
To debug this, try enabling an exception breakpoint in Xcode. Here's how:
On the lefthand panel, choose the second icon from the right. That's the breakpoints panel.
On the bottom corner, there's a little plus. Click it.
In the menu, choose "Add Exception Breakpoint"
Run your code. When it crashes, it'll show you the line that's crashing, as well as a stack trace.
You are trying to insert a nil object. If you want to add nill object you should add as following. You can't add it directly
[array addObject:[NSNull null]];
You can't add nil to an array (as it holds pointers to the objects) so it crashes. If you need to store nil in an NSArray use NSNull which simply wraps nil into an array.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I'm new to Objective-C and to programming to be honest. Working on a bit of a project and have had the following returned when I try and use the Parse quickstart. Any suggestions?
2013-08-21 21:47:41.388 ParseStarterProject[3284:c07] * Terminating
app due to uncaught exception 'NSInvalidArgumentException', reason:
'cannot setReadAccess for unsaved user'
* First throw call stack: (0x21f4012 0x1d27e7e 0x21f3deb 0x35057 0x3555d 0xaa33 0x32a5 0x2f76 0x3332 0xac5c 0x2e00 0xf761c7 0xf76232
0xec53d5 0xec5cc1 0x2636 0xe92157 0xe92747 0xe9394b 0xea4cb5 0xea5beb
0xe97698 0x214fdf9 0x214fad0 0x2169bf5 0x2169962 0x219abb6 0x2199f44
0x2199e1b 0xe9317a 0xe94ffc 0x2495 0x2395) libc++abi.dylib: terminate
called throwing an exception (lldb)
The Parse SDK is throwing an exception. From the error message, it looks like the problem is that you're sending -setReadAccess for an unsaved user. That makes sense -- it'd probably be difficult to read from an user object that hasn't yet been saved.
I'm just a newcomer in developing. I use xCode 4.6.3 and iOS 6 SDK.
While I run my project, it crashes and I can see that:"Program received signal SIGABRT".
Please, give me some solutions of that problem.
Maybe, I'm stupid, but I do it about month.
[ISTableViewController topViewController]: unrecognized selector sent to instance 0x848b550'
* First throw call stack:
(0x1d73012 0x1526e7e 0x1dfe4bd 0x1d62bbc 0x1d6294e 0x2c58 0x158157 0x158747 0x15994b 0x16acb5 0x16bbeb 0x15d698 0x1893df9 0x1893ad0 0x1ce8bf5 0x1ce8962 0x1d19bb6 0x1d18f44 0x1d18e1b 0x15917a 0x15affc 0x2b7d 0x2aa5 0x1)
libc++abi.dylib: terminate called throwing an exception
sharedlibrary apply-load-rules all
Current language: auto; currently objective-c
(gdb)
like #Abizern says check your ISTableViewController whether it implements the topViewController. Probably you were trying to do a [UIViewController topViewController].
You need to do self.navigationController.topViewController. self.navigationController can change depending on your implementation.
The problem is explained by the crash report here:
[ISTableViewController topViewController]: unrecognized selector sent to instance
You are sending the method topViewController to an object that does not implement the method.
Which means somewhere in your code (not in what you have shown here) you are sending a message to an object which is not what you think it is.
This question already has an answer here:
setAnnotation - unrecognized selector
(1 answer)
Closed 8 years ago.
2013-03-14 18:06:09.727 IPAD[5341:907] -[REVClusterPin setAnnotation:]: unrecognized selector sent to instance 0x1fe6a8b0
2013-03-14 18:06:09.729 IPAD[5341:907] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[REVClusterPin setAnnotation:]: unrecognized selector sent to instance 0x1fe6a8b0'
* First throw call stack:
(0x32f432a3 0x3addc97f 0x32f46e07 0x32f45531 0x32e9cf68 0x33d5f18b 0x33d5eeb1 0x33d5bac7 0x33d5eb1b 0xc017d 0xcf419 0x34d6a595
One of the most problems if an app is running in simulator and not on device is that the simulator is not case sensitive with files from bundle. So please check if a image file is named like "Test.png" and in code you maybe write test.png. This is working in simulator but not not on device.
Hope this helps.