2012-02-05 81 views
3

我一直在我的應用中使用Mobclix,直到昨天我收到來自TestFlight的崩潰報告,這似乎是由Mobclix引起的,直到昨天才遇到任何問題。我想知道是否有人可以解釋這種情況,或者我可以如何防止它再次發生。這發生在運行iOS 5.0.1的iPhone 4s上。感謝您的任何意見!iOS 5上的應用崩潰

SIGSEGV - Unknown Signal 

0 MyApp 0x00136046 testflight_backtrace + 142 
1 MyApp 0x00136b60 TFSignalHandler + 212 
2 libsystem_c.dylib 0x35fce538 _sigtramp + 48 
3 CoreFoundation 0x37ab40ba -[__NSCFString isEqualToString:] + 174 
4 QuartzCore 0x332b0b9c -[CALayer actionForKey:] + 76 
5 QuartzCore 0x332b0b18 _ZL12actionForKeyP7CALayerPN2CA11TransactionEP8NSString + 56 
6 QuartzCore 0x332b07c0 _ZN2CA5Layer12begin_changeEPNS_11TransactionEjRP11objc_object + 120 
7 QuartzCore 0x332af8ee _ZN2CA5Layer6setterEj12_CAValueTypePKv + 162 
8 QuartzCore 0x332ddffe -[CALayer setBackgroundColor:] + 34 
9 UIKit 0x34f5dd5c -[UIView(Internal) _setBackgroundCGColor:withSystemColorName:] + 1200 
10 UIKit 0x34f5d80a -[UIView(Hierarchy) _setBackgroundColor:] + 114 
11 MyApp 0x00101e4a -[MobclixAdViewInternal initWithFrame:] (MobclixAdViewInternal.m:79) 
12 MyApp 0x00105e1a -[MobclixAdView setupAdViewWithFrame:] (MobclixAdView.m:72) 
13 MyApp 0x00105fa2 -[MobclixAdView initWithFrame:] (MobclixAdView.m:55) 
14 MyApp 0x000cb550 -[LocationDetailViewController createAdBannerView] (LocationDetailViewController.m:394) 
15 MyApp 0x000c9e0e -[LocationDetailViewController viewDidLoad] (LocationDetailViewController.m:109) 
16 UIKit 0x34f4e7fe -[UIViewController view] + 166 
17 UIKit 0x34f5ac38 -[UIViewController contentScrollView] + 24 
18 UIKit 0x34f5aaa8 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 36 
19 UIKit 0x34f5a98e -[UINavigationController _layoutViewController:] + 34 
20 UIKit 0x34f5a210 -[UINavigationController _startTransition:fromViewController:toViewController:] + 500 
21 UIKit 0x34f59f52 -[UINavigationController _startDeferredTransitionIfNeeded] + 250 
22 UIKit 0x34f4e672 -[UINavigationController pushViewController:transition:forceImmediate:] + 806 
23 UIKit 0x34f4e348 -[UINavigationController pushViewController:animated:] + 36 
24 MyApp 0x000cd7f0 -[LocationsViewController tableView:didSelectRowAtIndexPath:] (LocationsViewController.m:362) 
25 UIKit 0x34fc8564 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 944 
26 UIKit 0x35040ce6 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 158 
27 Foundation 0x31a8e942 __NSFireDelayedPerform + 414 
28 CoreFoundation 0x37b31a62 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 14 
29 CoreFoundation 0x37b316c8 __CFRunLoopDoTimer + 364 
30 CoreFoundation 0x37b3029e __CFRunLoopRun + 1206 
31 CoreFoundation 0x37ab34dc CFRunLoopRunSpecific + 300 
32 CoreFoundation 0x37ab33a4 CFRunLoopRunInMode + 104 
33 GraphicsServices 0x37631fcc GSEventRunModal + 156 
34 UIKit 0x34f43742 UIApplicationMain + 1090 
35 MyApp 0x000c6514 main (main.m:17) 
36 MyApp 0x000c4b6f start + 39 

