Yann86
Yann86

Reputation: 1017

Unable to understand crash report

anyone can help me to understand this crash log. This crash seems to be aleatory and I can't reproduce it on my test devices. Thanks

Thread : Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x2faa6f0b __exceptionPreprocess + 130
1  libobjc.A.dylib                0x3a56dce7 objc_exception_throw + 38
2  CoreFoundation                 0x2faaa837 -[NSObject(NSObject) doesNotRecognizeSelector:] + 202
3  CoreFoundation                 0x2faa9137 ___forwarding___ + 706
4  CoreFoundation                 0x2f9f8098 _CF_forwarding_prep_0 + 24
5  UIKit                          0x322e58b7 -[UILabel _shadow] + 38
6  UIKit                          0x32355557 -[UILabel drawTextInRect:] + 66
7  UIKit                          0x3235550b -[UILabel drawRect:] + 78
8  UIKit                          0x323554a9 -[UIView(CALayerDelegate) drawLayer:inContext:] + 372
9  QuartzCore                     0x31f81189 -[CALayer drawInContext:] + 100
10 QuartzCore                     0x31f6ac5b CABackingStoreUpdate_ + 1858
11 QuartzCore                     0x32046c1d ___ZN2CA5Layer8display_Ev_block_invoke + 52
12 QuartzCore                     0x31f6a50b x_blame_allocations + 82
13 QuartzCore                     0x31f6a1bf CA::Layer::display_() + 1118
14 QuartzCore                     0x31f4dd41 CA::Layer::display_if_needed(CA::Transaction*) + 208
15 QuartzCore                     0x31f4d9d9 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 24
16 QuartzCore                     0x31f4d3e5 CA::Context::commit_transaction(CA::Transaction*) + 228
17 QuartzCore                     0x31f4d1f7 CA::Transaction::commit() + 314
18 QuartzCore                     0x31f46f1d CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 56
19 CoreFoundation                 0x2fa72039 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
20 CoreFoundation                 0x2fa6f9c7 __CFRunLoopDoObservers
21 CoreFoundation                 0x2fa6fd13 __CFRunLoopRun + 738
22 CoreFoundation                 0x2f9da769 CFRunLoopRunSpecific + 524
23 CoreFoundation                 0x2f9da54b CFRunLoopRunInMode + 106
24 GraphicsServices               0x349046d3 GSEventRunModal + 138
25 UIKit                          0x32339891 UIApplicationMain + 1136
26 Oremia Mobile HD               0x00110ee7 main (main.mm:16)
27 libdyld.dylib                  0x3aa6bab7 start + 2

Upvotes: 0

Views: 367

Answers (4)

Timur Kuchkarov
Timur Kuchkarov

Reputation: 1155

Looks like you've set label's text(which seems to come from some web service) to [NSNull null]. Check the response and also put a breakpoint before you are setting text to that label and see what you are actually trying to set. This may be in some method which is used as observer callback.

Upvotes: 0

Hussain Shabbir
Hussain Shabbir

Reputation: 14995

The crash is happening due to invalid data is passing inside this drawTextInRect method, just put the breakpoint and check. And if still it does not work then enable NSZombie in the xcode setting and then check the console log.

Upvotes: 0

Keenle
Keenle

Reputation: 12190

It is just a guess since there is not enough info about what are you doing in the code. Anyway from the back trace I can assume that you receiving/fetching some data from somewhere, then you parse the received data and try to render it in a view. The object that you pass to the view has some property that you assign to your label, incidentally the property contains NSNull object instead of valid NSString/NSAttributed string that should be passed to the UILabel. So when UILabel sent length message to NSNull you receive the crash.

So probably you converter set NSNull for properties that are not received or blank.

Try to put a breakpoint at place were you set the views data and see if any property has NSNull instead of valid string.

Upvotes: 1

Igor
Igor

Reputation: 61

Somewhere you call length method to NSNull object which does not have this method.

-[NSNull length]: unrecognized selector sent to instance 0x3ad30a60

Upvotes: 0

Related Questions