Please Help!!! My app crash at [UITableViewCellContentView dealloc]

My view hierarchy:


loading: UINavigationController->rootviewcontroller = StartUpViewController


after login success: push a UITabBarController . UITabBarController.viewControllers = @[A, B , C, D]; viewcontroller A have a subview uitableview. i drag from storyboard


after logout; call [popToRootViewController];


sometimes crash at

* frame #0: 0x0000000180eb9b90 libobjc.A.dylib`objc_msgSend + 16

frame #1: 0x00000001821f5934 Foundation`empty + 72

frame #2: 0x0000000182150cf8 Foundation`-[NSConcreteMapTable dealloc] + 60

frame #3: 0x0000000182198888 Foundation`-[NSISEngine dealloc] + 104

frame #4: 0x00000001869886dc UIKit`-[UIView dealloc] + 624

frame #5: 0x0000000186a8c4c0 UIKit`-[UITableViewCellContentView dealloc] + 80



.i don't know the reason. who can help me



(lldb) bt

* thread #1: tid = 0x88efa, 0x0000000180eb9b90 libobjc.A.dylib`objc_msgSend + 16, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10)

* frame #0: 0x0000000180eb9b90 libobjc.A.dylib`objc_msgSend + 16

frame #1: 0x00000001821f5934 Foundation`empty + 72

frame #2: 0x0000000182150cf8 Foundation`-[NSConcreteMapTable dealloc] + 60

frame #3: 0x0000000182198888 Foundation`-[NSISEngine dealloc] + 104

frame #4: 0x00000001869886dc UIKit`-[UIView dealloc] + 624

frame #5: 0x0000000186a8c4c0 UIKit`-[UITableViewCellContentView dealloc] + 80

frame #6: 0x0000000180ec1ae8 libobjc.A.dylib`(anonymous namespace)::AutoreleasePoolPage::pop(void*) + 508

frame #7: 0x0000000181720abc CoreFoundation`_CFAutoreleasePoolPop + 28

frame #8: 0x0000000186c4c8f4 UIKit`_prepareForCAFlush + 352

frame #9: 0x000000018698aea4 UIKit`_UIApplicationHandleEventQueue + 4900

frame #10: 0x00000001817f9124 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24

frame #11: 0x00000001817f8bb8 CoreFoundation`__CFRunLoopDoSources0 + 540

frame #12: 0x00000001817f68b8 CoreFoundation`__CFRunLoopRun + 724

frame #13: 0x0000000181720d10 CoreFoundation`CFRunLoopRunSpecific + 384

frame #14: 0x0000000183008088 GraphicsServices`GSEventRunModal + 180

frame #15: 0x00000001869f5f70 UIKit`UIApplicationMain + 204

frame #16: 0x0000000100172114 DHOTT`main(argc=1, argv=0x000000016fd6bb00) + 124 at main.m:16

frame #17: 0x00000001812be8b8 libdyld.dylib`start + 4

(lldb) register read

General Purpose Registers:

x1 = 0x0000000187391ccc "countByEnumeratingWithState:objects:count:"

x19 = 0x0000000128928270

x20 = 0x0000000126800048

x21 = 0x0000000126800010

x22 = 0x0000000126800000

x23 = 0x00000001a01d90e0 libsystem_pthread.dylib`_thread + 224

x24 = 0x0000000126800000

x25 = 0x00000000a1a1a1a1

x26 = 0x6000489658fc9aa6

x27 = 0x00000001a01d90e0 libsystem_pthread.dylib`_thread + 224

x28 = 0xa3a3a3a3a3a3a3a3

fp = 0x000000016fd6a0f0

lr = 0x0000000186a8c4c0 UIKit`-[UITableViewCellContentView dealloc] + 80

sp = 0x000000016fd6a0d0

pc = 0x0000000186a8c4c0 UIKit`-[UITableViewCellContentView dealloc] + 80

19 registers were unavailable.



(lldb) po 0x0000000128928270

<UITableViewCellContentView: 0x128928270; frame = (0 0; 414 240.167); opaque = NO; gestureRecognizers = <NSArray: 0x12873be90>; layer = <CALayer: 0x125e32300>>



(lldb) po [0x0000000128928270 _autolayoutTrace]



•UITableViewCellContentView:0x128928270

| *UIView:0x125e57340

| | *Gadgets.CYView:0x125db1830

| | | *Gadgets.CYLabel:0x125e43290'Top This Week'

| | | *Gadgets.CYLabel:0x125d6a570'View all'

| | | *UIImageView:0x125e26050

| | | *Vod_HorizontalMovieListCe...:0x128a749f0

| | *UICollectionView:0x126858400

| | | •VodCardInfoCell:0x128a79910

| | | | +UIView:0x128a77ff0

| | | | | *UIView:0x128a77970

| | | | | | *UIImageView:0x128a770f0

| | | | | | *UILabel:0x1289d7f70' 1'

| | | | | | *UIImageView:0x128a76a30

| | | | | | *Gadgets.CYLabel:0x128bbd480'Spider Man'

| | | | | | *UILabel:0x128bbdac0'6.3'

| | | •VodCardInfoCell:0x1289f2420

