Unable to understand the real cause behind this symbolicated crash report affecting only iOS 4.3.x users - iphone

Many of my app users are experiencing following crash.
It is only affecting users on iOS 4.3.x (Device could be any - iPhone/iPad/iPod)
0 libobjc.A.dylib 0x34f00c98 objc_msgSend + 15
1 CoreFoundation 0x3134bc43 -[NSObject(NSObject) release] + 30
2 UIKit 0x314c900f -[UIViewController dealloc] + 174
3 UIKit 0x3151f0cd -[UITableViewController dealloc] + 124
4 MyApp 0x0001f985 -[WebNotesListViewController dealloc] (WebNotesListViewController.m:61)
5 CoreFoundation 0x3134bc43 -[NSObject(NSObject) release] + 30
6 MyApp 0x41b3 __arclite_objc_storeStrong (arclite.m:252)
7 MyApp 0x000bc44d -[CountTouchGR .cxx_destruct] (CountTouchGR.m:13)
8 libobjc.A.dylib 0x34f01961 object_cxxDestructFromClass + 52
9 libobjc.A.dylib 0x34f03b15 object_cxxDestruct + 12
10 libobjc.A.dylib 0x34f03b25 objc_destructInstance + 12
11 libobjc.A.dylib 0x34f01917 object_dispose + 26
12 CoreFoundation 0x3134bee5 -[NSObject(NSObject) dealloc] + 24
13 UIKit 0x314aead7 -[UIGestureRecognizer dealloc] + 346
14 UIKit 0x316aefc3 -[UISwipeGestureRecognizer dealloc] + 62
15 CoreFoundation 0x3134bc43 -[NSObject(NSObject) release] + 30
16 CoreFoundation 0x3134c1a1 CFRelease + 68
17 CoreFoundation 0x31352139 -[__NSArrayM removeObjectAtIndex:] + 88
18 CoreFoundation 0x3135a9dd -[NSMutableArray removeAllObjects] + 36
19 UIKit 0x31470fcf -[UIView(UIViewGestures) removeAllGestureRecognizers] + 174
20 UIKit 0x31470e6f -[UIView dealloc] + 294
21 UIKit 0x315b27e5 -[UIScrollView dealloc] + 252
22 UIKit 0x315bed0d -[UITableView dealloc] + 676
23 CoreFoundation 0x3134bc43 -[NSObject(NSObject) release] + 30
24 UIKit 0x314828df -[UIViewController setView:] + 270
25 UIKit 0x315759cb -[UIViewController unloadViewForced:] + 78
26 UIKit 0x315856b9 -[UIViewController unloadViewIfReloadable] + 16
27 UIKit 0x315cc12d -[UIViewController purgeMemoryForReason:] + 40
28 UIKit 0x315cc14d -[UIViewController didReceiveMemoryWarning] + 16
29 MyApp 0x0001fc3b -[WebNotesListViewController didReceiveMemoryWarning] (WebNotesListViewController.m:101)
30 UIKit 0x315cc163 -[UIViewController _didReceiveMemoryWarning:] + 14
31 Foundation 0x34c28183 _nsnote_callback + 142
32 CoreFoundation 0x313b620f __CFXNotificationPost_old + 402
33 CoreFoundation 0x31350eeb _CFXNotificationPostNotification + 118
34 Foundation 0x34c255d3 -[NSNotificationCenter postNotificationName:object:userInfo:] + 70
35 Foundation 0x34c271c1 -[NSNotificationCenter postNotificationName:object:] + 24
36 UIKit 0x315a2361 -[UIApplication _performMemoryWarning] + 48
37 UIKit 0x315a2d83 -[UIApplication _receivedMemoryNotification] + 126
38 UIKit 0x315a0507 _memoryStatusChanged + 42
39 CoreFoundation 0x313b6d69 __CFNotificationCenterDarwinCallBack + 24
40 CoreFoundation 0x313b3bdf __CFMachPortPerform + 210
41 CoreFoundation 0x313bea97 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
42 CoreFoundation 0x313c083f __CFRunLoopDoSource1 + 166
43 CoreFoundation 0x313c160d __CFRunLoopRun + 520
44 CoreFoundation 0x31351ec3 CFRunLoopRunSpecific + 230
45 CoreFoundation 0x31351dcb CFRunLoopRunInMode + 58
46 GraphicsServices 0x30cd041f GSEventRunModal + 114
47 GraphicsServices 0x30cd04cb GSEventRun + 62
48 UIKit 0x31477d69 -[UIApplication _run] + 404
49 UIKit 0x31475807 UIApplicationMain + 670
50 MyApp 0x4239 main (main.m:14)
I am unable to decipher the real cause (Can converting to ARC has any relation with it?).

