我最近發生了一個崩潰,關於使用NSNotificationCenter發佈通知時找不到選擇器。什麼可能導致這個錯誤?什麼可能導致這次崩潰?
我注意到,在通知發佈後沒有用戶代碼被調用,所以在通知的接收端似乎沒有問題。但是,什麼可能導致NSNotificationCenter崩潰?
這裏是調用的堆棧跟蹤:
0 libSystem.B.dylib 0x00078ac8 __kill + 8
1 libSystem.B.dylib 0x00078ab8 kill + 4
2 libSystem.B.dylib 0x00078aaa raise + 10
3 libSystem.B.dylib 0x0008d03a abort + 50
4 libstdc++.6.dylib 0x00044a20 __gnu_cxx::__verbose_terminate_handler() + 376
5 libobjc.A.dylib 0x00005958 _objc_terminate + 104
6 libstdc++.6.dylib 0x00042df2 __cxxabiv1::__terminate(void (*)()) + 46
7 libstdc++.6.dylib 0x00042e46 std::terminate() + 10
8 libstdc++.6.dylib 0x00042f16 __cxa_throw + 78
9 libobjc.A.dylib 0x00004838 objc_exception_throw + 64
10 CoreFoundation 0x000a167c -[NSObject(NSObject) doesNotRecognizeSelector:] + 96
11 CoreFoundation 0x000491d2 ___forwarding___ + 502
12 CoreFoundation 0x00048f88 _CF_forwarding_prep_0 + 40
13 Foundation 0x000146ac _nsnote_callback + 136
14 CoreFoundation 0x0002670c __CFXNotificationPost_old + 396
15 CoreFoundation 0x000263ac _CFXNotificationPostNotification + 112
16 Foundation 0x0000b014 -[NSNotificationCenter postNotification:] + 132
17 [My Application] 0x000a5ad2 -[PortfolioUpdateOperation main] (PortfolioUpdateOperation.m:37)
18 Foundation 0x0000e9e8 -[__NSOperationInternal start] + 652
19 Foundation 0x0000e74c -[NSOperation start] + 16
20 Foundation 0x00023574 ____startOperations_block_invoke_2 + 40
21 libSystem.B.dylib 0x000d597c _dispatch_call_block_and_release + 12
22 libSystem.B.dylib 0x000d675c _dispatch_worker_thread2 + 120
23 libSystem.B.dylib 0x0007a67a _pthread_wqthread + 258
24 libSystem.B.dylib 0x00073190 start_wqthread + 0
10 CoreFoundation 0x000a167c - [NSObject(NSObject)doesNotRecognizeSelector:] + 96 --- 看起來你正在傳遞一些它沒有響應的東西。 – 2010-11-19 02:47:04