2011-09-07 40 views
1

我目前正在使用TestFlight来获取我们的应用程序测试版本的远程崩溃报告。我收到了堆栈跟踪,但是我不太清楚如何缩小问题范围。以下是我收到的报告:iOS Stack Trace Mystery,ABRecordCopyValue Is Suspect

0 Holler 0x0003f2a1 Holler + 254625 
1 Holler 0x0003f6b7 Holler + 255671 
2 libsystem_c.dylib 0x344da72f _sigtramp + 42 
3 AppSupport 0x34dfc58d CPRecordCopyProperty + 12 
4 AddressBook 0x33e333bf ABRecordCopyValue + 14 
5 Holler 0x00018df5 Holler + 97781 
6 Holler 0x000182d3 Holler + 94931 
7 Holler 0x0000a561 Holler + 38241 
8 Holler 0x00033e0f Holler + 208399 
9 CoreFoundation 0x3675d571 -[NSObject(NSObject) performSelector:withObject:withObject:] + 24 
10 UIKit 0x355efec9 -[UIApplication sendAction:to:from:forEvent:] + 84 
11 UIKit 0x355efe69 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 32 
12 UIKit 0x355efe3b -[UIControl sendAction:to:forEvent:] + 38 
13 UIKit 0x355efb8d -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 356 
14 UIKit 0x355f0423 -[UIControl touchesEnded:withEvent:] + 342 
15 UIKit 0x355eebf5 -[UIWindow _sendTouchesForEvent:] + 368 
16 UIKit 0x355ee56f -[UIWindow sendEvent:] + 262 
17 UIKit 0x355d7313 -[UIApplication sendEvent:] + 298 
18 UIKit 0x355d6c53 _UIApplicationHandleEvent + 5090 
19 GraphicsServices 0x35f11e77 PurpleEventCallback + 666 
20 CoreFoundation 0x367c4a97 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26 
21 CoreFoundation 0x367c683f __CFRunLoopDoSource1 + 166 
22 CoreFoundation 0x367c760d __CFRunLoopRun + 520 
23 CoreFoundation 0x36757ec3 CFRunLoopRunSpecific + 230 
24 CoreFoundation 0x36757dcb CFRunLoopRunInMode + 58 
25 GraphicsServices 0x35f1141f GSEventRunModal + 114 
26 GraphicsServices 0x35f114cb GSEventRun + 62 
27 UIKit 0x35601d69 -[UIApplication _run] + 404 
28 UIKit 0x355ff807 UIApplicationMain + 670 
29 Holler 0x00002d79 Holler + 7545 
30 Holler 0x00002d44 Holler + 7492 

不幸的是,堆栈跟踪中的最后8个项目似乎没有符号化。有没有办法让我做到这一点?我假设hte问题与ABRecordCopyValue有关,但我不是100%确定的。由于我不知道最后两次Holler呼叫是什么,我有点困惑。有人想知道我应该怎么做才能缩小问题的范围?

我相信问题现在存在于一个特定的方法中,因为重复了两个Holler调用之后的事件序列(ABRecordCopyValue)。这是代码...我使用它来加载用户的电话簿/联系人列表。让我知道这是否提供任何更多的细节:

ContactLists *list = [ContactLists defaultLists]; 