You're sending a message to an object which has already been deallocated. Try reproducing the crash while using the NSZombies instrument.
Also, without Zombies, try setting a breakpoint at the beginning of [WebNotesListViewController dealloc] and stepping through until you hit the crash.

Seems like WebNotesListViewController.m:101 got a memory warning. Hence it (the view) was unloaded and in the process deallocated. And then one of its attributes were referenced giving an EXEC_BAD_ACCESS

In the didReceiveMemoryWarning method of WebNotesListViewController you are doing something you should not in releasing memory - hard to say exactly what but it seems to have something to do with your table.
Pretty sure it is related to the ARC conversion, see what the code might be doing in that method.
EDIT:
On second look, do you still have a dealloc in your WebNotesListViewController class - the crash is really coming from that class being deallocated.

The problem was related to CountTouchGR class...
I do not know the exact technical reason.. but it needed to be declared as global variable, not in viewDidLoad as was being done earlier.
Thanks to all who tried helping.

Related

SIGABRT Error swift

Could anyone help me understand why Im getting this error? It seems to be happening when I load one of my view controllers but I can't see why.
What usually causes an error like this?
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITextInputTraits length]: unrecognized selector sent to instance 0x7fbf924828a0'
*** First throw call stack:
(
0 CoreFoundation 0x000000010664ac65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000105f27bb7 objc_exception_throw + 45
2 CoreFoundation 0x00000001066520ad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00000001065a813c ___forwarding___ + 988
4 CoreFoundation 0x00000001065a7cd8 _CF_forwarding_prep_0 + 120
5 libswiftCore.dylib 0x0000000107ddf728 _TTSf4g_d___TFSSCfMSSFT12_cocoaStringPSs9AnyObject__SS + 120
6 libswiftCore.dylib 0x0000000107dc01a3 _TFSSCfMSSFT12_cocoaStringPSs9AnyObject__SS + 19
7 Project1 0x00000001054ec3bd _TToFC8ASA_Rank22SettingsViewControllers9ASANumberSS + 61
8 Foundation 0x0000000105abdb53 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
9 CoreFoundation 0x0000000106592d50 -[NSArray makeObjectsPerformSelector:] + 224
10 UIKit 0x0000000106d1b4eb -[UINib instantiateWithOwner:options:] + 1506
11 UIKit 0x0000000106b736d8 -[UIViewController _loadViewFromNibNamed:bundle:] + 242
12 UIKit 0x0000000106b73cc8 -[UIViewController loadView] + 109
13 UIKit 0x0000000106b73f39 -[UIViewController loadViewIfRequired] + 75
14 UIKit 0x0000000106b743ce -[UIViewController view] + 27
15 UIKit 0x000000010710132d -[_UIFullscreenPresentationController _setPresentedViewController:] + 65
16 UIKit 0x0000000106b4ed69 -[UIPresentationController initWithPresentedViewController:presentingViewController:] + 105
17 UIKit 0x0000000106b80248 -[UIViewController _presentViewController:withAnimationController:completion:] + 1761
18 UIKit 0x0000000106b826c1 __62-[UIViewController presentViewController:animated:completion:]_block_invoke + 132
19 UIKit 0x0000000106b825e5 -[UIViewController presentViewController:animated:completion:] + 229
20 UIKit 0x0000000106a44d62 -[UIApplication sendAction:to:from:forEvent:] + 75
21 UIKit 0x0000000106b5650a -[UIControl _sendActionsForEvents:withEvent:] + 467
22 UIKit 0x0000000106b558d9 -[UIControl touchesEnded:withEvent:] + 522
23 UIKit 0x0000000106a91958 -[UIWindow _sendTouchesForEvent:] + 735
24 UIKit 0x0000000106a92282 -[UIWindow sendEvent:] + 682
25 UIKit 0x0000000106a58541 -[UIApplication sendEvent:] + 246
26 UIKit 0x0000000106a65cdc _UIApplicationHandleEventFromQueueEvent + 18265
27 UIKit 0x0000000106a4059c _UIApplicationHandleEventQueue + 2066
28 CoreFoundation 0x000000010657e431 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
29 CoreFoundation 0x00000001065742fd __CFRunLoopDoSources0 + 269
30 CoreFoundation 0x0000000106573934 __CFRunLoopRun + 868
31 CoreFoundation 0x0000000106573366 CFRunLoopRunSpecific + 470
32 GraphicsServices 0x000000010a1e0a3e GSEventRunModal + 161
33 UIKit 0x0000000106a438c0 UIApplicationMain + 1282
34 Project1 0x00000001054f70c7 main + 135
35 libdyld.dylib 0x0000000108530145 start + 1
36 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Please ask for any other informations that is helpful
Thanks
You most likely have an Outlet assigned to an element on the view controller you are transitioning to that is no longer connected to your code. This youtube video explains it in more detail.
To hunt down this issue, try right-clicking on all your elements (UILabels, UIViews, UIButton...) with the assistant editor open and cross check to see if the outlet name is referenced in the view controller.

long press gesture issue

I have long press gesture in my app and it works good in ios 5.0 but in ios 4.3 i have exception. Here what i see in debug
[UILongPressGestureRecognizer initWithCoder:]: unrecognized selector sent to instance 0x5863360
2012-03-23 23:39:30.384 Woods2[289:ef03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UILongPressGestureRecognizer initWithCoder:]: unrecognized selector sent to instance 0x5863360'
*** Call stack at first throw:
(
0 CoreFoundation 0x013415a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x01ce6313 objc_exception_throw + 44
2 CoreFoundation 0x013430bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x012b2966 ___forwarding___ + 966
4 CoreFoundation 0x012b2522 _CF_forwarding_prep_0 + 50
5 UIKit 0x005bb9fd UINibDecoderDecodeObjectForValue + 2592
6 UIKit 0x005bb2f5 UINibDecoderDecodeObjectForValue + 792
7 UIKit 0x005bc6ac -[UINibDecoder decodeObjectForKey:] + 398
8 UIKit 0x004d0c54 -[UINib instantiateWithOwner:options:] + 834
9 UIKit 0x004d2ab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
10 UIKit 0x00388628 -[UIViewController _loadViewFromNibNamed:bundle:] + 70
11 UIKit 0x00386134 -[UIViewController loadView] + 120
12 UIKit 0x0038600e -[UIViewController view] + 56
13 Woods2 0x00004f37 -[FirstViewController viewDidLoad] + 1671
14 UIKit 0x00386089 -[UIViewController view] + 179
15 UIKit 0x00398f54 -[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:] + 120
16 UIKit 0x00397aaa -[UITabBarController transitionFromViewController:toViewController:] + 64
17 UIKit 0x003998a2 -[UITabBarController _setSelectedViewController:] + 263
18 UIKit 0x00399d5e -[UITabBarController viewWillLayoutSubviews] + 170
19 UIKit 0x004aa2e9 -[UILayoutContainerView layoutSubviews] + 226
20 QuartzCore 0x019faa5a -[CALayer layoutSublayers] + 181
21 QuartzCore 0x019fcddc CALayerLayoutIfNeeded + 220
22 QuartzCore 0x019a20b4 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 310
23 QuartzCore 0x019a3294 _ZN2CA11Transaction6commitEv + 292
24 UIKit 0x002d89c9 -[UIApplication _reportAppLaunchFinished] + 39
25 UIKit 0x002d8e83 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 690
26 UIKit 0x002e3617 -[UIApplication handleEvent:withNewEvent:] + 1533
27 UIKit 0x002dbabf -[UIApplication sendEvent:] + 71
28 UIKit 0x002e0f2e _UIApplicationHandleEvent + 7576
29 GraphicsServices 0x015eb992 PurpleEventCallback + 1550
30 CoreFoundation 0x01322944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
31 CoreFoundation 0x01282cf7 __CFRunLoopDoSource1 + 215
32 CoreFoundation 0x0127ff83 __CFRunLoopRun + 979
33 CoreFoundation 0x0127f840 CFRunLoopRunSpecific + 208
34 CoreFoundation 0x0127f761 CFRunLoopRunInMode + 97
35 UIKit 0x002d87d2 -[UIApplication _run] + 623
36 UIKit 0x002e4c93 UIApplicationMain + 1160
37 Woods2 0x00001c2a main + 170
38 Woods2 0x00001b75 start + 53
)
terminate called throwing an exceptionkill
Thank you very much for help
Here is the some code in viewdidload
UILongPressGestureRecognizer *lpgr = [[UILongPressGestureRecognizer alloc]
initWithTarget:self action:#selector(handleLongPress:)];
lpgr.minimumPressDuration = 0.2; //user needs to press for 2 seconds
[mapView addGestureRecognizer:lpgr];
[lpgr release];
That trace data is much better formatted now. Now I see it's happening on the loadFromNib, not even when the user performs a long press. And it makes sense especially if the nib was copied in from another project.
Please see if you can find a gesture recognizer in your nib. If it's there, check the connections inspector. It might have some invalid references, possibly to symbols in another project. (You'll probably see a little "!" near one or more of the connections).
If you find that, then problem solved. Delete it, and use the GR you've set up in code. (or re-configure the pointers in the nib and comment out the code in viewDidLoad:).

using testFlight i got my application crash log but don't know what went wrong

I have one application and in beta testing i got my application crash but i am not able to understand what is wrong with it, can you suggest me where to look, Thanks :)
0 TurfNutritionTool_ver_5.1 0x00189642 testflight_backtrace + 142
1 TurfNutritionTool_ver_5.1 0x0018a1d0 TFSignalHandler + 212
2 libsystem_c.dylib 0x3174872e _sigtramp + 42
3 UIKit 0x362f2aa0 -[UITableView dealloc] + 56
4 CoreFoundation 0x317b5c42 -[NSObject(NSObject) release] + 30
5 libobjc.A.dylib 0x3125d50c objc_setProperty_non_gc + 120
6 libobjc.A.dylib 0x31255046 objc_setProperty + 26
7 TurfNutritionTool_ver_5.1 0x001051c8 -[TNTScenarioViewController setScenarioTable:] (TNTScenarioViewController.m:15)
8 TurfNutritionTool_ver_5.1 0x00103610 -[TNTScenarioViewController viewDidUnload] (TNTScenarioViewController.m:160)
9 UIKit 0x362a9a28 -[UIViewController unloadViewForced:] + 172
10 UIKit 0x362b96b8 -[UIViewController unloadViewIfReloadable] + 16
11 UIKit 0x3630012c -[UIViewController purgeMemoryForReason:] + 40
12 UIKit 0x3630014c -[UIViewController didReceiveMemoryWarning] + 16
13 TurfNutritionTool_ver_5.1 0x00102682 -[TNTScenarioViewController didReceiveMemoryWarning] (TNTScenarioViewController.m:40)
14 UIKit 0x36300162 -[UIViewController _didReceiveMemoryWarning:] + 14
15 Foundation 0x3113f182 _nsnote_callback + 142
16 CoreFoundation 0x3182020e __CFXNotificationPost_old + 402
17 CoreFoundation 0x317baeea _CFXNotificationPostNotification + 118
18 Foundation 0x3113c5d2 -[NSNotificationCenter postNotificationName:object:userInfo:] + 70
19 Foundation 0x3113e1c0 -[NSNotificationCenter postNotificationName:object:] + 24
20 UIKit 0x362d6360 -[UIApplication _performMemoryWarning] + 48
21 UIKit 0x362d6d82 -[UIApplication _receivedMemoryNotification] + 126
22 UIKit 0x362d4506 _memoryStatusChanged + 42
23 CoreFoundation 0x31820d68 __CFNotificationCenterDarwinCallBack + 24
24 CoreFoundation 0x3181dbde __CFMachPortPerform + 210
25 CoreFoundation 0x31828a96 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
26 CoreFoundation 0x3182a83e __CFRunLoopDoSource1 + 166
27 CoreFoundation 0x3182b60c __CFRunLoopRun + 520
28 CoreFoundation 0x317bbec2 CFRunLoopRunSpecific + 230
29 CoreFoundation 0x317bbdca CFRunLoopRunInMode + 58
30 GraphicsServices 0x336d641e GSEventRunModal + 114
31 GraphicsServices 0x336d64ca GSEventRun + 62
32 UIKit 0x361abd68 -[UIApplication _run] + 404
33 UIKit 0x361a9806 UIApplicationMain + 670
34 TurfNutritionTool_ver_5.1 0x000edb68 main (main.m:14)
35 TurfNutritionTool_ver_5.1 0x000edb27 start + 39
Are you familiar with the concept of a stack trace? What you are looking at are the lines of code execution from the crash (0) back to a recent frame entry. As such, this is referred to as a 'back trace' since it goes backwards from the point that the code stopped executing.
I have no knowledge of your code, but you can see from line 14 of the back trace that you received a low memory warning. This warning caused a chain of unload events, including a deallocation of a UITableView (line 3).
This is immediately followed by the _sigtramp, which probably indicates an EXC_BAD_ACCESS. My guess, without seeing the rest of your code, is that you are accessing something that has been released by the low memory unload situation.

