用戶一直在報告SIGSEGV崩潰,我很難再現它 - 它發生的頻率相對較高,但我從來沒有能夠重現它。從閱讀其他StackOverflow帖子,我知道我應該把NSZombies變成尋找殭屍對象,但不管我在樂器中做什麼,我都不能讓任何殭屍出現。調試一個SIGSEGV崩潰
請注意,我正在使用ARC。
任何人都可以從這兩個崩潰報告中任何意義,所以我至少知道從哪裏開始尋找殭屍?有沒有人有任何提示如何讓殭屍出現在樂器中?謝謝!
崩潰報告#1:
0 MyApp 0x000e4972 testflight_backtrace + 238
1 MyApp 0x000e565c TFSignalHandler + 264
2 libsystem_c.dylib 0x31cd37ec _sigtramp + 48
3 UIKit 0x33e47bde -[UIViewController unloadViewForced:] + 250
4 UIKit 0x33f8f498 -[UIViewController purgeMemoryForReason:] + 64
5 Foundation 0x37f264fe __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_0 + 18
6 CoreFoundation 0x376c8546 ___CFXNotificationPost_block_invoke_0 + 70
7 CoreFoundation 0x37654096 _CFXNotificationPost + 1406
8 Foundation 0x37e9a3ea -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
9 Foundation 0x37e9bc1a -[NSNotificationCenter postNotificationName:object:] + 30
10 UIKit 0x33f5a270 -[UIApplication _performMemoryWarning] + 80
11 UIKit 0x33f5a36a -[UIApplication _receivedMemoryNotification] + 174
12 libdispatch.dylib 0x349572e0 _dispatch_source_invoke + 516
13 libdispatch.dylib 0x34954b80 _dispatch_queue_invoke$VARIANT$mp + 52
14 libdispatch.dylib 0x34954ec0 _dispatch_main_queue_callback_4CF$VARIANT$mp + 156
15 CoreFoundation 0x376cf2ac __CFRunLoopRun + 1268
16 CoreFoundation 0x376524a4 CFRunLoopRunSpecific + 300
17 CoreFoundation 0x3765236c CFRunLoopRunInMode + 104
18 GraphicsServices 0x3255f438 GSEventRunModal + 136
19 UIKit 0x33dd6e7c UIApplicationMain + 1080
20 MyApp 0x0001b65e main (main.m:16)
21 MyApp 0x000115af start + 39
崩潰報告#2:
0 MyApp 0x0018e972 testflight_backtrace + 238
1 MyApp 0x0018f65c TFSignalHandler + 264
2 libsystem_c.dylib 0x31d067ec _sigtramp + 48
3 UIKit 0x33e7abde -[UIViewController unloadViewForced:] + 250
4 UIKit 0x33fc2498 -[UIViewController purgeMemoryForReason:] + 64
5 MyApp 0x000ec988 -[MyTableController didReceiveMemoryWarning] (MyTableController.m:129)
6 MyApp 0x0010a8a8 -[FeaturedViewController didReceiveMemoryWarning] (FeaturedViewController.m:65)
7 Foundation 0x37f594fe __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_0 + 18
8 CoreFoundation 0x376fb546 ___CFXNotificationPost_block_invoke_0 + 70
9 CoreFoundation 0x37687096 _CFXNotificationPost + 1406
10 Foundation 0x37ecd3ea -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
11 Foundation 0x37ecec1a -[NSNotificationCenter postNotificationName:object:] + 30
12 UIKit 0x33f8d270 -[UIApplication _performMemoryWarning] + 80
13 UIKit 0x33f8d36a -[UIApplication _receivedMemoryNotification] + 174
14 libdispatch.dylib 0x3498a2e0 _dispatch_source_invoke + 516
15 libdispatch.dylib 0x34987b80 _dispatch_queue_invoke$VARIANT$mp + 52
16 libdispatch.dylib 0x34987ec0 _dispatch_main_queue_callback_4CF$VARIANT$mp + 156
17 CoreFoundation 0x377022ac __CFRunLoopRun + 1268
18 CoreFoundation 0x376854a4 CFRunLoopRunSpecific + 300
19 CoreFoundation 0x3768536c CFRunLoopRunInMode + 104
20 GraphicsServices 0x32592438 GSEventRunModal + 136
21 UIKit 0x33e09e7c UIApplicationMain + 1080
22 MyApp 0x000c565e main (main.m:16)
23 MyApp 0x000bb5af start + 39
從簡單的回溯來看幾乎是不可能的。違反分段的根本原因可能是完全無關的代碼。它會釋放一個指針或覆蓋一個緩衝區,這會留下一段時間後的定時炸彈。即使它在代碼中,在堆棧跟蹤中,我們也無法知道它在沒有看到源代碼的情況下會出現什麼情況。 – Barmar
這就是我所害怕的。不幸的是,我的應用程序數千行代碼。關於如何強制顯示在我的設備上或模擬器中的任何想法? – bmueller
我並不是真的建議你發佈它。這不是我們可能能夠幫助你的東西。 – Barmar