//Delete the phone contacts, and load them 
[list clearContacts]; 
//Load them 
ABAddressBookRef addressbook = ABAddressBookCreate(); 
if(addressbook) 
{ 
    //Got this via http://stackoverflow.com/questions/4641229/code-example-for-abaddressbookcopyarrayofallpeopleinsourcewithsortordering 
    ABRecordRef source = ABAddressBookCopyDefaultSource(addressbook); 
    CFArrayRef sortedPeople = ABAddressBookCopyArrayOfAllPeopleInSourceWithSortOrdering(addressbook, source, kABPersonSortByFirstName); 
    //Sort them first 

    if(sortedPeople) 
    { 
     CFIndex contactCount = ABAddressBookGetPersonCount(addressbook); 

     for(int i = 0; i<contactCount; i++) 
     { 
      ABRecordRef ref = CFArrayGetValueAtIndex(sortedPeople, i); 
      NSMutableString *fName = [[[NSMutableString alloc] init] autorelease]; 
      NSMutableString *lName = [[[NSMutableString alloc] init] autorelease]; 
      NSMutableDictionary *identifiers = [[[NSMutableDictionary alloc]init]autorelease]; 
      if(ref) 
      { 
       //Get the user's name first 
       CFStringRef firstName = ABRecordCopyValue(ref, kABPersonFirstNameProperty); 
       if(firstName) 
       { 
        NSString *fn = [NSString stringWithFormat:@"%@",firstName]; 
        if([fn hasPrefix:@"(null"]) 
         [fName appendString:@""]; 
        else 
        { 
         [fName appendString:[NSString stringWithFormat:@"%@", firstName]]; 
         [fName setString:[fName stringByReplacingCharactersInRange:NSMakeRange(0,1) withString:[[fName substringToIndex:1]uppercaseString]]]; 
        } 
        CFRelease(firstName); 
       } 
       CFStringRef lastName = ABRecordCopyValue(ref, kABPersonLastNameProperty); 
       if(lastName) 
       { 
        NSString *ln = [NSString stringWithFormat:@"%@",lastName]; 
        if([ln hasPrefix:@"(null"]) 
         [lName appendString:@""]; 
        else 
         [lName appendString:[NSString stringWithFormat:@"%@",lastName]]; 
        CFRelease(lastName); 
       } 
       //If there is no first name don't deal with adding this contact to the ContactsList 
       if([fName isEqualToString:@""]) 
       { 
        continue; 
       } 

       //Handle phone and email contacts 
       ABMultiValueRef phoneRef = ABRecordCopyValue(ref, kABPersonPhoneProperty); 
       if(phoneRef) 
       { 
        for(int i = 0; i<ABMultiValueGetCount(phoneRef); i++) 
        { 
         CFStringRef phone = ABMultiValueCopyValueAtIndex(phoneRef, i); 
         if (phone) { 
          //Create the contact and add them to the phone contactList 
          NSString *mobileLabel = (NSString *)ABMultiValueCopyLabelAtIndex(phoneRef, i); 
          if([mobileLabel isEqualToString:(NSString *)kABPersonPhoneMobileLabel]) 
           [identifiers setValue:(NSString *)phone forKey:@"Mobile:"]; 
          if([mobileLabel isEqualToString:(NSString *)kABPersonPhoneIPhoneLabel]) 
           [identifiers setValue:(NSString *)phone forKey:@"iPhone:"]; 
          if([mobileLabel isEqualToString:(NSString *)kABPersonPhoneMainLabel]) 
           [identifiers setValue:(NSString *)phone forKey:@"Main:"]; 
          if([mobileLabel isEqualToString:(NSString *)kABWorkLabel]) 
           [identifiers setValue:(NSString *)phone forKey:@"Work:"]; 
          if([mobileLabel isEqualToString:(NSString *)kABHomeLabel]) 
           [identifiers setValue:(NSString *)phone forKey:@"Home:"]; 
          if([mobileLabel isEqualToString:(NSString *)kABOtherLabel]) 
           [identifiers setValue:(NSString *)phone forKey:@"Other:"]; 

          CFRelease(phone); 
          [mobileLabel release]; 
         } 
        } 
        CFRelease(phoneRef); 
       } 


       ABMultiValueRef emailRef = ABRecordCopyValue(ref, kABPersonEmailProperty); 
       if (emailRef) { 
        if (ABMultiValueGetCount(emailRef) > 0) { 
         CFStringRef email = ABMultiValueCopyValueAtIndex(emailRef, 0); 

         if (email) { 
          [identifiers setValue:(NSString *)email forKey:@"Email:"]; 
          CFRelease(email); 
         } 
        } 
        CFRelease(emailRef); 
       } 
       if([identifiers count] > 0) 
       { 
        //This is where I believe the problem is happen as it's two calls to internal Holler models 
        [list addContact:[[[Contact alloc]initWithIdentifiers:identifiers firstName:fName lastName:lName]autorelease]]; 
       } 
      } 
     } 
     CFRelease(sortedPeople); 
    } 
    CFRelease(addressbook); 
    CFRelease(source); 
} 

回答

0

您确实需要在栈跟踪中象征Holler方法。具体方法如下: 转到TestFlight - >选择Builds选项卡,然后单击构建中您遇到问题的测试器按钮。向下滚动到底部并单击可用于手动通知测试人员的bit.ly链接。在该页面的底部,您可以选择下载先前上传的.ipa文件。下载它。

一旦下载到您的计算机,将文件扩展名从.ipa重命名为.zip。然后解压缩它,你应该得到.app文件。由于您只有堆栈跟踪而不是完整的崩溃报告,因此您不能使用XCode来表示符号,但可以使用此处的说明手动执行符号化操作:http://www.bartlettpublishing.com/site/bartpub/blog/3/entry/311

希望有所帮助,我很乐意成为未来应用程序的beta测试者!

+0

不幸的是,没有发现问题:(它只是象征“<__ destroy_helper_block_1 + 1861>” –

1

你需要有什么教育的前symbolicated堆栈跟踪,可以说哪里飞机坠毁。

如果您在Xcode(Organizer窗口中的Import按钮)中打开堆栈跟踪文件,它将自动使用匹配的二进制文件和符号文件进行符号化...... 即如果您已经保存了二进制/符号文件 - 最好通过使用存档功能。

如果您还没有保存该确切文件的符号文件,那么您不能象征性地记录崩溃日志,并且不得不疯狂猜测真正的原因。

+0

我没有一个文件只是堆栈跟踪。我可以自己保存符号文件吗? –

+0

它是作为构建过程的一部分自动创建的。请务必保留以备后用,以防需要处理崩溃报告 –

+0

保留以后的内容?也许你错过了通过Testflight发布到Beta测试版的部分......我所拥有的是testflight提供的堆栈跟踪 –