Error when testing application on iPhone, but no error in simulator

I get the below error when I test my application on my iPhone, yet the error doesnt occur in the Simulator. Its when I load up my rootViewController which is a UITableView. I am relatively new to iOS programming, and I was just wondering if anybody could shed any light on it!
Regards,
Michael.
Use this code to go to my RootView.
- (IBAction)goToRootView {
RootViewController *rootViewController = [[RootViewController alloc] initWithStyle:UITableViewStyleGrouped];
[self.navigationController pushViewController:rootViewController animated:YES];
[rootViewController release];
}
2011-09-12 14:39:55.951 LeagueProject[773:707] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSMutableArray objectAtIndex:]: index 0 beyond bounds for empty array'
*** Call stack at first throw:
(
0 CoreFoundation 0x3684b64f __exceptionPreprocess + 114
1 libobjc.A.dylib 0x33aa4c5d objc_exception_throw + 24
2 CoreFoundation 0x367b6069 -[__NSArrayM objectAtIndex:] + 184
3 LeagueProject 0x0000302f -[RootViewController tableView:numberOfRowsInSection:] + 58
4 UIKit 0x356827c7 -[UISectionRowData refreshWithSection:tableView:tableViewRowData:] + 1338
5 UIKit 0x356836bb -[UITableViewRowData rectForFooterInSection:] + 66
6 UIKit 0x356835f5 -[UITableViewRowData heightForTable] + 40
7 UIKit 0x35683453 -[UITableView(_UITableViewPrivate) _updateContentSize] + 206
8 UIKit 0x3567ebc9 -[UITableView _rectChangedWithNewSize:oldSize:] + 384
9 UIKit 0x3567d833 -[UITableView setFrame:] + 158
10 UIKit 0x35684e0f -[UIView(Geometry) resizeWithOldSuperviewSize:] + 274
11 UIKit 0x356510bd -[UIView(Geometry) resizeSubviewsWithOldSize:] + 120
12 UIKit 0x356364e9 -[UIView(Geometry) setFrame:] + 336
13 UIKit 0x35688193 -[UIViewControllerWrapperView setFrame:] + 62
14 UIKit 0x35676079 -[UINavigationController _startTransition:fromViewController:toViewController:] + 960
15 UIKit 0x35675c43 -[UINavigationController _startDeferredTransitionIfNeeded] + 182
16 UIKit 0x35667d5d -[UINavigationController pushViewController:transition:forceImmediate:] + 640
17 UIKit 0x35667ad3 -[UINavigationController pushViewController:animated:] + 34
18 LeagueProject 0x0000917d -[splashView goToRootView] + 116
19 CoreFoundation 0x367bb571 -[NSObject(NSObject) performSelector:withObject:withObject:] + 24
20 UIKit 0x3564dec9 -[UIApplication sendAction:to:from:forEvent:] + 84
21 UIKit 0x3564de69 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 32
22 UIKit 0x3564de3b -[UIControl sendAction:to:forEvent:] + 38
23 UIKit 0x3564db8d -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 356
24 UIKit 0x3564e423 -[UIControl touchesEnded:withEvent:] + 342
25 UIKit 0x3564cbf5 -[UIWindow _sendTouchesForEvent:] + 368
26 UIKit 0x3564c56f -[UIWindow sendEvent:] + 262
27 UIKit 0x35635313 -[UIApplication sendEvent:] + 298
28 UIKit 0x35634c53 _UIApplicationHandleEvent + 5090
29 GraphicsServices 0x35f6fe77 PurpleEventCallback + 666
30 CoreFoundation 0x36822a97 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
31 CoreFoundation 0x3682483f __CFRunLoopDoSource1 + 166
32 CoreFoundation 0x3682560d __CFRunLoopRun + 520
33 CoreFoundation 0x367b5ec3 CFRunLoopRunSpecific + 230
34 CoreFoundation 0x367b5dcb CFRunLoopRunInMode + 58
35 GraphicsServices 0x35f6f41f GSEventRunModal + 114
36 GraphicsServices 0x35f6f4cb GSEventRun + 62
37 UIKit 0x3565fd69 -[UIApplication _run] + 404
38 UIKit 0x3565d807 UIApplicationMain + 670
39 LeagueProject 0x000025a7 main + 82
40 LeagueProject 0x00002550 start + 40
)
terminate called after throwing an instance of 'NSException'
Your error is an index 0 beyond bounds for empty array error. Put breakpoints on the lines where you access arrays. When you find out which array is causing the problem, either the solution will be trivial, or you can add a bit more to your question and ask for further help.
It looks like the problem is in your implementation of [RootViewController tableView:numberOfRowsInSection:]. You are trying to access a member of a NSMutableArray that is empty - hence the error 'index 0 beyond bounds for empty array'.