我也設法從設備的完整崩潰日誌:

Incident Identifier: 83282958-196D-444A-9687-3ABB995142B4 
CrashReporter Key: 7468d6d075fbaeaa98a71643a55fdc3f52aed471 
Hardware Model:  iPhone4,1 
Process:   MyApp [11252] 
Path:   /var/mobile/Applications/0F320D6D-52F8-4088-B832-CC7454058932/MyApp.app/MyApp 
Identifier:  MyApp 
Version:   ??? (???) 
Code Type:  ARM (Native) 
Parent Process: launchd [1] 

Date/Time:  2012-02-04 21:38:51.450 -0500 
OS Version:  iPhone OS 5.0.1 (9A405) 
Report Version: 104 

Exception Type: EXC_CRASH (SIGSEGV) 
Exception Codes: 0x00000000, 0x00000000 
Crashed Thread: 1 

Thread 0 name: Dispatch queue: com.apple.main-thread 
Thread 0: 
0 UIKit       0x34f178de 0x34f12000 + 22750 
1 QuartzCore      0x332b0b96 0x332ad000 + 15254 
2 QuartzCore      0x332b0b12 0x332ad000 + 15122 
3 QuartzCore      0x332b07ba 0x332ad000 + 14266 
4 QuartzCore      0x332af8e8 0x332ad000 + 10472 
5 QuartzCore      0x332ddff8 0x332ad000 + 200696 
6 UIKit       0x34f5dd56 0x34f12000 + 310614 
7 UIKit       0x34f5d804 0x34f12000 + 309252 
8 MyApp       0x00101e44 -[MobclixAdViewInternal initWithFrame:] (MobclixAdViewInternal.m:79) 
9 MyApp       0x00105e14 -[MobclixAdView setupAdViewWithFrame:] (MobclixAdView.m:72) 
10 MyApp       0x00105f9c -[MobclixAdView initWithFrame:] (MobclixAdView.m:55) 
11 MyApp       0x000cb54a -[LocationDetailViewController createAdBannerView] (LocationDetailViewController.m:394) 
12 MyApp      0x000c9e08 -[LocationDetailViewController viewDidLoad] (LocationDetailViewController.m:109) 
13 UIKit       0x34f4e7f8 0x34f12000 + 247800 
14 UIKit       0x34f5ac32 0x34f12000 + 298034 
15 UIKit       0x34f5aaa2 0x34f12000 + 297634 
16 UIKit       0x34f5a988 0x34f12000 + 297352 
17 UIKit       0x34f5a20a 0x34f12000 + 295434 
18 UIKit       0x34f59f4c 0x34f12000 + 294732 
19 UIKit       0x34f4e66c 0x34f12000 + 247404 
20 UIKit       0x34f4e342 0x34f12000 + 246594 
21 MyApp      0x000cd7ea -[LocationsViewController tableView:didSelectRowAtIndexPath:] (LocationsViewController.m:362) 
22 UIKit       0x34fc855e 0x34f12000 + 746846 
23 UIKit       0x35040ce0 0x34f12000 + 1240288 
24 Foundation      0x31a8e93c 0x319f3000 + 637244 
25 CoreFoundation     0x37b31a5c 0x37aa4000 + 580188 
26 CoreFoundation     0x37b316c2 0x37aa4000 + 579266 
27 CoreFoundation     0x37b30298 0x37aa4000 + 574104 
28 CoreFoundation     0x37ab34d6 0x37aa4000 + 62678 
29 CoreFoundation     0x37ab339e 0x37aa4000 + 62366 
30 GraphicsServices    0x37631fc6 0x3762e000 + 16326 
31 UIKit       0x34f4373c 0x34f12000 + 202556 
32 MyApp       0x000c650e main (main.m:17) 
33 MyApp      0x000c4b68 0xc2000 + 11112 

