2012-05-01 59 views
2

我意識到這是一個模糊的問題,但我正在尋找一個開始的地方。我已經testflight實時運行和我注意到下列崩潰:這次事故的可能原因是什麼?

0 Powercents 0x000781de testflight_backtrace + 142 
1 Powercents 0x00078d6c TFSignalHandler + 212 
2 libsystem_c.dylib 0x319937ec _sigtramp + 48 
3 libsystem_c.dylib 0x3198920e pthread_kill + 54 
4 libsystem_c.dylib 0x3198229e abort + 94 
5 AppSupport 0x35f70c2e abortAfterPassingIntegrityCheck + 38 
6 AppSupport 0x35f70ee6 runIntegrityCheckAndAbort + 526 
7 AppSupport 0x35f7102c checkResultWithStatement + 120 
8 AppSupport 0x35f72a12 _connectAndCheckVersion + 1058 
9 AppSupport 0x35f72ab6 CPSqliteDatabaseConnectionForWriting + 42 
10 AppSupport 0x35f72b8c CPSqliteDatabaseRegisterFunction + 20 
11 AddressBook 0x345523f6 ABCDBContextCreateWithPathAndAddressBook + 214 
12 AddressBook 0x34546428 ABCCreateAddressBookWithDatabaseDirectoryAndForceInProcessMigrationInProcessLinkingAndResetSortKeys + 232 
13 AddressBook 0x34554cd6 ABAddressBookCreate + 14 
14 TextInput 0x377981c4 _ZN2KB45fill_with_matchable_strings_from_address_bookERNS_7HashmapINS_6StringEbEE + 16 
15 TextInput 0x3779edf4 _ZN2KB21DynamicDictionaryImpl28background_load_address_bookERKNS_16StaticDictionaryE + 200 
16 TextInput 0x3779f72e _ZN2KBL14BackgroundLoadEPv + 278 
17 libsystem_c.dylib 0x3194a734 _pthread_start + 320 
18 libsystem_c.dylib 0x3194a5ef thread_start + 7 

它從我可以告訴在testflight的崩潰發生在右側打開應用程序似乎。

這裏是在applicationDidFinishLaunching代碼:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{ 
    NSDictionary *plistData = [[NSBundle mainBundle] infoDictionary]; 
    MB_LOG_LEVEL = [[plistData valueForKey:@"MBLogLevel"] intValue]; 

    NSArray *versionParts = [[plistData objectForKey:@"CFBundleVersion"] componentsSeparatedByString:@" "]; 

    self.versionString = [NSString stringWithFormat:NSLocalizedString(@"version.string", nil), 
          [plistData objectForKey:@"CFBundleShortVersionString"], 
          // accounts for $Rev: 407 $ 
          [versionParts objectAtIndex: ([versionParts count] > 1 ? 1 : 0)], 
          [plistData objectForKey:@"MBBuildDate"] 
          ]; 

    [self bootstrap]; 

    // TestFlight and Google Analytics 
    [Tracking startup]; 

    // Add the tab bar controller's current view as a subview of the window 
    // Note: Do it this way, since the UIWindow class has no rootViewController 
    // property in iOS 3.x. 
    [window_ addSubview:self.tabBarController.view]; 
    [window_ makeKeyWindow]; 

    // set up APNS with Urban Airship 
    [self initAirship:launchOptions]; 

    // If it is the first time running the app, delete all local notifications 
    [self cleanLocalNotifications]; 

    // Handle launching from a notification 
    UILocalNotification *localNotif = 
    [launchOptions objectForKey:UIApplicationLaunchOptionsLocalNotificationKey]; 
    if (localNotif) { 
     NSLog(@"Recieved Notification %@",localNotif); 
    }  

    return YES; 
} 

這裏是引導方法:

- (void)bootstrap 
{  
    // simple check for a bootstrapped db 
    Settings *settings = (Settings*)[DataManager objectForEntity:NSStringFromClass([Settings class]) 
              sortDescriptorsOrNil:nil 
                predicateOrNil:nil]; 
    if (!settings) { 
     settings = (Settings*)[DataManager createManagedInstance:NSStringFromClass([Settings class])]; 
     [settings setEnergyMobileFirstRun:[NSNumber numberWithBool:YES]]; 
     [settings setFirstRun:[NSNumber numberWithBool:YES]]; 
     [settings setShowWelcomeAlertView:[NSNumber numberWithBool:YES]]; 
     [settings setOnPeakAlertNotificationTime:[NSNumber numberWithInt:0]]; 
     [settings setMidPeakAlertNotificationTime:[NSNumber numberWithInt:0]]; 
     [settings setOffPeakAlertNotificationTime:[NSNumber numberWithInt:0]]; 
     [settings setOnPeakAlertNotificationsActive:[NSNumber numberWithBool:NO]]; 
     [settings setMidPeakAlertNotificationsActive:[NSNumber numberWithBool:NO]]; 
     [settings setOffPeakAlertNotificationsActive:[NSNumber numberWithBool:NO]]; 
     [DataManager saveManagedInstances]; 
    } 
    if ([settings.firstRun boolValue]) 
    { 
     // Clear the Database 
     [DataManager deleteAllObjectsForEntity:@"Appliance"]; 
     [DataManager deleteAllObjectsForEntity:@"Answer"]; 
     [DataManager deleteAllObjectsForEntity:@"AnsweredQuestion"]; 
     [DataManager deleteAllObjectsForEntity:@"Question"]; 
     [self loadSavingsTipData]; 
     [self createChecklistTips]; 
     [self initializeTimeOfUseBehaviour]; 
     [settings setFirstRun:[NSNumber numberWithBool:NO]]; 
     [DataManager saveManagedInstances]; 
    } 
} 