| | | | +UIView:0x1289f2660

| | | | | *UIView:0x1289f27f0

| | | | | | *UIImageView:0x1289f2980

| | | | | | *UILabel:0x1289f2c20' 3'

| | | | | | *UIImageView:0x1289f3460

| | | | | | *Gadgets.CYLabel:0x1289f3d60'Civil War'

| | | | | | *UILabel:0x1289f43a0'8.3'

| | | •VodCardInfoCell:0x128c05390

| | | | +UIView:0x128c055d0

| | | | | *UIView:0x128c05760

| | | | | | *UIImageView:0x128c058f0

| | | | | | *UILabel:0x128c05b90' 2'

| | | | | | *UIImageView:0x128c063d0

| | | | | | *Gadgets.CYLabel:0x128c06cd0'Superman VS Batman'

| | | | | | *UILabel:0x128c07310'7.5'

| | | •VodCardInfoCell:0x128c10600

| | | | +UIView:0x128c10840

| | | | | *UIView:0x128c109d0

| | | | | | *UIImageView:0x128c10b60

| | | | | | *UILabel:0x1289d7290' 1'

| | | | | | *UIImageView:0x128c11080

| | | | | | *Gadgets.CYLabel:0x128c11500'Carol'

| | | | | | *UILabel:0x128be0f70'8.3'

| | | UIImageView:0x125d81c20



Legend:

* - is laid out with auto layout

+ - is laid out manually, but is represented in the layout engine because translatesAutoresizingMaskIntoConstraints = YES

• - layout engine host



(lldb)

Foundation includes a feature called "zombie objects" that is designed to help track stuff like this. With zombies enabled, hitting a deallocated object will give you a chance to see what's going on. Here's how to enable it:

  • Navigate to the Scheme editor. You can get here a variety of ways, but my favorite is to option-click the Run button.
  • Make sure the Run action is selected in the sidebar and then select the Diagnostics tab
  • Select "Enable Zombie Objects" (fourth from the top)

Then build and run and exercise the code that crashes. When it stops in the debugger, you'll see something in the console like "message sent to deallocated object 0x00..." Let me know what it says, and I'll try to help figure out what's going on.

I can locate the crash object, but I do not know why , do not know how to fix.


it crash at :

* frame #0: 0x0000000180eb9b90 libobjc.A.dylib`objc_msgSend + 16

frame #1: 0x00000001821f5934 Foundation`empty + 72

frame #2: 0x0000000182150cf8 Foundation`-[NSConcreteMapTable dealloc] + 60

frame #3: 0x0000000182198888 Foundation`-[NSISEngine dealloc] + 104

frame #4: 0x00000001869886dc UIKit`-[UIView dealloc] + 624

frame #5: 0x0000000186a8c4c0 UIKit`-[UITableViewCellContentView dealloc] + 80


i print UITableViewCellContentView address and view:


(lldb) register read

General Purpose Registers:

x1 = 0x0000000187391ccc "countByEnumeratingWithState:objects:count:"

x19 = 0x0000000128928270

x20 = 0x0000000126800048

x21 = 0x0000000126800010

x22 = 0x0000000126800000

x23 = 0x00000001a01d90e0 libsystem_pthread.dylib`_thread + 224

x24 = 0x0000000126800000

x25 = 0x00000000a1a1a1a1

x26 = 0x6000489658fc9aa6

x27 = 0x00000001a01d90e0 libsystem_pthread.dylib`_thread + 224

x28 = 0xa3a3a3a3a3a3a3a3

fp = 0x000000016fd6a0f0

lr = 0x0000000186a8c4c0 UIKit`-[UITableViewCellContentView dealloc] + 80

sp = 0x000000016fd6a0d0

pc = 0x0000000186a8c4c0 UIKit`-[UITableViewCellContentView dealloc] + 80

19 registers were unavailable.



(lldb) po 0x0000000128928270

<UITableViewCellContentView: 0x128928270; frame = (0 0; 414 240.167); opaque = NO; gestureRecognizers = <NSArray: 0x12873be90>; layer = <CALayer: 0x125e32300>>



(lldb) po [0x0000000128928270 _autolayoutTrace]



•UITableViewCellContentView:0x128928270

| *UIView:0x125e57340

| | *Gadgets.CYView:0x125db1830

| | | *Gadgets.CYLabel:0x125e43290'Top This Week'

| | | *Gadgets.CYLabel:0x125d6a570'View all'

| | | *UIImageView:0x125e26050

| | | *Vod_HorizontalMovieListCe...:0x128a749f0

| | *UICollectionView:0x126858400


UITableViewCellContentView is a subview of controller view. i drag it from xib. why i crash at system dealloc :

frame #2: 0x0000000182150cf8 Foundation`-[NSConcreteMapTable dealloc] + 60

frame #3: 0x0000000182198888 Foundation`-[NSISEngine dealloc] + 104

Forget the crash details for now and show some code:


Are you calling

[self.navigationController popToRootViewControllerAnimated:YES]
?


...and then maybe

[self.navigationController pushViewController:someOtherViewController]
?
Please Help!!! My app crash at [UITableViewCellContentView dealloc]
 
 
Q