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.
Related
When I launch my App with the CollectionView:
2016-06-20 20:37:30.640 Projekt A[19055:699202] -[UIViewController collectionView:numberOfItemsInSection:]: unrecognized selector sent to instance 0x7fd1bbfa3ac0
2016-06-20 20:37:30.748 Projekt A[19055:699202] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController collectionView:numberOfItemsInSection:]: unrecognized selector sent to instance 0x7fd1bbfa3ac0'
*** First throw call stack:
(
0 CoreFoundation 0x000000010f8d2d85 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000111854deb objc_exception_throw + 48
2 CoreFoundation 0x000000010f8dbd3d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x000000010f821cfa ___forwarding___ + 970
4 CoreFoundation 0x000000010f8218a8 _CF_forwarding_prep_0 + 120
5 UIKit 0x0000000110baa56c -[UICollectionViewData _updateItemCounts] + 492
6 UIKit 0x0000000110bad009 -[UICollectionViewData numberOfSections] + 22
7 UIKit 0x0000000110b8ef51 -[UICollectionViewFlowLayout _getSizingInfos] + 445
8 UIKit 0x0000000110b90c47 -[UICollectionViewFlowLayout _fetchItemsInfoForRect:] + 118
9 UIKit 0x0000000110b8a3fd -[UICollectionViewFlowLayout prepareLayout] + 273
10 UIKit 0x0000000110baac3d -[UICollectionViewData _prepareToLoadData] + 67
11 UIKit 0x0000000110bab411 -[UICollectionViewData validateLayoutInRect:] + 53
12 UIKit 0x0000000110b5853a -[UICollectionView layoutSubviews] + 199
13 UIKit 0x0000000110393980 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 703
14 QuartzCore 0x0000000114a4ac00 -[CALayer layoutSublayers] + 146
15 QuartzCore 0x0000000114a3f08e _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
16 QuartzCore 0x0000000114a3ef0c _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
17 QuartzCore 0x0000000114a333c9 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
18 QuartzCore 0x0000000114a61086 _ZN2CA11Transaction6commitEv + 486
19 UIKit 0x000000011030519b _afterCACommitHandler + 174
20 CoreFoundation 0x000000010f7f7c37 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
21 CoreFoundation 0x000000010f7f7ba7 __CFRunLoopDoObservers + 391
22 CoreFoundation 0x000000010f7ed7fb __CFRunLoopRun + 1147
23 CoreFoundation 0x000000010f7ed0f8 CFRunLoopRunSpecific + 488
24 GraphicsServices 0x000000011607cad2 GSEventRunModal + 161
25 UIKit 0x00000001102d8f09 UIApplicationMain + 171
26 Projekt A 0x000000010f6e4292 main + 114
27 libdyld.dylib 0x000000011238292d start + 1
28 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
somebody can help me pls?
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
The error is saying that the collection view's data source is set to be a plain UIViewController instead of whatever class you have that implements UICollectionViewDataSource.
Check how your data source is assigned and what class of object it is.
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
I've been trying to solve this problem for the past two days but I just can't find why it occurs, so I took it here to ask if you guys have any idea about it.
So I have a UITableView which I display some items in. I also have a UITableViewCell which I use as the cells.
I register the nib with my table view in the viewDidLoad:
[self.QuickPickDetailsTV registerNib:[UINib nibWithNibName:#"QuickPickItemCell"
bundle:[NSBundle mainBundle]]
forCellReuseIdentifier:#"QuickPickItemCellReuseID"];
Then in the tableView:cellForRowAtIndexPath:, I reuse, populate, and return the cell as below:
static NSString *CellIdentifier = #"QuickPickItemCellReuseID";
QuickPickItemCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[QuickPickItemCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
NSDictionary *quickPickItem = [self.myQuickPickItems objectAtIndex:indexPath.row];
NSString *theQuickPickItemName = [quickPickItem valueForKey:#"name"];
[cell.mName setFont:[UIFont fontWithName:#"OpenSans" size:16]];
[cell.mName setText:NSLocalizedString(theQuickPickItemName, nil)];
return cell;
The method above gets called for the number of items it should display (as expected), and crashes with an strange error after the last cell is returned:
2014-08-02 13:03:38.008 TestApp[49701:607] -[__NSArrayI length]: unrecognized selector sent to instance 0x2e92fde0
2014-08-02 13:03:38.010 TestApp[49701:607] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI length]: unrecognized selector sent to instance 0x2e92fde0'
*** First throw call stack:
(
0 CoreFoundation 0x044f21e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x033888e5 objc_exception_throw + 44
2 CoreFoundation 0x0458f243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x044e250b ___forwarding___ + 1019
4 CoreFoundation 0x044e20ee _CF_forwarding_prep_0 + 14
5 UIKit 0x01ff8463 -[UILabel _shadow] + 45
6 UIKit 0x01ff98c2 -[UILabel drawTextInRect:] + 70
7 UIKit 0x01ffbdfc -[UILabel drawRect:] + 98
8 UIKit 0x01eaa453 -[UIView(CALayerDelegate) drawLayer:inContext:] + 504
9 QuartzCore 0x00dbaf39 -[CALayer drawInContext:] + 123
10 QuartzCore 0x00dbae6a _ZL16backing_callbackP9CGContextPv + 96
11 QuartzCore 0x00ca94fc CABackingStoreUpdate_ + 2656
12 QuartzCore 0x00dbae02 ___ZN2CA5Layer8display_Ev_block_invoke + 93
13 QuartzCore 0x00def2d7 x_blame_allocations + 15
14 QuartzCore 0x00dbac6d _ZN2CA5Layer8display_Ev + 1519
15 QuartzCore 0x00dbaeb9 -[CALayer _display] + 33
16 QuartzCore 0x00dba676 _ZN2CA5Layer7displayEv + 144
17 QuartzCore 0x00dbae93 -[CALayer display] + 33
18 QuartzCore 0x00daf043 _ZN2CA5Layer17display_if_neededEPNS_11TransactionE + 323
19 QuartzCore 0x00daf0bc _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 38
20 QuartzCore 0x00d157fa _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
21 QuartzCore 0x00d16b85 _ZN2CA11Transaction6commitEv + 393
22 QuartzCore 0x00d17258 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
23 CoreFoundation 0x044ba36e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
24 CoreFoundation 0x044ba2bf __CFRunLoopDoObservers + 399
25 CoreFoundation 0x04498254 __CFRunLoopRun + 1076
26 CoreFoundation 0x044979d3 CFRunLoopRunSpecific + 467
27 CoreFoundation 0x044977eb CFRunLoopRunInMode + 123
28 GraphicsServices 0x047e95ee GSEventRunModal + 192
29 GraphicsServices 0x047e942b GSEventRun + 104
30 UIKit 0x01e3bf9b UIApplicationMain + 1225
31 TestApp 0x00002c92 main + 130
32 TestApp 0x00002c05 start + 53
33 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I have searched all my code but I don't send length to any object in my code. I don't know where is the crash coming from since it is shown to be on my main.m.
I have tried turning on NSZombies as well, but I didn't get any warnings about released objects.
Any help will be appreciated!
Thanks
My game is constantly crashing after pressing a certain button after restarting the game.
An animation is always running during the game in the ViewController I'm running the game on.
Here is the crash log. Is there any way to detect how is this crash related to my animation?
2014-08-05 00:21:30.044 windmill[702:90b] -[CALayer doubleValue]: unrecognized selector sent to instance 0xec32a10
2014-08-05 00:21:30.053 windmill[702:90b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CALayer doubleValue]: unrecognized selector sent to instance 0xec32a10'
*** First throw call stack:
(
0 CoreFoundation 0x01c501e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x019cf8e5 objc_exception_throw + 44
2 CoreFoundation 0x01ced243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x01c4050b ___forwarding___ + 1019
4 CoreFoundation 0x01c400ee _CF_forwarding_prep_0 + 14
5 QuartzCore 0x0013b9b8 CAObject_setValueForKeyPath_ + 2435
6 QuartzCore 0x0012129b -[CALayer setValue:forKeyPath:] + 471
7 QuartzCore 0x00105d51 -[CABasicAnimation applyForTime:presentationObject:modelObject:] + 1178
8 QuartzCore 0x0012415c _ZN2CA5Layer18presentation_layerEPNS_11TransactionE + 494
9 QuartzCore 0x00127cbe -[CALayer presentationLayer] + 43
10 UIKit 0x006eb0f1 _UIViewEatsTouches + 142
11 UIKit 0x006eb250 -[UIView(Geometry) hitTest:withEvent:] + 114
12 UIKit 0x006eb4f4 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 132
13 CoreFoundation 0x01cccd86 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 102
14 CoreFoundation 0x01cccc5f -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 239
15 UIKit 0x006eb35c -[UIView(Geometry) hitTest:withEvent:] + 382
16 UIKit 0x006eb4f4 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 132
17 CoreFoundation 0x01cccd86 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 102
18 CoreFoundation 0x01cccc5f -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 239
19 UIKit 0x006eb35c -[UIView(Geometry) hitTest:withEvent:] + 382
20 UIKit 0x006daeb1 __54+[UIWindow _hitTestToPoint:pathIndex:forEvent:screen:]_block_invoke + 175
21 UIKit 0x006dad1e +[UIWindow _topVisibleWindowPassingTest:] + 198
22 UIKit 0x006dadfa +[UIWindow _hitTestToPoint:pathIndex:forEvent:screen:] + 176
23 UIKit 0x0068c5bb _UIApplicationHandleEventQueue + 7975
24 CoreFoundation 0x01bd977f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
25 CoreFoundation 0x01bd910b __CFRunLoopDoSources0 + 235
26 CoreFoundation 0x01bf61ae __CFRunLoopRun + 910
27 CoreFoundation 0x01bf59d3 CFRunLoopRunSpecific + 467
28 CoreFoundation 0x01bf57eb CFRunLoopRunInMode + 123
29 GraphicsServices 0x0341c5ee GSEventRunModal + 192
30 GraphicsServices 0x0341c42b GSEventRun + 104
31 UIKit 0x0068ff9b UIApplicationMain + 1225
32 windmill 0x00004afd main + 141
33 libdyld.dylib 0x03103725 start + 0
34 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
When I press buttons in the view , the app crashes. Here is the animation code:
CABasicAnimation *fullRotation = [CABasicAnimation animationWithKeyPath:#"transform.rotation"];
fullRotation.fromValue = [NSNumber numberWithFloat:0];
fullRotation.toValue = [NSNumber numberWithFloat:((360*M_PI)/180)];
fullRotation.duration = 4;
fullRotation.repeatCount= 1000;
[[stick layer] addAnimation:fullRotation forKey:#"60"];}
I'm sorry if the code is messed up , I'm still learning and building small apps and games to get a better practice. Thanks.
You should remove the lines with fullRotation.fromValue, since it ought not to have a CALayer assigned to itself.
fullRotation.fromValue = self.view.layer.presentationLayer;
Here is the line of code
cell.imageURL=[NSURL URLWithString:self.imageURLs[indexPath.row]];
Here is the error trace
[UITableViewCell setImageURL:]: unrecognized selector sent to instance 0x906da70
2014-07-24 17:16:50.049 MyApp_iOS[9443:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITableViewCell setImageURL:]: unrecognized selector sent to instance 0x906da70'
*** First throw call stack:
(
0 CoreFoundation 0x01a8c1e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x016ad8e5 objc_exception_throw + 44
2 CoreFoundation 0x01b29243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x01a7c50b ___forwarding___ + 1019
4 CoreFoundation 0x01a7c0ee _CF_forwarding_prep_0 + 14
5 MyApp_iOS 0x0007f518 -[BCDDogViewController tableView:cellForRowAtIndexPath:] + 504
6 UIKit 0x0046611f -[UITableView _createPreparedCellForGlobalRow:withIndexPath:] + 412
7 UIKit 0x004661f3 -[UITableView _createPreparedCellForGlobalRow:] + 69
8 UIKit 0x00447ece -[UITableView _updateVisibleCellsNow:] + 2428
9 UIKit 0x0045c6a5 -[UITableView layoutSubviews] + 213
10 UIKit 0x003dc964 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
11 libobjc.A.dylib 0x016bf82b -[NSObject performSelector:withObject:] + 70
12 QuartzCore 0x03ef745a -[CALayer layoutSublayers] + 148
13 QuartzCore 0x03eeb244 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
14 QuartzCore 0x03eeb0b0 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
15 QuartzCore 0x03e517fa _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
16 QuartzCore 0x03e52b85 _ZN2CA11Transaction6commitEv + 393
17 QuartzCore 0x03e53258 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
18 CoreFoundation 0x01a5436e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
19 CoreFoundation 0x01a542bf __CFRunLoopDoObservers + 399
20 CoreFoundation 0x01a32254 __CFRunLoopRun + 1076
21 CoreFoundation 0x01a319d3 CFRunLoopRunSpecific + 467
22 CoreFoundation 0x01a317eb CFRunLoopRunInMode + 123
23 GraphicsServices 0x03a805ee GSEventRunModal + 192
24 GraphicsServices 0x03a8042b GSEventRun + 104
25 UIKit 0x0036df9b UIApplicationMain + 1225
26 MyApp_iOS 0x000577c2 main + 130
27 libdyld.dylib 0x0216d701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
And the property in question is
#property(strong,nonatomic) NSURL *imageURL;
with setter
-(void)setImageURL:(NSURL *)imageURL
{
_imageURL=imageURL;
[self startDownloadingImage];
}
The strange thing is this used to work and about an hour or so ago it stops working and starts throwing this exception.
update
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
BCDDogImageTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[BCDDogImageTableViewCell cellPrototypeIdentifier] forIndexPath:indexPath];
NSLog(#"THE CELL IS: %# ", cell);
cell.imageURL=[NSURL URLWithString:self.imageURLs[indexPath.row]];
return cell;
}
The error is because your cell is actually a UITableViewCell instance and not an instance of your custom cell class.
Be sure to register your custom cell class for the cell.