Thread 1 name: Dispatch queue: com.apple.libdispatch-manager 
Thread 1 Crashed: 
0 libsystem_kernel.dylib   0x333e73b4 0x333e6000 + 5044 
1 libdispatch.dylib    0x3781bf74 0x37818000 + 16244 
2 libdispatch.dylib    0x3781bc92 0x37818000 + 15506 

Thread 2 name: WebThread 
Thread 2: 
0 libsystem_kernel.dylib   0x333e7010 0x333e6000 + 4112 
1 libsystem_kernel.dylib   0x333e7206 0x333e6000 + 4614 
2 CoreFoundation     0x37b3141c 0x37aa4000 + 578588 
3 CoreFoundation     0x37b30154 0x37aa4000 + 573780 
4 CoreFoundation     0x37ab34d6 0x37aa4000 + 62678 
5 CoreFoundation     0x37ab339e 0x37aa4000 + 62366 
6 WebCore       0x32384128 0x322dc000 + 688424 
7 libsystem_c.dylib    0x35f85c16 0x35f76000 + 64534 
8 libsystem_c.dylib    0x35f85ad0 0x35f76000 + 64208 

Thread 3 name: com.apple.NSURLConnectionLoader 
Thread 3: 
0 libsystem_kernel.dylib   0x333e7010 0x333e6000 + 4112 
1 libsystem_kernel.dylib   0x333e7206 0x333e6000 + 4614 
2 CoreFoundation     0x37b3141c 0x37aa4000 + 578588 
3 CoreFoundation     0x37b30154 0x37aa4000 + 573780 
4 CoreFoundation     0x37ab34d6 0x37aa4000 + 62678 
5 CoreFoundation     0x37ab339e 0x37aa4000 + 62366 
6 Foundation      0x31a03bc2 0x319f3000 + 68546 
7 Foundation      0x31a03a8a 0x319f3000 + 68234 
8 Foundation      0x31a9759a 0x319f3000 + 673178 
9 libsystem_c.dylib    0x35f85c16 0x35f76000 + 64534 
10 libsystem_c.dylib    0x35f85ad0 0x35f76000 + 64208 

Thread 4: 
0 libsystem_kernel.dylib   0x333e7010 0x333e6000 + 4112 
1 libsystem_kernel.dylib   0x333e7206 0x333e6000 + 4614 
2 CoreFoundation     0x37b3141c 0x37aa4000 + 578588 
3 CoreFoundation     0x37b30154 0x37aa4000 + 573780 
4 CoreFoundation     0x37ab34d6 0x37aa4000 + 62678 
5 CoreFoundation     0x37ab339e 0x37aa4000 + 62366 
6 Foundation      0x319f7b7e 0x319f3000 + 19326 
7 Foundation      0x31a1152c 0x319f3000 + 124204 
8 MyApp       0x0014a986 0xc2000 + 559494 
9 Foundation      0x31a03a8a 0x319f3000 + 68234 
10 Foundation      0x31a9759a 0x319f3000 + 673178 
11 libsystem_c.dylib    0x35f85c16 0x35f76000 + 64534 
12 libsystem_c.dylib    0x35f85ad0 0x35f76000 + 64208 

Thread 5 name: com.apple.CFSocket.private 
Thread 5: 
0 libsystem_kernel.dylib   0x333f7570 0x333e6000 + 71024 
1 CoreFoundation     0x37b3566a 0x37aa4000 + 595562 
2 libsystem_c.dylib    0x35f85c16 0x35f76000 + 64534 
3 libsystem_c.dylib    0x35f85ad0 0x35f76000 + 64208 

