(null) libc++abi.dylib: terminate called throwing an exception
Asked Answered
H

11

19

I use Xcode 4.5PR and iOS 6beta 2.

I didn't change any codes, my application throw an exception mentioned in the Title.

I used Debug Window which function caused this exception, but it showing

0x38dda960:  push   {r4, r5, r6, r7, lr}

How can I find a problem? How can I fix it?

Hereat answered 2/7, 2012 at 6:57 Comment(8)
put a breakpoint on all exceptions.Malefactor
CodaFi, thanks. I add breakpoints on all exceptions using debug window. And it stopped at the point mentioned above.Hereat
You wouldn't happen to be calling the method -setOpaque, would you?Malefactor
@CodaFi, Thanks for the quick response. I don't use setOpaque method, and I don't change opaque in StoryBoard either. This is my stack trace.It stopped at the second line 'libobjc.A.dylib`objc_exception_throw:' '0x38dda960: push {r4, r5, r6, r7, lr}'Hereat
No, a stack trace is like a list of methods that led to the crash. Like thisMalefactor
I had this same error when the only things in the stack were main and UIApplicationMain. Makes it difficult to trace.Torsi
I have the exact same problem 0x32745960: push {r4, r5, r6, r7, lr} it happen after upgrading to xcode to 4.6Halpern
Do you also see PFManagedObject_coerceValueForKeyWithDescription?Halpern
T
12

If you didn't change anything, this could just simply be related to the iOS 6 beta as it currently stands.

However, for those googling upon this error, here are some general suggestions:

1) It could be the simulator you've chosen to build the same code for :

If you haven't changed any source code, check to make sure your scheme is still pointing to the same simulator that it last worked on. (For example, trying to present a modal view controller (presentModalViewController:), but forgetting to conditionally use a popover for iPad, could cause this.)

2) If the stack trace and console are unhelpful :

Sometimes, the only things in the stack are main and UIApplicationMain, which makes it difficult to trace what went wrong in your own source. This is likely a sign that something is failing in a native framework method that you're calling or causing to be called.

If no method or specific object is listed in the console and the stack trace does not point to any methods from your own classes, try to narrow down the execution as close as you can to the point at which the exception is thrown. When picking breakpoints in the dark, I tend to use a binary search approach, picking a pivot point and moving up and down the execution order and picking a new "halfway" point as necessary.

Torsi answered 18/7, 2012 at 1:54 Comment(1)
Keith's answer is the real deal.Colatitude
S
20

Set a breakpoint on C++ exceptions to find where it's being thrown.

enter image description here

Steal answered 10/2, 2013 at 16:35 Comment(1)
This is life saver! Such break point let me identify real problem.Clearing
T
12

If you didn't change anything, this could just simply be related to the iOS 6 beta as it currently stands.

However, for those googling upon this error, here are some general suggestions:

1) It could be the simulator you've chosen to build the same code for :

If you haven't changed any source code, check to make sure your scheme is still pointing to the same simulator that it last worked on. (For example, trying to present a modal view controller (presentModalViewController:), but forgetting to conditionally use a popover for iPad, could cause this.)

2) If the stack trace and console are unhelpful :

Sometimes, the only things in the stack are main and UIApplicationMain, which makes it difficult to trace what went wrong in your own source. This is likely a sign that something is failing in a native framework method that you're calling or causing to be called.

If no method or specific object is listed in the console and the stack trace does not point to any methods from your own classes, try to narrow down the execution as close as you can to the point at which the exception is thrown. When picking breakpoints in the dark, I tend to use a binary search approach, picking a pivot point and moving up and down the execution order and picking a new "halfway" point as necessary.

Torsi answered 18/7, 2012 at 1:54 Comment(1)
Keith's answer is the real deal.Colatitude
S
0

Make sure you are using the developer preview version (4.5) of xcode and didn't by habit open the release version (4.3.3) and definitely have the iOS beta to match if you haven't updated the project settings you cannot run the app on iOS 6 beta after you update the project settings to iOS 6 the app will no longer run on iOS 5.x.x devices anymore one on the other.

Sundried answered 21/7, 2012 at 19:30 Comment(0)
R
0

It happens here when I set a contrain on an object i.s.o. asigning it to the superview

Revealment answered 17/9, 2012 at 10:26 Comment(0)
S
0

A reason for this error to arise...

I had this error after changing the name of some iboutlet variables in my .h and .m files but not in the storyboard links for these variables. After redoing the links, everything worked fine again. Hope this can help some of you.

Starnes answered 15/10, 2012 at 17:16 Comment(0)
B
0

Sometimes this can happen if you're simply missing a library - I was making a quick sample app with an MKMapView and had this error come up before I added MapKit.framework to my project.

Bezoar answered 29/11, 2012 at 3:48 Comment(0)
N
0

Some time problem occur when user import any framework so also import that framework in .pch file in resource folder of application.Hope this can help some of you.

Nabalas answered 24/12, 2012 at 11:10 Comment(0)
L
0

This was happening to me and went away when I set -ObjC in "Other Linker Flags"

Lexeme answered 17/6, 2013 at 15:47 Comment(0)
D
0

This exception can occur for variety of reasons. Best way to find the exact root cause is to look at console. There you will find text like this:

*** lorem ipsum lorem ipsum lorem ipsum
*** First throw call stack: (0x1d16012 0x16c3e7e 0xa4ef96 0x607704 0x6079a2 0x606876 0x617cb5 0x618beb 0x60a698 0x2b81df9 0x2b81ad0 0x1c8bbf5 0x1c8b962 0x1cbcbb6 0x1cbbf44 0x1cbbe1b 0x60617a 0x607ffc 0x1d1d 0x1c45) libc++abi.dylib: terminate called throwing an exception

Here text lorem ipsum before First throw call stack will pinpoint exact issue why exception is being thrown. Fix that problem and you are good to go.

Dusk answered 14/8, 2013 at 7:37 Comment(0)
P
0

This error is commonly seen when you manually delete your Storyboard from your project and repurpose your viewcontroller to be used without a storyboard. Make sure your view controller is added to the root view controller of your window in your AppDelegate and that the view controller init's without a nib name (since you would have deleted that when removing your storyboard) - AND MOST IMPORTANTLY remove the rows from your pList file that tell the application that a storyboard file should exist such as 'Main storyboard file base name (iPad)' or 'Main storyboard file base name (iPhone)'. Once those are gone your app will stop looking for a storyboard and you'll be golden like a golden retriever!

Philemon answered 20/5, 2014 at 13:57 Comment(0)
M
0

I got this stuck for quite a while, and then I found that I could get the EXACT trace stack of the exception by setting a breakpoint for all exceptions.

Moolah answered 6/12, 2014 at 9:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.