Objective C NSUnknownKeyException setValue:forUndefinedKey: - ios

after I upgraded xcode to new version (6.0.1), i encurrend into an NSUnknownKeyException when running my app.
Looking around for a solution, i found out that usually this issue comes up for "dead" outlet reference in the xib, but in my case occurs when i fetch data from an sqlite database. I use FMDB and BZObjectStore libraries for working with my db.
Here is my console output:
2014-10-15 15:30:24.894 PBWines[59418:428758] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<BZObjectStoreRelationshipModel 0x79f65420> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key hash.'
*** First throw call stack:
(
0 CoreFoundation 0x02485df6 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x0210fa97 objc_exception_throw + 44
2 CoreFoundation 0x02485a11 -[NSException raise] + 17
3 Foundation 0x01d97d5e -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4 Foundation 0x01cf3d88 _NSSetUsingKeyValueSetter + 115
5 Foundation 0x01cf3d0d -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6 PBWines 0x00131de8 -[BZObjectStoreModelMapper select:condition:db:] + 1336
7 PBWines 0x00134c02 -[BZObjectStoreModelMapper relationshipObjectsWithCondition:relationshipRuntime:db:] + 162
8 PBWines 0x001346be -[BZObjectStoreModelMapper relationshipObjectsWithObject:attribute:relationshipRuntime:db:] + 686
9 PBWines 0x00146a31 -[BZObjectStoreReferenceMapper saveObjectsSub:db:error:] + 15361
10 PBWines 0x00142de2 -[BZObjectStoreReferenceMapper saveObjects:db:error:] + 274
11 PBWines 0x0014c06d -[BZObjectStoreReferenceMapper registerRuntime:db:error:] + 925
12 PBWines 0x0014b3d8 -[BZObjectStoreReferenceMapper runtimeWithClazz:db:error:] + 232
13 PBWines 0x001401a9 -[BZObjectStoreReferenceMapper fetchObjects:condition:db:error:] + 233
14 PBWines 0x0010cbb7 __46-[BZObjectStore fetchObjects:condition:error:]_block_invoke + 231
15 PBWines 0x001083c7 __40-[BZObjectStore inTransactionWithBlock:]_block_invoke + 279
16 PBWines 0x00194bf1 __46-[FMDatabaseQueue beginTransaction:withBlock:]_block_invoke + 273
17 libdispatch.dylib 0x02b6ae1f _dispatch_client_callout + 14
18 libdispatch.dylib 0x02b4f5bf _dispatch_barrier_sync_f_invoke + 144
19 libdispatch.dylib 0x02b4ecf3 dispatch_barrier_sync_f + 105
20 libdispatch.dylib 0x02b4f6cf dispatch_barrier_sync + 54
21 PBWines 0x00194a85 -[FMDatabaseQueue beginTransaction:withBlock:] + 197
22 PBWines 0x00194e8c -[FMDatabaseQueue inTransaction:] + 108
23 PBWines 0x001081ce -[BZObjectStore inTransactionWithBlock:] + 382
24 PBWines 0x0010c92a -[BZObjectStore fetchObjects:condition:error:] + 410
25 PBWines 0x000a2d7e -[PBWPaesiViewController viewDidLoad] + 702
26 UIKit 0x00c50d54 -[UIViewController loadViewIfRequired] + 771
27 UIKit 0x00c869cd -[UINavigationController _layoutViewController:] + 42
28 UIKit 0x00c86f3c -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 235
29 UIKit 0x00c87040 -[UINavigationController _startTransition:fromViewController:toViewController:] + 90
30 UIKit 0x00c87fdb -[UINavigationController _startDeferredTransitionIfNeeded:] + 669
31 UIKit 0x00c88c52 -[UINavigationController __viewWillLayoutSubviews] + 57
32 UIKit 0x00dfaebc -[UILayoutContainerView layoutSubviews] + 213
33 UIKit 0x00b849c0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 608
34 libobjc.A.dylib 0x02125771 -[NSObject performSelector:withObject:] + 70
35 QuartzCore 0x0294827f -[CALayer layoutSublayers] + 152
36 QuartzCore 0x0293c105 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 397
37 QuartzCore 0x0293bf60 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
38 QuartzCore 0x0289a676 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 284
39 QuartzCore 0x0289ba3c _ZN2CA11Transaction6commitEv + 392
40 QuartzCore 0x02961789 +[CATransaction flush] + 52
41 UIKit 0x00af77e6 -[UIApplication _reportMainSceneUpdateFinished:] + 39
42 UIKit 0x00af8761 -[UIApplication _runWithMainScene:transitionContext:completion:] + 3163
43 UIKit 0x00b10d30 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke + 59
44 UIKit 0x00af6d7f -[UIApplication workspaceDidEndTransaction:] + 155
45 FrontBoardServices 0x04ca59de __37-[FBSWorkspace clientEndTransaction:]_block_invoke_2 + 71
46 FrontBoardServices 0x04ca546f __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 54
47 FrontBoardServices 0x04cb7425 __31-[FBSSerialQueue performAsync:]_block_invoke + 26
48 CoreFoundation 0x023a97a0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 16
49 CoreFoundation 0x0239f0b3 __CFRunLoopDoBlocks + 195
50 CoreFoundation 0x0239ef0b __CFRunLoopRun + 2715
51 CoreFoundation 0x0239e1ab CFRunLoopRunSpecific + 443
52 CoreFoundation 0x0239dfdb CFRunLoopRunInMode + 123
53 UIKit 0x00af6744 -[UIApplication _run] + 571
54 UIKit 0x00af9e16 UIApplicationMain + 1526
55 PBWines 0x000bb7ed main + 141
56 libdyld.dylib 0x02b96ac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Thanks in advance for help.

I've released BZObjectStore 1.3.13.
Can you run 'pod update' and try again?
Thanks

Related

Core Data : 'unimplemented SQL generation for predicate : ( column IN {value1, value2})'

I cannot implement IN in NSPredicate. I am getting this error. I have checked everything but hasnt been able to resolve this. Has anyone found similar issue?
Here's my model
And Here's the code Im doing
let messageLocalFetchRequest = NSFetchRequest<NSFetchRequestResult>.init(entityName: "Transaction")
messageLocalFetchRequest.predicate = NSPredicate.init(format: "category IN %#", ["Food","Rent"])
let array = try? self.context?.fetch(messageLocalFetchRequest)
Here's complete Log
2017-05-15 19:31:33.985 BudgetApp[26354:184185] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'unimplemented SQL generation for predicate : (category IN {"Food", "Rent"})'
*** First throw call stack:
(
0 CoreFoundation 0x01719ded __exceptionPreprocess + 189
1 libobjc.A.dylib 0x00dfad6f objc_exception_throw + 49
2 CoreData 0x0138266e -[NSSQLGenerator newSQLStatementForRequest:ignoreInheritance:countOnly:nestingLevel:nestIsWhereScoped:requestContext:] + 1710
3 CoreData 0x013826b1 -[NSSQLGenerator newSQLStatementForFetchRequest:ignoreInheritance:countOnly:nestingLevel:nestIsWhereScoped:requestContext:] + 49
4 CoreData 0x0138c1ce -[NSSQLiteAdapter _statementForFetchRequestContext:ignoreInheritance:countOnly:nestingLevel:] + 206
5 CoreData 0x0126256e -[NSSQLiteAdapter newSelectStatementWithFetchRequestContext:ignoreInheritance:] + 158
6 CoreData 0x013b91cb -[NSSQLFetchRequestContext _createStatement] + 75
7 CoreData 0x013b913d -[NSSQLFetchRequestContext fetchStatement] + 45
8 CoreData 0x013ba540 -[NSSQLFetchRequestContext executeRequestUsingConnection:] + 64
9 CoreData 0x013e76d3 __52-[NSSQLDefaultConnectionManager handleStoreRequest:]_block_invoke + 275
10 libdispatch.dylib 0x05473cc9 _dispatch_client_callout + 14
11 libdispatch.dylib 0x0544fac4 _dispatch_barrier_sync_f_invoke + 180
12 libdispatch.dylib 0x0544f82b dispatch_barrier_sync_f + 157
13 libdispatch.dylib 0x0544fbb8 dispatch_sync + 41
14 CoreData 0x013e7571 -[NSSQLDefaultConnectionManager handleStoreRequest:] + 241
15 CoreData 0x013eec7a -[NSSQLCoreDispatchManager routeStoreRequest:] + 282
16 CoreData 0x0136e645 -[NSSQLCore dispatchRequest:withRetries:] + 213
17 CoreData 0x0136b421 -[NSSQLCore processFetchRequest:inContext:] + 113
18 CoreData 0x01261b31 -[NSSQLCore executeRequest:withContext:error:] + 465
19 CoreData 0x01354481 __65-[NSPersistentStoreCoordinator executeRequest:withContext:error:]_block_invoke + 2769
20 CoreData 0x0134c3e5 -[NSPersistentStoreCoordinator _routeHeavyweightBlock:] + 341
21 CoreData 0x01261703 -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 579
22 CoreData 0x0125fb93 -[NSManagedObjectContext executeFetchRequest:error:] + 675
23 BudgetApp 0x000d0cfb _TFC9BudgetApp30TransactionTableViewController11viewDidLoadfT_T_ + 2059
24 BudgetApp 0x000d1052 _TToFC9BudgetApp30TransactionTableViewController11viewDidLoadfT_T_ + 34
25 UIKit 0x025ef61c -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 38
26 UIKit 0x025f3fa5 -[UIViewController loadViewIfRequired] + 1434
27 UIKit 0x026386b4 -[UINavigationController _layoutViewController:] + 52
28 UIKit 0x02638f57 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 427
29 UIKit 0x026390e6 -[UINavigationController _startTransition:fromViewController:toViewController:] + 123
30 UIKit 0x0263a26d -[UINavigationController _startDeferredTransitionIfNeeded:] + 979
31 UIKit 0x0263b698 -[UINavigationController __viewWillLayoutSubviews] + 70
32 UIKit 0x02852fd9 -[UILayoutContainerView layoutSubviews] + 235
33 UIKit 0x024fdb23 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1418
34 libobjc.A.dylib 0x00e101d9 -[NSObject performSelector:withObject:] + 59
35 QuartzCore 0x022b50ea -[CALayer layoutSublayers] + 141
36 QuartzCore 0x022a8486 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 398
37 QuartzCore 0x022a82e3 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 21
38 QuartzCore 0x02234a92 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 334
39 QuartzCore 0x02261f8f _ZN2CA11Transaction6commitEv + 483
40 QuartzCore 0x02263b60 _ZN2CA11Transaction17flush_transactionEv + 38
41 UIKit 0x024233a7 _UIApplicationFlushRunLoopCATransactionIfTooLate + 182
42 UIKit 0x02cbe95e __handleEventQueue + 2054
43 UIKit 0x02cbfba3 __handleHIDEventFetcherDrain + 66
44 CoreFoundation 0x016bea5f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
45 CoreFoundation 0x016a41c4 __CFRunLoopDoSources0 + 500
46 CoreFoundation 0x016a369c __CFRunLoopRun + 1084
47 CoreFoundation 0x016a2fd4 CFRunLoopRunSpecific + 372
48 CoreFoundation 0x016a2e4b CFRunLoopRunInMode + 123
49 GraphicsServices 0x070f7a7a GSEventRunModal + 71
50 GraphicsServices 0x070f795f GSEventRun + 80
51 UIKit 0x0242acb9 UIApplicationMain + 148
52 BudgetApp 0x000bc59b main + 75
53 libdyld.dylib 0x054ae779 start + 1
54 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
String is object, so you can't just use IN:
Objective-C
[NSPredicate predicateWithFormat:#"ANY %# LIKE[cd] category", #[#"Food",#"Rent"]]
Swift 3.1
NSPredicate(format: "ANY %# LIKE[cd] category", ["Food", "Rent"])

Crash app libc++abi.dylib (Admob)

Hello have crash app in IOS
This log:
2015-01-15 13:23:32.490 App[23898:1611888] <Google> Category methods are not loaded. Make sure you link the Google Mobile Ads library using one of the -ObjC, -force_load, or -all_load linker flags. See https://developers.google.com/mobile-ads-sdk/docs/#ios for more information.
2015-01-15 13:23:34.526 App[23898:1611888] registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later.
2015-01-15 13:23:34.802 App[23898:1611888] +[NSDecimalNumber gad_negativeOne]: unrecognized selector sent to class 0x7d7400
2015-01-15 13:23:34.805 App[23898:1611888] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSDecimalNumber gad_negativeOne]: unrecognized selector sent to class 0x7d7400'
*** First throw call stack:
(
0 CoreFoundation 0x03278946 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x02be0a97 objc_exception_throw + 44
2 CoreFoundation 0x03280465 +[NSObject(NSObject) doesNotRecognizeSelector:] + 277
3 CoreFoundation 0x031c93e7 ___forwarding___ + 1047
4 CoreFoundation 0x031c8fae _CF_forwarding_prep_0 + 14
5 App 0x000872ea -[GADStatisticDictionary decrementNumberForKey:shouldNotifyDelegate:] + 58
6 App 0x0007cc75 -[GADApplication init] + 512
7 App 0x0007ca45 __35+[GADApplication sharedApplication]_block_invoke + 55
8 libdispatch.dylib 0x03ecde2f _dispatch_client_callout + 14
9 libdispatch.dylib 0x03eb876c dispatch_once_f + 363
10 libdispatch.dylib 0x03eb85fc dispatch_once + 31
11 App 0x0007ca0c +[GADApplication sharedApplication] + 113
12 App 0x000780cd +[GADSlot initialize] + 67
13 libobjc.A.dylib 0x02be1461 _class_initialize + 576
14 libobjc.A.dylib 0x02be9fe5 lookUpImpOrForward + 339
15 libobjc.A.dylib 0x02be9e8d _class_lookupMethodAndLoadCache3 + 55
16 libobjc.A.dylib 0x02bf412f objc_msgSend + 139
17 App 0x00075f6a -[GADBannerView commonInitWithAdSize:] + 42
18 App 0x0007626e -[GADBannerView initWithCoder:] + 163
19 UIKit 0x00c5205e -[UIClassSwapper initWithCoder:] + 239
20 UIKit 0x00de7f1a UINibDecoderDecodeObjectForValue + 739
21 UIKit 0x00de7c2f -[UINibDecoder decodeObjectForKey:] + 371
22 UIKit 0x00c51bf1 -[UIRuntimeConnection initWithCoder:] + 189
23 UIKit 0x00de7f1a UINibDecoderDecodeObjectForValue + 739
24 UIKit 0x00de811c UINibDecoderDecodeObjectForValue + 1253
25 UIKit 0x00de7c2f -[UINibDecoder decodeObjectForKey:] + 371
26 UIKit 0x00c50ea7 -[UINib instantiateWithOwner:options:] + 1164
27 UIKit 0x00a73624 -[UIViewController _loadViewFromNibNamed:bundle:] + 270
28 UIKit 0x00a73dbb -[UIViewController loadView] + 295
29 UIKit 0x00a73fef -[UIViewController loadViewIfRequired] + 78
30 UIKit 0x00a74595 -[UIViewController view] + 35
31 UIKit 0x0096b825 -[UIWindow addRootViewControllerViewIfPossible] + 66
32 UIKit 0x0096bc99 -[UIWindow _setHidden:forced:] + 287
33 UIKit 0x0096bf50 -[UIWindow _orderFrontWithoutMakingKey] + 49
34 UIKit 0x0097a28d -[UIWindow makeKeyAndVisible] + 80
35 UIKit 0x00917776 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3108
36 UIKit 0x0091ac0d -[UIApplication _runWithMainScene:transitionContext:completion:] + 1639
37 UIKit 0x009337d0 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke + 59
38 UIKit 0x0091981f -[UIApplication workspaceDidEndTransaction:] + 155
39 FrontBoardServices 0x05b799de __37-[FBSWorkspace clientEndTransaction:]_block_invoke_2 + 71
40 FrontBoardServices 0x05b7946f __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 54
41 FrontBoardServices 0x05b8b425 __31-[FBSSerialQueue performAsync:]_block_invoke + 26
42 CoreFoundation 0x0319c1c0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 16
43 CoreFoundation 0x03191ad3 __CFRunLoopDoBlocks + 195
44 CoreFoundation 0x03191238 __CFRunLoopRun + 936
45 CoreFoundation 0x03190bcb CFRunLoopRunSpecific + 443
46 CoreFoundation 0x031909fb CFRunLoopRunInMode + 123
47 UIKit 0x009191e4 -[UIApplication _run] + 571
48 UIKit 0x0091c8b6 UIApplicationMain + 1526
49 App 0x0005991d main + 141
50 libdyld.dylib 0x03ef9ac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Try to add -ObjC to Other Linker Flags in the Build Settings tab.

App crashes when number of rows changes after reloading table

In my iOS app there is a view with a tableview inside. The table cells are loaded from a PHP file on a remote server. I have also put a NSTimer on the view controller that should reload the data.
The cells contain information that may change on a time interval. That is working fine only if the number of cells doesn't change on a time interval. If a cell is added on a time interval, then the app crashes.
This is the code for the NSTimer:
self.timer = [NSTimer scheduledTimerWithTimeInterval:10 target:self selector:#selector(refrescar) userInfo:nil repeats:YES];
And this is the code for the method refrescar:
- (void)refrescar {
total_actual =0;
total =0;
[self viewDidLoad];
}
I have also tried with this one:
- (void)refrescar {
total_actual =0;
total =0;
[self.tableView reloadData];
}
But the app crashes as with the other code with [self viewDidLoad];
Any help is welcome.
Error log:
2014-11-13 23:52:23.299 RestAppXXI[1552:607] -[NSNull length]: unrecognized selector sent to instance 0xcb6068
2014-11-13 23:52:23.429 RestAppXXI[1552:607] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull length]: unrecognized selector sent to instance 0xcb6068'
*** First throw call stack:
(
0 CoreFoundation 0x00b6a1e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x031588e5 objc_exception_throw + 44
2 CoreFoundation 0x00c07243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x00b5a50b ___forwarding___ + 1019
4 CoreFoundation 0x00b5a0ee _CF_forwarding_prep_0 + 14
5 UIKit 0x01fd2cc7 -[UILabel _textRectForBounds:limitedToNumberOfLines:includingShadow:] + 57
6 UIKit 0x01fd2b13 -[UILabel textRectForBounds:limitedToNumberOfLines:] + 85
7 UIKit 0x01fd662e -[UILabel _intrinsicSizeWithinSize:] + 173
8 UIKit 0x01fd6751 -[UILabel intrinsicContentSize] + 91
9 UIKit 0x024b07ef -[UIView(UIConstraintBasedLayout) _generateContentSizeConstraints] + 36
10 UIKit 0x024b0480 -[UIView(UIConstraintBasedLayout) _updateContentSizeConstraints] + 511
11 UIKit 0x024b67bf -[UIView(AdditionalLayoutSupport) updateConstraints] + 110
12 UIKit 0x01fd6579 -[UILabel updateConstraints] + 189
13 UIKit 0x024b6058 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 239
14 UIKit 0x024b61d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
15 UIKit 0x024b6157 __UIViewRecursionHelper + 40
16 CoreFoundation 0x00b0bc69 CFArrayApplyFunction + 57
17 UIKit 0x024b5ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
18 UIKit 0x024b61d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
19 UIKit 0x024b6157 __UIViewRecursionHelper + 40
20 CoreFoundation 0x00b0bc69 CFArrayApplyFunction + 57
21 UIKit 0x024b5ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
22 UIKit 0x024b61d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
23 UIKit 0x024b6157 __UIViewRecursionHelper + 40
24 CoreFoundation 0x00b0bc69 CFArrayApplyFunction + 57
25 UIKit 0x024b5ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
26 UIKit 0x024b61d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
27 UIKit 0x024b6157 __UIViewRecursionHelper + 40
28 CoreFoundation 0x00b0bc69 CFArrayApplyFunction + 57
29 UIKit 0x024b5ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
30 UIKit 0x024b61d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
31 UIKit 0x024b6157 __UIViewRecursionHelper + 40
32 CoreFoundation 0x00b0bc69 CFArrayApplyFunction + 57
33 UIKit 0x024b5ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
34 UIKit 0x024b61d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
35 UIKit 0x024b6157 __UIViewRecursionHelper + 40
36 CoreFoundation 0x00b0bc69 CFArrayApplyFunction + 57
37 UIKit 0x024b5ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
38 UIKit 0x024b61d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
39 UIKit 0x024b6157 __UIViewRecursionHelper + 40
40 CoreFoundation 0x00b0bc69 CFArrayApplyFunction + 57
41 UIKit 0x024b5ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
42 UIKit 0x024b61d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
43 UIKit 0x024b6157 __UIViewRecursionHelper + 40
44 CoreFoundation 0x00b0bc69 CFArrayApplyFunction + 57
45 UIKit 0x024b5ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
46 UIKit 0x024b61d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
47 UIKit 0x024b6157 __UIViewRecursionHelper + 40
48 CoreFoundation 0x00b0bc69 CFArrayApplyFunction + 57
49 UIKit 0x024b5ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
50 UIKit 0x024b61d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
51 UIKit 0x024b6157 __UIViewRecursionHelper + 40
52 CoreFoundation 0x00b0bc69 CFArrayApplyFunction + 57
53 UIKit 0x024b5ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
54 UIKit 0x024b61d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
55 UIKit 0x024aa878 __62-[UIWindow(UIConstraintBasedLayout) updateConstraintsIfNeeded]_block_invoke + 43
56 Foundation 0x02f0b68c -[NSISEngine withBehaviors:performModifications:] + 107
57 Foundation 0x02d9b3c5 -[NSISEngine withAutomaticOptimizationDisabled:] + 48
58 UIKit 0x024aa590 -[UIWindow(UIConstraintBasedLayout) updateConstraintsIfNeeded] + 225
59 UIKit 0x024aa467 -[UIWindow(UIConstraintBasedLayout) layoutSublayersOfLayer:] + 90
60 libobjc.A.dylib 0x0316a82b -[NSObject performSelector:withObject:] + 70
61 QuartzCore 0x0171a45a -[CALayer layoutSublayers] + 148
62 QuartzCore 0x0170e244 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
63 QuartzCore 0x0170e0b0 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
64 QuartzCore 0x016747fa _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
65 QuartzCore 0x01675b85 _ZN2CA11Transaction6commitEv + 393
66 QuartzCore 0x01676258 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
67 CoreFoundation 0x00b3236e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
68 CoreFoundation 0x00b322bf __CFRunLoopDoObservers + 399
69 CoreFoundation 0x00b10254 __CFRunLoopRun + 1076
70 CoreFoundation 0x00b0f9d3 CFRunLoopRunSpecific + 467
71 CoreFoundation 0x00b0f7eb CFRunLoopRunInMode + 123
72 GraphicsServices 0x041945ee GSEventRunModal + 192
73 GraphicsServices 0x0419442b GSEventRun + 104
74 UIKit 0x01e18f9b UIApplicationMain + 1225
75 RestAppXXI 0x000305ed main + 141
76 libdyld.dylib 0x049eb6d9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
That is not relevant to your UITableView. That is most probably from a string you are trying to access, but it's nil.
User exception break point to debug, you are calling length method on NSNull object
And why to use NSTimer, you can reload table after getting response from server

IOS iPhone app crash with [NSObject(NSObject) doesNotRecognizeSelector:] and _objc_msgSend_uncached

Here is the crash report not sure why
Incident Identifier: 8F69B0C7-F57D-40C7-B8E7-7A846EDCFE2E
CrashReporter Key: e18182a2b39e52acee70b63eb8a627bf2e6392ec
Hardware Model: iPad2,2
Process: androppo [1105]
Path: /private/var/mobile/Containers/Bundle/Application/EA41AE7C-D8E6-49E3-B124-6FDA7F51A4BD/androppo.app/androppo
Identifier: buzoo.jp.roppow
Version: 1.1 (1.1)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2014-10-22 12:36:38.195 +0700
Launch Time: 2014-10-22 12:36:37.387 +0700
OS Version: iOS 8.1 (12B410)
Report Version: 105
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Last Exception Backtrace:
0 CoreFoundation 0x25d69d62 __exceptionPreprocess + 122
1 libobjc.A.dylib 0x33949c72 objc_exception_throw + 34
2 CoreFoundation 0x25d6f144 +[NSObject(NSObject) doesNotRecognizeSelector:] + 184
3 CoreFoundation 0x25d6d104 ___forwarding___ + 708
4 CoreFoundation 0x25c9e934 _CF_forwarding_prep_0 + 20
5 androppo 0x000def1c -[GADStatisticDictionary decrementNumberForKey:shouldNotifyDelegate:] + 68
6 androppo 0x000d3f30 -[GADApplication init] + 588
7 androppo 0x000d3cb8 __35+[GADApplication sharedApplication]_block_invoke + 40
8 libdispatch.dylib 0x33eaa40a _dispatch_client_callout + 18
9 libdispatch.dylib 0x33eb79e2 dispatch_once_f$VARIANT$mp + 58
10 androppo 0x000d3c88 +[GADApplication sharedApplication] + 148
11 androppo 0x000cf810 +[GADSlot initialize] + 72
12 libobjc.A.dylib 0x3394a4c0 _class_initialize + 532
13 libobjc.A.dylib 0x33950042 lookUpImpOrForward + 250
14 libobjc.A.dylib 0x3394ff3a _class_lookupMethodAndLoadCache3 + 30
15 libobjc.A.dylib 0x339561f4 _objc_msgSend_uncached + 20
16 androppo 0x000cd760 -[GADBannerView commonInitWithAdSize:] + 56
17 androppo 0x000cd9e0 -[GADBannerView initWithFrame:adSize:] + 164
18 androppo 0x000cdbbc -[GADBannerView initWithAdSize:] + 108
19 androppo 0x0007a9d8 -[MainPageVC addBannerOfAdmob] (MainPageVC.m:810)
20 androppo 0x00075bda -[MainPageVC viewDidLoad] (MainPageVC.m:105)
21 UIKit 0x2920e700 -[UIViewController loadViewIfRequired] + 596
22 UIKit 0x292b85a0 -[UINavigationController _layoutViewController:] + 28
23 UIKit 0x292b84c8 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 224
24 UIKit 0x292b7a4c -[UINavigationController _startTransition:fromViewController:toViewController:] + 60
25 UIKit 0x292b7786 -[UINavigationController _startDeferredTransitionIfNeeded:] + 574
26 UIKit 0x292b74ec -[UINavigationController __viewWillLayoutSubviews] + 40
27 UIKit 0x292b7484 -[UILayoutContainerView layoutSubviews] + 180
28 UIKit 0x2920bc1a -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 510
29 QuartzCore 0x28c36f60 -[CALayer layoutSublayers] + 132
30 QuartzCore 0x28c3294c CA::Layer::layout_if_needed(CA::Transaction*) + 356
31 QuartzCore 0x28c327d4 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 12
32 QuartzCore 0x28c321c2 CA::Context::commit_transaction(CA::Transaction*) + 218
33 QuartzCore 0x28c31fcc CA::Transaction::commit() + 320
34 UIKit 0x2946fa58 -[UIApplication _reportMainSceneUpdateFinished:] + 40
35 UIKit 0x294707f0 -[UIApplication _runWithMainScene:transitionContext:completion:] + 2496
36 UIKit 0x2947ac34 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke + 32
37 UIKit 0x2946ec26 -[UIApplication workspaceDidEndTransaction:] + 126
38 FrontBoardServices 0x2c4920dc __31-[FBSSerialQueue performAsync:]_block_invoke + 8
39 CoreFoundation 0x25d30608 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 8
40 CoreFoundation 0x25d2f8cc __CFRunLoopDoBlocks + 212
41 CoreFoundation 0x25d2e086 __CFRunLoopRun + 782
42 CoreFoundation 0x25c7b97c CFRunLoopRunSpecific + 472
43 CoreFoundation 0x25c7b78e CFRunLoopRunInMode + 102
44 UIKit 0x29272b82 -[UIApplication _run] + 554
45 UIKit 0x2926d97c UIApplicationMain + 1436
46 androppo 0x0007479a main (main.m:16)
47 androppo 0x000746ac start + 36
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x33faadfc __pthread_kill + 8
1 libsystem_pthread.dylib 0x3402ad0e pthread_kill + 58
2 libsystem_c.dylib 0x33f4a934 abort + 72
3 libc++abi.dylib 0x33156bb8 abort_message + 84
4 libc++abi.dylib 0x3317066a default_terminate_handler() + 262
5 libobjc.A.dylib 0x33949f0e _objc_terminate() + 190
6 libc++abi.dylib 0x3316ddec std::__terminate(void (*)()) + 76
7 libc++abi.dylib 0x3316d5ac __cxa_throw + 108
8 libobjc.A.dylib 0x33949d46 objc_exception_throw + 246
9 CoreFoundation 0x25d6f144 +[NSObject(NSObject) doesNotRecognizeSelector:] + 184
10 CoreFoundation 0x25d6d104 ___forwarding___ + 708
11 CoreFoundation 0x25c9e934 _CF_forwarding_prep_0 + 20
12 androppo 0x000def1c -[GADStatisticDictionary decrementNumberForKey:shouldNotifyDelegate:] + 68
13 androppo 0x000d3f30 -[GADApplication init] + 588
14 androppo 0x000d3cb8 __35+[GADApplication sharedApplication]_block_invoke + 40
15 libdispatch.dylib 0x33eaa40c _dispatch_client_callout + 20
16 libdispatch.dylib 0x33eb79e2 dispatch_once_f$VARIANT$mp + 58
17 androppo 0x000d3c88 +[GADApplication sharedApplication] + 148
18 androppo 0x000cf810 +[GADSlot initialize] + 72
19 libobjc.A.dylib 0x3394a4c0 _class_initialize + 532
20 libobjc.A.dylib 0x33950042 lookUpImpOrForward + 250
21 libobjc.A.dylib 0x3394ff3a _class_lookupMethodAndLoadCache3 + 30
22 libobjc.A.dylib 0x339561f6 _objc_msgSend_uncached + 22
23 androppo 0x000cd760 -[GADBannerView commonInitWithAdSize:] + 56
24 androppo 0x000cd9e0 -[GADBannerView initWithFrame:adSize:] + 164
25 androppo 0x000cdbbc -[GADBannerView initWithAdSize:] + 108
26 androppo 0x0007a9d8 -[MainPageVC addBannerOfAdmob] (MainPageVC.m:810)
27 androppo 0x00075bda -[MainPageVC viewDidLoad] (MainPageVC.m:105)
28 UIKit 0x2920e700 -[UIViewController loadViewIfRequired] + 596
29 UIKit 0x292b85a0 -[UINavigationController _layoutViewController:] + 28
30 UIKit 0x292b84c8 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 224
31 UIKit 0x292b7a4c -[UINavigationController _startTransition:fromViewController:toViewController:] + 60
32 UIKit 0x292b7786 -[UINavigationController _startDeferredTransitionIfNeeded:] + 574
33 UIKit 0x292b74ec -[UINavigationController __viewWillLayoutSubviews] + 40
34 UIKit 0x292b7484 -[UILayoutContainerView layoutSubviews] + 180
35 UIKit 0x2920bc1a -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 510
36 QuartzCore 0x28c36f60 -[CALayer layoutSublayers] + 132
37 QuartzCore 0x28c3294c CA::Layer::layout_if_needed(CA::Transaction*) + 356
38 QuartzCore 0x28c327d4 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 12
39 QuartzCore 0x28c321c2 CA::Context::commit_transaction(CA::Transaction*) + 218
40 QuartzCore 0x28c31fcc CA::Transaction::commit() + 320
41 UIKit 0x2946fa58 -[UIApplication _reportMainSceneUpdateFinished:] + 40
42 UIKit 0x294707f0 -[UIApplication _runWithMainScene:transitionContext:completion:] + 2496
43 UIKit 0x2947ac34 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke + 32
44 UIKit 0x2946ec28 -[UIApplication workspaceDidEndTransaction:] + 128
45 FrontBoardServices 0x2c4920de __31-[FBSSerialQueue performAsync:]_block_invoke + 10
46 CoreFoundation 0x25d3060a __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 10
47 CoreFoundation 0x25d2f8cc __CFRunLoopDoBlocks + 212
48 CoreFoundation 0x25d2e086 __CFRunLoopRun + 782
49 CoreFoundation 0x25c7b97c CFRunLoopRunSpecific + 472
50 CoreFoundation 0x25c7b78e CFRunLoopRunInMode + 102
51 UIKit 0x29272b82 -[UIApplication _run] + 554
52 UIKit 0x2926d97c UIApplicationMain + 1436
53 androppo 0x0007479a main (main.m:16)
54 androppo 0x000746ac start + 36
This happened when I tried to run the app's .ipa through profile mode or window->devices, then drag the .ipa file to my device's app list. Yet It didn't happen if it ran in normal mode (cmd + r). I have no idea about the crash log and what caused the crash happened. Could someone help me out, I must fix the issues today and submit to Itunes Connect. I would really appreciate the help. Thanks.

Random crash on setting UITabBarButton label attributed text (Tab Title)

I am not able to reproduce this crash but received this kind of crashes multiple times from production build. In my app tab bar is loaded from storyboard only and tab bar is always hidden all the time.
Does it's main cause is low memory? Any guess, how to solve or reproduce this kind of problems
Hardware Model: iPad2,4
OS Version: iPhone OS 7.0.4 (11B554a)
Report Version: 104
Exception Type: SIGABRT
Exception Codes: #0 at 0x393f71fc
Crashed Thread: 0
Application Specific Information:
*** Terminating app due to uncaught exception 'NSRangeException', reason: 'NSMutableRLEArray replaceObjectsInRange:withObject:length:: Out of bounds'
Last Exception Backtrace:
0 CoreFoundation 0x2e766f4b __exceptionPreprocess + 131
1 libobjc.A.dylib 0x38e386af objc_exception_throw + 38
2 CoreFoundation 0x2e766e8d +[NSException raise:format:] + 104
3 Foundation 0x2f089aff -[NSMutableRLEArray replaceObjectsInRange:withObject:length:] + 122
4 Foundation 0x2f088efb -[NSConcreteMutableAttributedString initWithString:attributes:] + 310
5 UIKit 0x30ee8ed7 -[NSAttributedString(UILabelAdditions) _ui_synthesizeAttributedSubstringFromRange:usingDefaultAttributes:] + 86
6 UIKit 0x30ee8c9f -[UILabel _synthesizedAttributedText] + 1010
7 UIKit 0x30ee8307 -[UILabel _textRectForBounds:limitedToNumberOfLines:includingShadow:] + 222
8 UIKit 0x30ee8213 -[UILabel textRectForBounds:limitedToNumberOfLines:] + 54
9 UIKit 0x30ee80fb -[UILabel _intrinsicSizeWithinSize:] + 162
10 UIKit 0x30ee8049 -[UILabel sizeThatFits:] + 32
11 UIKit 0x30ee7f37 -[UIView(Geometry) sizeToFit] + 126
12 UIKit 0x31002be1 -[UITabBarButton initWithImage:selectedImage:label:withInsets:] + 388
13 UIKit 0x31001a1f -[UITabBarItem(Static) _createViewForTabBar:showingBadge:withTint:idiom:] + 1170
14 UIKit 0x31001583 -[UITabBarItem(Static) _createViewForTabBar:showingBadge:idiom:] + 38
15 UIKit 0x30ffd859 -[UITabBarItem(Static) _updateViewForIdiom:positionItems:] + 160
16 UIKit 0x31004c43 -[UITabBar(Static) _configureItems:] + 406
17 UIKit 0x310042db -[UITabBar(Static) _positionTabBarButtons:ignoringItem:] + 1234
18 UIKit 0x3100133f -[UITabBar setItems:animated:] + 1358
19 UIKit 0x31000d29 -[UITabBarController _rebuildTabBarItemsAnimated:] + 800
20 UIKit 0x310051f9 -[UITabBarController _setSelectedViewController:] + 76
21 UIKit 0x30eeb6e5 +[UIView(Animation) performWithoutAnimation:] + 72
22 UIKit 0x31008bf7 -[UITabBarController _selectDefaultViewControllerIfNecessaryWithAppearanceTransitions:] + 218
23 UIKit 0x31008077 -[UITabBarController viewWillAppear:] + 134
24 UIKit 0x30ef40eb -[UIViewController _setViewAppearState:isAnimating:] + 346
25 CoreFoundation 0x2e6aff65 __53-[__NSArrayI enumerateObjectsWithOptions:usingBlock:]_block_invoke + 52
26 CoreFoundation 0x2e6a994d -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] + 220
27 UIKit 0x30ef4265 -[UIViewController _setViewAppearState:isAnimating:] + 724
28 UIKit 0x3106a4bf -[UINavigationController _startCustomTransition:] + 846
29 UIKit 0x30f88273 -[UINavigationController _startDeferredTransitionIfNeeded:] + 418
30 UIKit 0x30f8807d -[UINavigationController __viewWillLayoutSubviews] + 44
31 UIKit 0x30f88015 -[UILayoutContainerView layoutSubviews] + 184
32 UIKit 0x30ed9da3 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 346
33 QuartzCore 0x30b60c6b -[CALayer layoutSublayers] + 142
34 QuartzCore 0x30b5c47b CA::Layer::layout_if_needed(CA::Transaction*) + 350
35 QuartzCore 0x30b5c30d CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 16
36 QuartzCore 0x30b5bd1f CA::Context::commit_transaction(CA::Transaction*) + 230
37 QuartzCore 0x30b5bb2f CA::Transaction::commit() + 314
38 QuartzCore 0x30b5585d CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 56
39 CoreFoundation 0x2e7321cd __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
40 CoreFoundation 0x2e72fb71 __CFRunLoopDoObservers + 284
41 CoreFoundation 0x2e72feb3 __CFRunLoopRun + 730
42 CoreFoundation 0x2e69ac27 CFRunLoopRunSpecific + 522
43 CoreFoundation 0x2e69aa0b CFRunLoopRunInMode + 106
44 GraphicsServices 0x3336e283 GSEventRunModal + 138
45 UIKit 0x30f3e049 UIApplicationMain + 1136
46 MyApp main (in MyApp) (main.m:16)
47 libdyld.dylib 0x39340ab7 start + 2
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x393f71fc __pthread_kill + 8
1 libsystem_c.dylib 0x393a7ffd abort + 77
2 MyApp uncaught_exception_handler (in MyApp) + 27
3 CoreFoundation 0x2e76724f __handleUncaughtException + 579
4 libobjc.A.dylib 0x38e3890f _objc_terminate() + 175
5 libc++abi.dylib 0x386ed1c7 std::__terminate(void (*)()) + 79
6 libc++abi.dylib 0x386ecd2d __cxa_increment_exception_refcount + 1
7 libobjc.A.dylib 0x38e387f7 objc_exception_rethrow + 43
8 CoreFoundation 0x2e69ac9d CFRunLoopRunSpecific + 641
9 CoreFoundation 0x2e69aa0b CFRunLoopRunInMode + 106
10 GraphicsServices 0x3336e283 GSEventRunModal + 138
11 UIKit 0x30f3e049 UIApplicationMain + 1136
12 MyApp main (in MyApp) (main.m:16)
From you crash log, line 5
5 UIKit 0x30ee8ed7 -[NSAttributedString(UILabelAdditions) _ui_synthesizeAttributedSubstringFromRange:usingDefaultAttributes:] + 86
seems like you generate your attribute string based on
- (NSAttributedString *)attributedSubstringFromRange:(NSRange)aRange
Maybe set a break point at that code, and check if your string length is larger than or equal to the range.

Resources