Thread 6: 
0 libsystem_kernel.dylib   0x333e7010 0x333e6000 + 4112 
1 libsystem_kernel.dylib   0x333e7206 0x333e6000 + 4614 
2 CoreFoundation     0x37b3141c 0x37aa4000 + 578588 
3 CoreFoundation     0x37b30154 0x37aa4000 + 573780 
4 CoreFoundation     0x37ab34d6 0x37aa4000 + 62678 
5 CoreFoundation     0x37b30474 0x37aa4000 + 574580 
6 MyApp       0x002791cc +[UA_ASIHTTPRequest runRequests] (UA_ASIHTTPRequest.m:4789) 
7 Foundation      0x31a03a8a 0x319f3000 + 68234 
8 Foundation      0x31a9759a 0x319f3000 + 673178 
9 libsystem_c.dylib    0x35f85c16 0x35f76000 + 64534 
10 libsystem_c.dylib    0x35f85ad0 0x35f76000 + 64208 

Thread 7 name: NetworkIO 
Thread 7: 
0 libsystem_kernel.dylib   0x333e7010 0x333e6000 + 4112 
1 libsystem_kernel.dylib   0x333e7206 0x333e6000 + 4614 
2 CoreFoundation     0x37b3141c 0x37aa4000 + 578588 
3 CoreFoundation     0x37b30154 0x37aa4000 + 573780 
4 CoreFoundation     0x37ab34d6 0x37aa4000 + 62678 
5 CoreFoundation     0x37ab339e 0x37aa4000 + 62366 
6 MapKit       0x37d1a412 0x37d0c000 + 58386 
7 Foundation      0x31a03a8a 0x319f3000 + 68234 
8 Foundation      0x31a9759a 0x319f3000 + 673178 
9 libsystem_c.dylib    0x35f85c16 0x35f76000 + 64534 
10 libsystem_c.dylib    0x35f85ad0 0x35f76000 + 64208 

Thread 8: 
0 libsystem_kernel.dylib   0x333f7cd4 0x333e6000 + 72916 
1 libsystem_c.dylib    0x35f8030a 0x35f76000 + 41738 
2 libsystem_c.dylib    0x35f8009c 0x35f76000 + 41116 

Thread 9 name: WebCore: CFNetwork Loader 
Thread 9: 
0 libsystem_kernel.dylib   0x333e7010 0x333e6000 + 4112 
1 libsystem_kernel.dylib   0x333e7206 0x333e6000 + 4614 
2 CoreFoundation     0x37b3141c 0x37aa4000 + 578588 
3 CoreFoundation     0x37b30154 0x37aa4000 + 573780 
4 CoreFoundation     0x37ab34d6 0x37aa4000 + 62678 
5 CoreFoundation     0x37ab339e 0x37aa4000 + 62366 
6 WebCore       0x323ad69e 0x322dc000 + 857758 
7 libsystem_c.dylib    0x35f85c16 0x35f76000 + 64534 
8 libsystem_c.dylib    0x35f85ad0 0x35f76000 + 64208 

Thread 10: 
0 libsystem_kernel.dylib   0x333f7cd4 0x333e6000 + 72916 
1 libsystem_c.dylib    0x35f8030a 0x35f76000 + 41738 
2 libsystem_c.dylib    0x35f8009c 0x35f76000 + 41116 

Thread 11: 
0 libsystem_kernel.dylib   0x333f7cd4 0x333e6000 + 72916 
1 libsystem_c.dylib    0x35f8030a 0x35f76000 + 41738 
2 libsystem_c.dylib    0x35f8009c 0x35f76000 + 41116 

