I recently added QuincyKit (a crash log reporter that sits on top of PLCrashReporter) into an app and I received a crash log that I'm having trouble interpreting.
The crash log seems to be inconsistent - it says it was thread 0 that crashed, but the "Last Exception Backtrace" doesn't match with the thread 0 callstack. The last exception points to a table method, but thread 0 callstack indicates an abort occurred during the Quincy manager initialization.
Moreover, the "Last Exception Backtrace" doesn't seem to make much sense taken on it's own - the "canEditRowAtIndexPath" method doesn't even include a call to "removeObjectAtIndex" at all (see below for the method).
Can anyone shed any light onto whether or not I should be paying attention to the "Last Exception Backtrace" or is that a red herring, and I should really be looking into why PLCrashReporter aborted during start up?
Many thanks
Crash log excerpt:
Exception Type: SIGABRT
Exception Codes: #0 at 0x38362df0
Crashed Thread: 0
Application Specific Information:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 7 beyond bounds [0 .. 6]'
Last Exception Backtrace:
0 CoreFoundation 0x29920fef <redacted> + 126
1 libobjc.A.dylib 0x37d0cc8b objc_exception_throw + 38
2 CoreFoundation 0x29833821 -[__NSArrayM removeObjectAtIndex:] + 0
3 DART 0x000906b3 -[DeliveryComplete tableView:canEditRowAtIndexPath:] + 262
4 UIKit 0x2d0a3c25 -[UITableView _canEditRowAtIndexPath:] + 60
5 UIKit 0x2d0a3a7f -[UITableView _setupCell:forEditing:atIndexPath:animated:updateSeparators:] + 130
6 UIKit 0x2d0a1179 <redacted> + 2320
7 UIKit 0x2cf82a31 +[UIView performWithoutAnimation:] + 72
8 UIKit 0x2d0a0861 -[UITableView _configureCellForDisplay:forIndexPath:] + 336
9 UIKit 0x2d246383 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 498
10 UIKit 0x2d24642f -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 54
11 UIKit 0x2d23b013 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2258
12 UIKit 0x2d049657 -[UITableView layoutSubviews] + 186
13 UIKit 0x2cf73023 -[UIView layoutSublayersOfLayer:] + 546
14 QuartzCore 0x2c993d99 -[CALayer layoutSublayers] + 128
15 QuartzCore 0x2c98f5cd <redacted> + 360
16 QuartzCore 0x2c98f455 <redacted> + 16
17 QuartzCore 0x2c98edf1 <redacted> + 224
18 QuartzCore 0x2c98ebdf <redacted> + 434
19 UIKit 0x2cf6b23b <redacted> + 126
20 CoreFoundation 0x298e6fed <redacted> + 20
21 CoreFoundation 0x298e46ab <redacted> + 278
22 CoreFoundation 0x298e4ab3 <redacted> + 914
23 CoreFoundation 0x29831201 CFRunLoopRunSpecific + 476
24 CoreFoundation 0x29831013 CFRunLoopRunInMode + 106
25 GraphicsServices 0x3100d201 GSEventRunModal + 136
26 UIKit 0x2cfd5a59 UIApplicationMain + 1440
27 DART 0x00015491 _mh_execute_header + 25745
28 libdyld.dylib 0x38298aaf <redacted> + 2
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x38362df0 __pthread_kill + 8
1 libsystem_c.dylib 0x382fe909 abort + 76
2 DART 0x00122dd7 -[PLCrashReporter enableCrashReporterAndReturnError:] + 1294
3 CoreFoundation 0x2992131f <redacted> + 630
4 libobjc.A.dylib 0x37d0cf13 <redacted> + 174
5 libc++abi.dylib 0x37643de3 <redacted> + 78
6 libc++abi.dylib 0x376438af __cxa_rethrow + 102
7 libobjc.A.dylib 0x37d0cdd3 objc_exception_rethrow + 42
8 CoreFoundation 0x2983129d CFRunLoopRunSpecific + 632
9 CoreFoundation 0x29831013 CFRunLoopRunInMode + 106
10 GraphicsServices 0x3100d201 GSEventRunModal + 136
11 UIKit 0x2cfd5a59 UIApplicationMain + 1440
12 DART 0x00015491 _mh_execute_header + 25745
13 libdyld.dylib 0x38298aaf <redacted> + 2
"canEditRowAtIndexPath" method:
-(BOOL) tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
{
if (tableView.tag == SIGNER_TABLE_TAG_VALUE)
{
RouteStopData *currentStop = [CurrentRoute singleton].selectedStop;
NSArray *signers = [currentStop signerNamesForStop];
if (indexPath.row >= [signers count])
{
return NO;
}
if ([[signers objectAtIndex:indexPath.row] isEqualToString:DARK_DROP_SIGNER_STRING] ||
[[signers objectAtIndex:indexPath.row] isEqualToString:PAPER_INVOICE_SIGNER_STRING] ||
[[signers objectAtIndex:indexPath.row] isEqualToString:ADD_NEW_SIGNER_STRING]
)
{
return NO;
}
return YES;
}
return NO;
}
If you are using ios7, it's maybe UIKit's fault.
Tableview would like to call delegate method before dealloc.
So you can add this code in your Custom class:
- (void )dealloc{
self.tableView.dataSource = nil;
self.tableView.delegate = nil;
}
See more in iOS 7 bug or my bug in UIAlertView
Related
My app relatively often crashes with SIGSEGV. Unfortunately, I can not reproduce the crash and only see crash reports in Hockeyapp. I tried turning zombies on, too.
Looking at the crash report it seems that app crashes when processing touches (when user scrolling or something like this). No my app code mentioned in the stack trace.
The question is: how is it possible to have memory issue in this scenario? What would you recommend to reproduce and fix the issue?
Exception Type: SIGSEGV
Exception Codes: SEGV_ACCERR at 0x71a86113
Crashed Thread: 0
Application Specific Information:
objc_msgSend() selector name: convertPoint:fromLayer:
Thread 0 Crashed:
0 libobjc.A.dylib 0x2106fae6 objc_msgSend_stret + 6
1 UIKit 0x25e7a349 -[UIView(Geometry) convertPoint:fromView:] + 98
2 UIKit 0x25e7e987 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 104
3 CoreFoundation 0x217e8279 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 86
4 CoreFoundation 0x217e81a7 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 248
5 UIKit 0x25e7e447 -[UIView(Geometry) hitTest:withEvent:] + 492
6 UIKit 0x26146f0d -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 62
7 UIKit 0x25e7e9bd __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 158
8 CoreFoundation 0x217e8279 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 86
9 CoreFoundation 0x217e81a7 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 248
10 UIKit 0x25e7e447 -[UIView(Geometry) hitTest:withEvent:] + 492
11 UIKit 0x26146f0d -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 62
12 UIKit 0x26136491 __70+[UIWindow _hitTestToPoint:forEvent:windowServerHitTestWindow:screen:]_block_invoke + 186
13 UIKit 0x25e4783f +[UIWindow _topVisibleWindowPassingTest:] + 156
14 UIKit 0x26136399 +[UIWindow _hitTestToPoint:forEvent:windowServerHitTestWindow:screen:] + 142
15 UIKit 0x26136629 -[UIWindow _targetWindowForPathIndex:atPoint:forEvent:windowServerHitTestWindow:onScreen:] + 158
16 UIKit 0x260ffb61 _UIApplicationHandleDigitizerEvent + 10982
17 UIKit 0x25e4123f _UIApplicationHandleEventQueue + 3836
18 CoreFoundation 0x21889dff __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
19 CoreFoundation 0x218899ed __CFRunLoopDoSources0 + 450
20 CoreFoundation 0x21887d5b __CFRunLoopRun + 792
21 CoreFoundation 0x217d7229 CFRunLoopRunSpecific + 518
22 CoreFoundation 0x217d7015 CFRunLoopRunInMode + 106
23 GraphicsServices 0x22dc7ac9 GSEventRunModal + 158
24 UIKit 0x25eab189 UIApplicationMain + 142
25 My App. 0x0005376b main (main.m:14)
26 ??? 0x2147f873 0x0 + 0
My Application is getting crashed while scrolling UIWebview - I have used ILPDFKit for implementing interactive PDF - Editable Forms.App is getting crashed only if i am adding more than 126 Objects.
Here is code I am using (from ILPDFKit)
for (PDFWidgetAnnotationView *element in widgetAnnotationViews)
{
element.alpha = 0;
element.parentView = self;
[_pdfView.scrollView addSubview:element];
[_pdfView.scrollView bringSubviewToFront:element];
if ([element isKindOfClass:[PDFFormButtonField class]])
{
[(PDFFormButtonField*)element setButtonSuperview];
}
}
I have also raise Issue here
I have added some customview's in my webview.scrollview , so while scrolling webview my App is getting crashed. i have checked for all possible solutions i found on google/stackoverflow.
none of the delegate method of scrollview / webview called before this crash , as soon as i tried to scroll and app is getting crashed.
below is crash report.
*** Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection <__NSArrayM: 0x6000024535f0> was mutated while being enumerated.'
*** First throw call stack:
(
0 CoreFoundation 0x00000001045dd34b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000103f5f21e objc_exception_throw + 48
2 CoreFoundation 0x0000000104645f1c __NSFastEnumerationMutationHandler + 124
3 CoreFoundation 0x0000000104582638 -[NSArray makeObjectsPerformSelector:] + 424
4 UIKit 0x00000001020d8f4f -[UIScrollView(UIScrollViewInternal) _notifyDidScroll] + 163
5 UIKit 0x00000001020c3919 -[UIScrollView setContentOffset:] + 478
6 UIKit 0x00000001020c8351 -[UIScrollView _updatePanGesture] + 2346
7 UIKit 0x0000000102531289 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] + 57
8 UIKit 0x0000000102539028 _UIGestureRecognizerSendTargetActions + 109
9 UIKit 0x0000000102536af7 _UIGestureRecognizerSendActions + 227
10 UIKit 0x0000000102535d83 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 891
11 UIKit 0x0000000102521e56 _UIGestureEnvironmentUpdate + 1395
12 UIKit 0x000000010252189b -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] + 521
13 UIKit 0x0000000102520a7e -[UIGestureEnvironment _updateGesturesForEvent:window:] + 286
14 UIKit 0x000000010205f7ad -[UIWindow sendEvent:] + 3989
15 UIKit 0x000000010200ca33 -[UIApplication sendEvent:] + 371
16 UIKit 0x00000001027feb6d __dispatchPreprocessedEventFromEventQueue + 3248
17 UIKit 0x00000001027f7817 __handleEventQueue + 4879
18 CoreFoundation 0x0000000104582311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
19 CoreFoundation 0x000000010456759c __CFRunLoopDoSources0 + 556
20 CoreFoundation 0x0000000104566a86 __CFRunLoopRun + 918
21 CoreFoundation 0x0000000104566494 CFRunLoopRunSpecific + 420
22 GraphicsServices 0x0000000107910a6f GSEventRunModal + 161
23 UIKit 0x0000000101feef34 UIApplicationMain + 159
24 HyundaiCapital 0x000000010132a67f main + 111
25 libdyld.dylib 0x000000010610268d start + 1
26 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Edit
1.How many subviews at most i can add into delegate of scrollview at a time?
2.I am only getting this crash if i am adding subviews more than 126?
Solution
Updating ILPDFKit worked for me.
Crash starts when we kill the application and Again login to the application, App keep crashing at multiple views and screens.
Zombie warning sometimes says message was sent to deallocated space ie. [ object of View setImage:forState]. Sometmes *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil', sometimes else and it's random.`
App worked fine on iOS7, issue only with iOS8
one of the Symbolicated Crash Logs :
Exception Type: EXC_CRASH (SIGABRT) Exception Codes:
0x0000000000000000, 0x0000000000000000 Triggered by Thread: 0
Last Exception Backtrace: 0 CoreFoundation
0x2abe55f2 0x2aadd000 + 1082866 1 libobjc.A.dylib
0x3876fc72 0x38769000 + 27762 2 CoreFoundation
0x2aaf9152 0x2aadd000 + 115026 3 Service360
0x0018b162 -[CaseMgmtController tableView:cellForRowAtIndexPath:]
(CaseMgmtController.m:1268) 4 UIKit
0x2e353128 0x2e07e000 + 2969896 5 UIKit
0x2e3531ea 0x2e07e000 + 2970090 6 UIKit
0x2e34890c 0x2e07e000 + 2926860 7 UIKit
0x2e160996 0x2e07e000 + 928150 8 UIKit
0x2e08a97a 0x2e07e000 + 51578 9 QuartzCore
0x2dab5f60 0x2daa9000 + 53088 10 QuartzCore
0x2dab194c 0x2daa9000 + 35148 11 QuartzCore
0x2dab17d4 0x2daa9000 + 34772 12 QuartzCore
0x2dab11c2 0x2daa9000 + 33218 13 QuartzCore
0x2dab0fcc 0x2daa9000 + 32716 14 QuartzCore
0x2daaaed8 0x2daa9000 + 7896 15 CoreFoundation
0x2abac010 0x2aadd000 + 847888 16 CoreFoundation
0x2aba96f4 0x2aadd000 + 837364 17 CoreFoundation
0x2aba9af6 0x2aadd000 + 838390 18 CoreFoundation
0x2aaf6b2c 0x2aadd000 + 105260 19 CoreFoundation
0x2aaf693e 0x2aadd000 + 104766 20 GraphicsServices
0x31ead04c 0x31ea4000 + 36940 21 UIKit
0x2e0ec6ec 0x2e07e000 + 452332 22 Service360
0x00096ffa main (main.m:18) 23 libdyld.dylib
0x38d0baaa 0x38d0a000 + 6826
NSInteger index1, index2, index3;
index1= indexPath.row * MAX_NUMBER_OF_CELLS_IN_ONE_ROW;
index2= index1 + 1;
index3= index2 + 1;
static NSString *TableIdentifier = #"CellIdent";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:TableIdentifier];
UIView *Mainview = nil;
if (cell == nil) {
cell = [[[UITableViewCell alloc] init]autorelease];
NSArray *nib=[[NSBundle mainBundle]loadNibNamed:#"CaseManagementCell" owner:self options:nil];
Mainview = (UIView *)[nib objectAtIndex:0];
[cell addSubview:Mainview];
}
cell.backgroundColor = [UIColor clearColor];
Tried once more this time, i got this error below error message this time.
NSPathStore2 setImage:forState:]: unrecognized selector sent to instance 0x786bc950
When I tried printing the the hex I got :
po 0x786bc950
UITextFieldClearButton
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSPathStore2 setImage:forState:]: unrecognized selector sent to instance 0x786bc950'
*** First throw call stack:
(
0 CoreFoundation 0x031d8df6 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x02cbca97 objc_exception_throw + 44
2 CoreFoundation 0x031e0a75 -[NSObject(NSObject) doesNotRecognizeSelector:] + 277
3 CoreFoundation 0x031299c7 ___forwarding___ + 1047
4 CoreFoundation 0x0312958e _CF_forwarding_prep_0 + 14
5 UIKit 0x01eead61 -[UITextField clearButton] + 312
6 UIKit 0x01eeaeaf -[UITextField _updateButtons] + 133
7 UIKit 0x01eed0e0 -[UITextField layoutSubviews] + 150
8 UIKit 0x017319c0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 608
9 libobjc.A.dylib 0x02cd2771 -[NSObject performSelector:withObject:] + 70
10 QuartzCore 0x0113a27f -[CALayer layoutSublayers] + 152
11 QuartzCore 0x0112e105 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 397
12 QuartzCore 0x0112df60 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
13 QuartzCore 0x0108c676 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 284
14 QuartzCore 0x0108da3c _ZN2CA11Transaction6commitEv + 392
15 QuartzCore 0x0108dc94 _ZN2CA11Transaction14release_threadEPv + 232
16 libsystem_pthread.dylib 0x07aa981c _pthread_tsd_cleanup + 93
17 libsystem_pthread.dylib 0x07aa627e _pthread_exit + 108
18 libsystem_pthread.dylib 0x07aa61e8 pthread_exit + 33
19 Foundation 0x028e66c8 __NSFinalizeThreadData + 0
20 Foundation 0x028c2ac8 __NSThread__main__ + 1350
21 libsystem_pthread.dylib 0x07aa55fb _pthread_body + 144
22 libsystem_pthread.dylib 0x07aa5485 _pthread_struct_init + 0
23 libsystem_pthread.dylib 0x07aaacf2 thread_start + 34
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I had the same issue and it was resolved just by changing the unique identifier of the cell to Cell.
App crashing when pop two times the navigationController and in iPhone log return this error :(
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x6545f661
Triggered by Thread: 0
Thread 0 Crashed:
0 libobjc.A.dylib 0x3a081636 objc_msgSend + 22
1 UIKit 0x322bef20 -[UIScrollView(UIScrollViewInternal) _notifyDidScroll] + 60
2 UIKit 0x32039188 -[UIScrollView setContentOffset:] + 592
3 UIKit 0x320e61e6 -[UITableView setContentOffset:] + 346
4 UIKit 0x322bfe62 -[UIScrollView(UIScrollViewInternal) _adjustContentOffsetIfNecessary] + 1350
5 UIKit 0x320ebd0e -[UIScrollView(UIScrollViewInternal) _stopScrollingNotify:pin:tramplingDragFlags:] + 410
6 UIKit 0x320ebb66 -[UIScrollView(UIScrollViewInternal) _stopScrollingNotify:pin:] + 26
7 UIKit 0x320ebb22 -[UIScrollView removeFromSuperview] + 26
8 UIKit 0x3201a3b6 -[UIView dealloc] + 374
9 libobjc.A.dylib 0x3a0870d2 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 354
10 CoreFoundation 0x2f730c14 _CFAutoreleasePoolPop + 12
11 CoreFoundation 0x2f7c6176 __CFRunLoopRun + 1302
12 CoreFoundation 0x2f730eba CFRunLoopRunSpecific + 518
13 CoreFoundation 0x2f730c9e CFRunLoopRunInMode + 102
14 GraphicsServices 0x3468a65e GSEventRunModal + 134
15 UIKit 0x3207d148 UIApplicationMain + 1132
16 Big24H 0x000e9728 main (main.m:16)
17 libdyld.dylib 0x3a584ab4 start + 0
Looks like you have a UIScrollViewDelegate being deallocated before its corresponding UIScrollView and then getting called.
You didn't provide any code so the best I can say is you need to find where it is and nil it out when it is getting deallocated.
Probably something like this:
- (void) dealloc
{
myScrollView.delegate = nil;
}
I'm new to IOS development. When i run my app ,i got the following error. Could anyone help me..
I have placed an UITextView inside a TableViewCell. And i have set 'one\n' as text of the UITextView.
My Code :
- (id)initWithFrame:(CGRect)frame withIndexPath:(NSArray *)indexPath
{
self = [super initWithFrame:frame];
if (self) {
mIndexPath = indexPath;
mRange = NSMakeRange(0,4);
self.delegate = self;
self.attributedText = #"one\n";
self.scrollEnabled = NO;
}
return self;
}
- (void)textViewDidBeginEditing:(TextView *)textView
{
[self updateRangeForSelection];
}
- (void)updateRangeForSelection
{
NSRange selectedRange = self.selectedRange;
NSLog(#"%d",selectedRange.location);
}
When i tap on the UITextView, I got the selected Range as (3,0). After i logging the selected Range, Myself got the following exception.
ExCeption:
2013-11-14 16:16:24.690 ZohoWriter[484:60b] ARRAY : (
0 CoreFoundation 0x2d488e9b <redacted> + 154
1 libobjc.A.dylib 0x37c3d6c7 objc_exception_throw + 38
2 CoreFoundation 0x2d488dc5 <redacted> + 0
3 Foundation 0x2de6911d <redacted> + 88
4 UIKit 0x2fdaee89 <redacted> + 328
5 UIFoundation 0x35038cd9 <redacted> + 36
6 UIKit 0x2fdaeceb <redacted> + 218
7 UIKit 0x2fdaeb79 <redacted> + 1128
8 UIFoundation 0x3501dde3 <redacted> + 46
9 UIKit 0x2fdae67b <redacted> + 222
10 UIKit 0x2fdae533 <redacted> + 54
11 UIKit 0x2fdae4d9 <redacted> + 132
12 UIKit 0x2fdac5f3 <redacted> + 2146
13 UIKit 0x2fd93739 <redacted> + 196
14 UIKit 0x2fc3e18b <redacted> + 1138
15 UIKit 0x2ffc9d4f <redacted> + 46
16 UIKit 0x2fc055cf <redacted> + 218
17 UIKit 0x2fc03d33 <redacted> + 298
18 UIKit 0x2fc3c9fd <redacted> + 772
19 UIKit 0x2fc3c3ab <redacted> + 666
20 UIKit 0x2fc11d79 <redacted> + 196
21 UIKit 0x2fc10569 <redacted> + 7116
22 CoreFoundation 0x2d453f1f <redacted> + 14
23 CoreFoundation 0x2d4533e7 <redacted> + 206
24 CoreFoundation 0x2d451bd7 <redacted> + 630
25 CoreFoundation 0x2d3bc471 CFRunLoopRunSpecific + 524
26 CoreFoundation 0x2d3bc253 CFRunLoopRunInMode + 106
27 GraphicsServices 0x320d02eb GSEventRunModal + 138
28 UIKit 0x2fc71845 UIApplicationMain + 1136
29 ZohoWriter 0x000bea1d main + 116
30 libdyld.dylib 0x38136ab7 <redacted> + 2
)
2013-11-14 16:16:24.695 ZohoWriter[484:60b] Exception : The index 4 is invalid
2013-11-14 16:16:24.696 ZohoWriter[484:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'The index 4 is invalid'
terminating with uncaught exception of type NSException
Program received signal: “SIGABRT”.
What i'm doing wrong here ?
The provided code is not the place where it's crashing.
Somewhere else you are using a range with index 4,, but that range is exceeding the bounds of the (attributed)string(?). You can use enable exception breakpoints in Xcode to see where that actually happens.