2010-11-19 4 views
2

그래,이게 정확히 here 정확한 문제를 가진 사람처럼 완전하게 난처하게 만들었습니다.인식 할 수없는 셀렉터가 인스턴스로 전송되었습니다. 임의의 객체에 대해 호출되는 메서드

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        0x31ad-[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”. 

:

나는 내가 전화를 회전하면, 내가 "EXC_BAD_ACCESS"를 얻을 때로는 내가 좋아하는 스택 추적과 SIGABRT를 얻을, 때로는 자동 회전을 지원하고 뷰 컨트롤러의 일부 행과 UITableView가 이 경우 CABasicAnimation이 있는데 그 중 numberOfSectionsInTableView이 호출되었지만 때로는 들어 본 적이없는 NSMachPort과 같은 클래스 이름이 있습니다. 또한 numberOfSectionsInTableView이라는 메서드는 클래스 이름이 항상 doesNotRecognizeSelector 예외로 변경되면서 동일하게 유지됩니다.

또한이 문제는 장치를 회전하려고 할 때만 발생합니다. 위와 같은 스택 트레이스가 생길 때마다 디버깅하기 어려운 모든 시스템 기능이 있습니다.

정말 이에 대한 전문가의 조언이 필요합니다. 문제에 대해 명확히 알기 위해 위에 언급 된 포럼을 읽어보십시오.

답변

1

NSZombies를 활성화하는 것으로 시작하십시오. 그것이 당신이 물건을 과도하게 내놓는 것처럼 들린다.

2

와우! 나는 NSZombies를 충분히 알았지 만 나는 틀렸다. 해당 개체의 메모리가 이미 해제 되었기 때문에

*** -[ContactsViewController numberOfSectionsInTableView:]: message sent to deallocated instance 0x88dafa0 

는 "포 0x88dafa0"늘 일을 :

나는를 알려준 NSZombies 수 있었다.

더 많은 인터넷 검색은 this으로 나를 이끌었으며 작성자는 해제/할당 해제 된 개체를 찾는 방법을 설명했습니다. NSZombieEnabled와 함께 환경 변수에 MallocStackLoggingNoCompact를 1로 설정하면됩니다.

-[VoicePlayController actionSheet:clickedButtonAtIndex:] at /Users/Documents/Xcode Projects/Classes/VoicePlayController.m:454 

해당 행의 코드는 :

contactsViewController = [[ContactsViewController alloc] initWithNibName:@"ContactsViewController" bundle:nil]; 

[self.navigationController presentModalViewController:contactsViewController animated:YES]; 직후 [contactsViewController release]; 라인 dealloc에있어서 이동하는 대신

내가 info malloc-history 0xf270740 명령을 가지고 출력 라인을 가지고 문제는 없어졌습니다!

관련 문제