Thread 12: 
0 libsystem_c.dylib    0x35f79254 0x35f76000 + 12884 
1 QuartzCore      0x332af188 0x332ad000 + 8584 
2 QuartzCore      0x332b2ed8 0x332ad000 + 24280 
3 QuartzCore      0x332b7114 0x332ad000 + 41236 
4 QuartzCore      0x332b6e50 0x332ad000 + 40528 
5 QuartzCore      0x332aed7e 0x332ad000 + 7550 
6 CoreFoundation     0x37b31b44 0x37aa4000 + 580420 
7 CoreFoundation     0x37b2fd80 0x37aa4000 + 572800 
8 CoreFoundation     0x37ab34f2 0x37aa4000 + 62706 
9 CoreFoundation     0x37ab339e 0x37aa4000 + 62366 
10 Foundation      0x319f7b7e 0x319f3000 + 19326 
11 MyApp      0x0025d5cc -[DynamoDBWebServiceClient invoke:rawRequest:unmarshallerDelegate:] (DynamoDBWebServiceClient.m:105) 
12 MyApp      0x0025cb28 -[AmazonDynamoDBClient query:] (AmazonDynamoDBClient.m:55) 
13 MyApp       0x000fb2f6 -[MessageManager loadRecentMessagesForLocation:] (MessageManager.m:99) 
14 MyApp       0x000ca2cc -[LocationDetailViewController loadServerData] (LocationDetailViewController.m:181) 
15 Foundation      0x31a03a8a 0x319f3000 + 68234 
16 Foundation      0x31a9759a 0x319f3000 + 673178 
17 libsystem_c.dylib    0x35f85c16 0x35f76000 + 64534 
18 libsystem_c.dylib    0x35f85ad0 0x35f76000 + 64208 

Thread 1 crashed with ARM Thread State: 
    r0: 0x00000004 r1: 0x00000000  r2: 0x00000000  r3: 0x2ff9c634 
    r4: 0x00000001 r5: 0x2ff9c750  r6: 0x2ff9c750  r7: 0x2ff9c770 
    r8: 0x00000000 r9: 0x00000000  r10: 0x3f44e850  r11: 0x00000000 
    ip: 0x0000016b sp: 0x2ff9c620  lr: 0x3781bf7b  pc: 0x333e73b4 
    cpsr: 0x60000010 

這裏是所有的Mobclix的相關方法和LocationDetailViewController電話:

- (void)adViewDidFinishLoad:(MobclixAdView*)adView { 

    if (!adBannerViewIsVisible) { 

     // Show the ad banner 
     adBannerViewIsVisible = YES; 
     [self fixupAdView]; 
    } 
} 

- (void)adView:(MobclixAdView*)adView didFailLoadWithError:(NSError*)error { 

    if (adBannerViewIsVisible) { 

     // Hide the ad banner 
     adBannerViewIsVisible = NO; 
     [self fixupAdView]; 
    } 
} 

- (void)createAdBannerView { 

    // Create the ad banner 
    self.adBannerView = [[MobclixAdViewiPhone_320x50 alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 320.0f, 50.0f)]; 

    self.adBannerView.delegate = self; 

    [self.view addSubview:adBannerView]; 
} 

- (void)fixupAdView { 

    if (adBannerView != nil) { 

     [UIView beginAnimations:@"fixupViews" context:nil]; 

     // Move items to fit ad banner 
     if (adBannerViewIsVisible) { 

      CGRect adBannerViewFrame = [adBannerView frame]; 
      adBannerViewFrame.origin.x = 0; 
      adBannerViewFrame.origin.y = 0; 
      [adBannerView setFrame:adBannerViewFrame]; 

      CGRect contentViewFrame = contentView.frame; 
      contentViewFrame.origin.y = 50; 
      contentViewFrame.size.height = self.view.frame.size.height - 50; 
      contentView.frame = contentViewFrame; 

      CGRect tableViewFrame = tableView.frame; 
      tableViewFrame.origin.y = tableView.frame.origin.y; 
      tableViewFrame.size.height = 317; 
      tableView.frame = tableViewFrame; 

      // Move items to hide ad banner 
     } else { 

      CGRect adBannerViewFrame = [adBannerView frame]; 
      adBannerViewFrame.origin.x = 0; 
      adBannerViewFrame.origin.y = -50; 
      [adBannerView setFrame:adBannerViewFrame]; 

      CGRect contentViewFrame = contentView.frame; 
      contentViewFrame.origin.y = 0; 
      contentViewFrame.size.height = self.view.frame.size.height; 
      contentView.frame = contentViewFrame; 

      CGRect tableViewFrame = tableView.frame; 
      tableViewFrame.origin.y = tableView.frame.origin.y; 
      tableViewFrame.size.height = 367; 
      tableView.frame = tableViewFrame; 
     } 

     [UIView commitAnimations]; 
    } 
} 