unrecognized selector sent to instance. Method being called for random objects

Ok, so this has me completely stumped just like the guy here with the exact problem.
I have a UITableView with some rows in a view controller which supports autorotation and sometimes, if i rotate the phone, i get "EXC_BAD_ACCESS" and sometimes i get SIGABRT with a stack trace like:
2010-11-19 16:51:05.634 [2306:307] -[CABasicAnimation numberOfSectionsInTableView:]: unrecognized selector sent to instance 0x58207d0
2010-11-19 16:51:05.688 [2306:307] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CABasicAnimation numberOfSectionsInTableView:]: unrecognized selector sent to instance 0x58207d0'
*** Call stack at first throw:
(
0 CoreFoundation 0x344aaed3 __exceptionPreprocess + 114
1 libobjc.A.dylib 0x33975811 objc_exception_throw + 24
2 CoreFoundation 0x344ac683 -[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3 CoreFoundation 0x344541d9 ___forwarding___ + 508
4 CoreFoundation 0x34453f90 _CF_forwarding_prep_0 + 48
5 UIKit 0x31b20717 -[UITableViewRowData(UITableViewRowDataPrivate) _updateNumSections] + 66
6 UIKit 0x31b20677 -[UITableViewRowData invalidateAllSections] + 50
7 UIKit 0x31b2048d -[UITableView(_UITableViewPrivate) _updateRowData] + 64
8 UIKit 0x31b22941 -[UITableView(_UITableViewPrivate) _ensureRowDataIsLoaded] + 24
9 UIKit 0x31b22909 -[UITableView numberOfSections] + 16
10 UIKit 0x31bd114f -[UISearchDisplayController _updateNoSearchResultsMessageVisiblity] + 54
11 UIKit 0x31cfbef7 -[UISearchDisplayController windowWillAnimateRotation:] + 478
12 Foundation 0x3325d6b3 _nsnote_callback + 142
13 CoreFoundation 0x34431713 __CFXNotificationPost_old + 402
14 CoreFoundation 0x344313b3 _CFXNotificationPostNotification + 118
15 Foundation 0x3324cdb7 -[NSNotificationCenter postNotificationName:object:userInfo:] + 70
16 UIKit 0x31b5dbb7 -[UIWindow _setRotatableClient:toOrientation:duration:force:] + 3114
17 UIKit 0x31b64013 -[UIWindow _setRotatableViewOrientation:duration:force:] + 50
18 UIKit 0x31b39a0f -[UIWindow _updateToInterfaceOrientation:duration:force:] + 74
19 UIKit 0x31b39be9 -[UIWindow _updateInterfaceOrientationFromDeviceOrientation:] + 112
20 UIKit 0x31b39b15 -[UIWindow _handleDeviceOrientationChange:] + 88
21 Foundation 0x3325d6b3 _nsnote_callback + 142
22 CoreFoundation 0x34431713 __CFXNotificationPost_old + 402
23 CoreFoundation 0x344313b3 _CFXNotificationPostNotification + 118
24 Foundation 0x3324cdb7 -[NSNotificationCenter postNotificationName:object:userInfo:] + 70
25 UIKit 0x31b0d0ed -[UIDevice setOrientation:animated:] + 144
26 UIKit 0x31b2a51b -[UIApplication handleEvent:withNewEvent:] + 2738
27 UIKit 0x31b29901 -[UIApplication sendEvent:] + 44
28 UIKit 0x31b29337 _UIApplicationHandleEvent + 5110
29 GraphicsServices 0x3026c04b PurpleEventCallback + 666
30 CoreFoundation 0x3443fce3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
31 CoreFoundation 0x3443fca7 __CFRunLoopDoSource1 + 166
32 CoreFoundation 0x3443256d __CFRunLoopRun + 520
33 CoreFoundation 0x34432277 CFRunLoopRunSpecific + 230
34 CoreFoundation 0x3443217f CFRunLoopRunInMode + 58
35 GraphicsServices 0x3026b5f3 GSEventRunModal + 114
36 GraphicsServices 0x3026b69f GSEventRun + 62
37 UIKit 0x31ad0123 -[UIApplication _run] + 402
38 UIKit 0x31ace12f UIApplicationMain + 670
39 App 0x0000285f main + 70
40 App 0x00002814 start + 40
)
terminate called after throwing an instance of 'NSException'
Program received signal: “SIGABRT”.
In this case it is CABasicAnimation on which numberOfSectionsInTableView is being called but sometimes there are class names like NSMachPort which i have never heard of. Also, the method being called numberOfSectionsInTableView remains the same with the class names changing to always give a doesNotRecognizeSelector exception.
Also this problem only happens when i try to rotate the device. Whenever i get a stack trace like above, there are all system functions which makes it difficult to debug.
Really need some expert advice on this. Please read the forum mentioned above to be clear about the issue.
Whoa! I thought i knew NSZombies enough but i was wrong!
I enabled NSZombies which led me to:
*** -[ContactsViewController numberOfSectionsInTableView:]: message sent to deallocated instance 0x88dafa0
Doing "po 0x88dafa0" wont work because that object's memory was already freed.
Some more Googling led me to this where the author describes how to find freed/deallocated objects. We just have to set MallocStackLoggingNoCompact to 1 in the Variables to be set in the environment along with NSZombieEnabled.
The output i got with the info malloc-history 0xf270740 command had a line:
-[VoicePlayController actionSheet:clickedButtonAtIndex:] at /Users/Documents/Xcode Projects/Classes/VoicePlayController.m:454
The code on that line is:
contactsViewController = [[ContactsViewController alloc] initWithNibName:#"ContactsViewController" bundle:nil];
I moved the [contactsViewController release]; line to dealloc method instead of immediately after [self.navigationController presentModalViewController:contactsViewController animated:YES]; and the problem is gone!
Start with enabling NSZombies. What it sounds like is you are over-releasing an object.