編輯以添加更多的信息:

這堆棧跟蹤從TestFlight活過來。崩潰來自已從應用商店購買的應用。

下面是完整的堆棧跟蹤:

PRIMARY THREAD THREAD 10 

0 Powercents 0x000781de testflight_backtrace + 142 
1 Powercents 0x00078d6c TFSignalHandler + 212 
2 libsystem_c.dylib 0x319937ec _sigtramp + 48 
3 libsystem_c.dylib 0x3198920e pthread_kill + 54 
4 libsystem_c.dylib 0x3198229e abort + 94 
5 AppSupport 0x35f70c2e abortAfterPassingIntegrityCheck + 38 
6 AppSupport 0x35f70ee6 runIntegrityCheckAndAbort + 526 
7 AppSupport 0x35f7102c checkResultWithStatement + 120 
8 AppSupport 0x35f72a12 _connectAndCheckVersion + 1058 
9 AppSupport 0x35f72ab6 CPSqliteDatabaseConnectionForWriting + 42 
10 AppSupport 0x35f72b8c CPSqliteDatabaseRegisterFunction + 20 
11 AddressBook 0x345523f6 ABCDBContextCreateWithPathAndAddressBook + 214 
12 AddressBook 0x34546428 ABCCreateAddressBookWithDatabaseDirectoryAndForceInProcessMigrationInProcessLinkingAndResetSortKeys + 232 
13 AddressBook 0x34554cd6 ABAddressBookCreate + 14 
14 TextInput 0x377981c4 _ZN2KB45fill_with_matchable_strings_from_address_bookERNS_7HashmapINS_6StringEbEE + 16 
15 TextInput 0x3779edf4 _ZN2KB21DynamicDictionaryImpl28background_load_address_bookERKNS_16StaticDictionaryE + 200 
16 TextInput 0x3779f72e _ZN2KBL14BackgroundLoadEPv + 278 
17 libsystem_c.dylib 0x3194a734 _pthread_start + 320 
18 libsystem_c.dylib 0x3194a5ef thread_start + 7 
Hide Other Threads 

THREAD 1 COM.APPLE.NSURLCONNECTIONLOADER 

0 CoreFoundation 0x3738f12a __CFRunLoopRun + 882 
1 CoreFoundation 0x373124a4 CFRunLoopRunSpecific + 300 
2 CoreFoundation 0x3731236c CFRunLoopRunInMode + 104 
3 Foundation 0x37b67bb8 +[NSURLConnection(Loader) _resourceLoadLoop:] + 308 
4 Foundation 0x37b67a80 -[NSThread main] + 72 
5 Foundation 0x37bfb590 __NSThread__main__ + 1048 
6 libsystem_c.dylib 0x3194a734 _pthread_start + 320 
7 libsystem_c.dylib 0x3194a5ef thread_start + 7 
THREAD 2 COM.APPLE.CFSOCKET.PRIVATE 

0 libsystem_c.dylib 0x3194a5ef thread_start + 7 
THREAD 3 THREAD 11 

Empty Stacktrace 

THREAD 4 WEBTHREAD 

0 CoreFoundation 0x3738f12a __CFRunLoopRun + 882 
1 CoreFoundation 0x373124a4 CFRunLoopRunSpecific + 300 
2 CoreFoundation 0x3731236c CFRunLoopRunInMode + 104 
3 WebCore 0x32fd20f6 _ZL12RunWebThreadPv + 402 
4 libsystem_c.dylib 0x3194a734 _pthread_start + 320 
5 libsystem_c.dylib 0x3194a5ef thread_start + 7 
THREAD 5 THREAD 8 