- (void)viewDidLoad { 

    [super viewDidLoad]; 

    // Attempt to load an ad and resize the view to fit it 
    [self createAdBannerView]; 
    [self fixupAdView]; 
} 

- (void)viewDidUnload { 

    [super viewDidUnload]; 

    [self.adBannerView cancelAd]; 
    self.adBannerView.delegate = nil; 
    self.adBannerView = nil; 
} 

- (void)viewDidAppear:(BOOL)animated { 

    [super viewDidAppear:animated]; 

    // Resume ad loading from Mobclix 
    [self.adBannerView resumeAdAutoRefresh]; 
} 

- (void)viewWillDisappear:(BOOL)animated { 

    [super viewWillDisappear:animated]; 

    // Pause ad loading from Mobclix 
    [self.adBannerView pauseAdAutoRefresh]; 
} 
+0

沒有錯誤消息? – 2012-02-05 15:44:33

+0

對不起,忘了包括它。我將它添加到我的崩潰日誌的頂部。 – 2012-02-05 15:49:56

+0

請發佈方法createAdBannerView(LocationDetailViewController)和相關的Mobclix代碼 – Felix 2012-02-05 15:59:05

回答

5

崩潰的線程1只有Apple框架調用,沒有任何來自您的應用程序。如果符號化腳本具有可通過Spotlight訪問的iOS 5.0.1符號,則這些符號將具有象徵意義。目前看起來不太可能,這個問題與Mobclix代碼有關。

由於異常類型是SIGSEGV,所以在崩潰的線程中找不到導致崩潰的行號。你在代碼中有一個地方(可能在任何地方!)存在內存問題,這會導致應用程序嘗試訪問實際上無效的內存地址。因此,導致崩潰。

由於libdispatch是崩潰線程的一部分,因此可能暗示您的代碼中某處使用GCD的位置可能是您的問題所在。如上所述,最有可能是記憶問題。

一般而言,我發現可靠地找到並解決內存問題的最佳方式是使用測試框架並自動執行應用程序交互,以便運行很長時間。它還可以通過一次又一次重做相同的用戶交互來幫助實現自動化。它很可能會崩潰,但這次可以重複使用,因此您可以將儀器運行到一邊。我確實使用KIF框架取得了巨大成功。

爲了得到完整的崩潰報告,你可能想看看替代性崩潰報告的解決方案,這是我在這裏暗示:https://stackoverflow.com/a/8242215/474794

0

你只能得到從TestFlight崩潰報告中的主線程堆棧跟蹤。然而,可能真正的崩潰發生在另一個線程中,並且主線程處理了它。如果您可以使用相同的回溯重現該崩潰,那麼Mobclix中確實存在一個錯誤。

您需要完整的崩潰報告,您只有在有權訪問設備時才能獲取完整的崩潰報告。

您可以在此找到答案更多有用的信息: https://stackoverflow.com/a/6462751/550177

編輯:正如我所說的,真正的暴跌是在不同的線程(線程1)。但我無法弄清楚是什麼導致了這次事故。看看其中涉及MyApp的其他回溯(線程4,12)。

+0

我將努力獲取從設備發送的完整的崩潰報告,我一直無法自己重現崩潰。 – 2012-02-05 16:46:42

+0

管理從設備獲取完整的崩潰日誌,任何幫助將不勝感激 – 2012-02-05 18:06:25

+0

我曾多次嘗試使用相同的backtraces重現崩潰,並沒有產生一次崩潰。我不確定該從哪裏出發 – 2012-02-06 13:18:47