调试跟进的时候发现,进入了viewDidLoad,viewWillAppear,然后处理了一些显示细节,页面结果是正确的,紧接着就调用了dealloc,结果导致我对tableview的任何操作都返回,message sent to deallocated instance,用僵尸模式调试跟进,发现....看不懂,就过来问了
_NSZombie_CityListViewContoller
stack[0]: addr = 0x15f381a0, type=malloc, frames:
[0] 0x0000000035278469 libsystem_malloc.dylib`malloc_zone_calloc + 129
[1] 0x00000000352783d7 libsystem_malloc.dylib`calloc + 51
[2] 0x0000000034bc3419 libobjc.A.dylib`class_createInstance + 41
[3] 0x0000000034bd4eb5 libobjc.A.dylib`_objc_rootAlloc + 33
[4] 0x000000002a184815 UIKit`-[UIClassSwapper initWithCoder:] + 117
[5] 0x000000002a23e915 UIKit`UINibDecoderDecodeObjectForValue + 853
[6] 0x000000002a23e5b3 UIKit`-[UINibDecoder decodeObjectForKey:] + 335
[7] 0x000000002a184497 UIKit`-[UIRuntimeConnection initWithCoder:] + 151
[8] 0x000000002a23e915 UIKit`UINibDecoderDecodeObjectForValue + 853
[9] 0x000000002a23e86b UIKit`UINibDecoderDecodeObjectForValue + 683
[10] 0x000000002a23e5b3 UIKit`-[UINibDecoder decodeObjectForKey:] + 335
[11] 0x000000002a183b7f UIKit`-[UINib instantiateWithOwner:options:] + 959
[12] 0x000000002a2ff81d UIKit`-[UIStoryboard instantiateViewControllerWithIdentifier:] + 197
[13] 0x00000000000e62f3 MapTest`-[OfflineMapViewController actionButtonChickCityList:] + 155 at ViewController.m:1207:28
[14] 0x0000000029de447b UIKit`-[UIApplication sendAction:to:from:forEvent:] + 71
[15] 0x0000000029de4421 UIKit`-[UIControl sendAction:to:forEvent:] + 45
[16] 0x0000000029dcefc5 UIKit`-[UIControl _sendActionsForEvents:withEvent:] + 585
[17] 0x0000000029de3e61 UIKit`-[UIControl touchesEnded:withEvent:] + 585
[18] 0x0000000029de3b33 UIKit`-[UIWindow _sendTouchesForEvent:] + 523
[19] 0x0000000029ddd441 UIKit`-[UIWindow sendEvent:] + 541
[20] 0x0000000029db3605 UIKit`-[UIApplication sendEvent:] + 197
[21] 0x000000002a029cff UIKit`_UIApplicationHandleEventFromQueueEvent + 14539
[22] 0x0000000029db2007 UIKit`_UIApplicationHandleEventQueue + 1351
[23] 0x000000002658022f CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
[24] 0x000000002657f643 CoreFoundation`__CFRunLoopDoSources0 + 223
[25] 0x000000002657dcc1 CoreFoundation`__CFRunLoopRun + 769
[26] 0x00000000264c99a1 CoreFoundation`CFRunLoopRunSpecific + 477
[27] 0x00000000264c97b3 CoreFoundation`CFRunLoopRunInMode + 107
[28] 0x000000002dfe71a9 GraphicsServices`GSEventRunModal + 137
[29] 0x0000000029e13095 UIKit`UIApplicationMain + 1441
[30] 0x00000000000f22e9 MapTest`main + 109 at main.m:14:16
[31] 0x0000000035186aaf libdyld.dylib`start + 3
[32] 0x37b4e9dd