0 CoreFoundation 0x3738f12a __CFRunLoopRun + 882 
1 CoreFoundation 0x373124a4 CFRunLoopRunSpecific + 300 
2 CoreFoundation 0x3738f44a CFRunLoopRun + 98 
3 Powercents 0x000a9f0a +[UA_ASIHTTPRequest runRequests] + 134 
4 Foundation 0x37b67a80 -[NSThread main] + 72 
5 Foundation 0x37bfb590 __NSThread__main__ + 1048 
6 libsystem_c.dylib 0x3194a734 _pthread_start + 320 
7 libsystem_c.dylib 0x3194a5ef thread_start + 7 
THREAD 6 THREAD 12 

Empty Stacktrace 

THREAD 7 THREAD 0 

0 CoreFoundation 0x3738f0f0 __CFRunLoopRun + 824 
1 CoreFoundation 0x373124a4 CFRunLoopRunSpecific + 300 
2 CoreFoundation 0x3731236c CFRunLoopRunInMode + 104 
3 GraphicsServices 0x3221f438 GSEventRunModal + 136 
4 UIKit 0x33a96e7c UIApplicationMain + 1080 
5 Powercents 0x0004cfb2 main + 66 
6 Powercents 0x0004cf6b start + 39 
THREAD 8 THREAD 1 

0 0xffffffff + 0 
THREAD 9 THREAD 2 

Empty Stacktrace 

THREAD 10 THREAD 3 

Empty Stacktrace 

THREAD 11 THREAD 6 

Empty Stacktrace 

THREAD 12 THREAD 7 

0 CoreFoundation 0x3738f12a __CFRunLoopRun + 882 
1 CoreFoundation 0x373124a4 CFRunLoopRunSpecific + 300 
2 CoreFoundation 0x3731236c CFRunLoopRunInMode + 104 
3 Foundation 0x37b5bb74 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 256 
4 Foundation 0x37b75522 -[NSRunLoop(NSRunLoop) run] + 78 
5 Powercents 0x0008d25c -[TFNetworkManager networkRunLoopThreadEntry] + 72 
6 Foundation 0x37b67a80 -[NSThread main] + 72 
7 Foundation 0x37bfb590 __NSThread__main__ + 1048 
8 libsystem_c.dylib 0x3194a734 _pthread_start + 320 
9 libsystem_c.dylib 0x3194a5ef thread_start + 7 
+0

這是生活在他狂野,或在您的模擬器上還是在設備上?此應用是否爲appstore簽名? – nycynik

+0

我更新了我的問題,謝謝。 – Darren

+1

概念上,找出發生的錯誤的最佳方法是嘗試重現此錯誤並對其進行調試。 –

回答

1

在我看來,你的應用程序在iOS通訊簿。如果您可以調試您的應用程序,請嘗試通過更改地址簿API調用來處理連接上的此錯誤。

+0

謝謝。我之前曾使用過Address Book,所以我意識到這個框架正在被調用。奇怪的是,雖然我沒有在這個應用程序中使用它,甚至沒有包含框架! – Darren

+0

Darren,你可以請你發佈你的應用程序:didDFinishLaunchingWithOptions:方法從AppDelegate? –

+0

我發佈了該方法以及在其中調用的引導方法。引導方法中有更多的方法被調用,但是它開始發佈太多的代碼。我懷疑有人升級應用程序後,遷移核心數據數據庫可能會出現問題。儘管是地址簿調用,但是我真的很困惑。我不明白他們爲什麼在那裏。 – Darren

1

它看起來與AddressBook相關 - 發佈整個崩潰報告。

看起來好像AddressBook API正在被初始化,並在打開支持sqlLite數據庫時發生錯誤。也許connectAndCheckVersion以某種方式失敗。

TestFlight只在那裏,因爲它安裝了一個catch-all信號處理程序來報告應用程序崩潰到TestFlight Live。

+0

我並不完全確定你發佈整個崩潰報告的意思,但是我發佈了從TestFlight實時站點獲得的所有信息。正如我在另一評論中提到的,我沒有在這個應用程序中使用AddressBook(至少據我所知)。我沒有包含這個框架。我正在使用其他一些圖書館(Urban Airship,TestFlight,Google Analytics,Facebook),所以我不知道其中一個可能是否試圖調用地址簿方法? – Darren

+0

TestFlight和Facebook確實不會使用地址簿。也許城市飛艇或谷歌分析? :) –

+0

我使用Urban Airship和TestFlight沒有看到任何看起來像那樣的事故。好吧,我以爲你在xCode發生了崩潰 - TestFlight Live中列出了一個「原因」嗎? –

4

我目前看到的相同墜毀在生產上的iOS僅限5.1設備。雖然我不確定是什麼引發了崩潰,但我認爲可以肯定地說這是iOS 6中已修復的Apple錯誤。

+0

爲我的應用程序提出了一個問題,它是IOS 5.1 - 我們不使用地址簿 - 當天崩潰3次 - 必須是一個非常糟糕的錯誤 – kasuku

相關問題