0
Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_PROTECTION_FAILURE at 0x2fc30fec
Crashed Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   CoreFoundation                  0x3367b788 constructBuffers
1   CoreFoundation                  0x3367af38 _parseComponents
2   CoreFoundation                  0x3367aeb2 _CFURLInit
3   CoreFoundation                  0x3367a64e CFURLCreateFromFileSystemRepresentation
4   CoreFoundation                  0x3367a41c _CFCopyHomeDirURLForUser
5   CoreFoundation                  0x3367a3ba CFCopyHomeDirectoryURLForUser
6   Foundation                      0x33f90564 NSHomeDirectoryForUser
7   Foundation                      0x33f906d6 _NSExpandTildeInPath
8   Foundation                      0x33fb16b0 -[NSString(NSPathUtilities) stringByExpandingTildeInPath]
9   Foundation                      0x33fb14c2 NSSearchPathForDirectoriesInDomains
10  WenHua                          0x0018844a +[FilePathsManager ServerAddressFileInDocument] (FilePathsManager.m:90)
11  WenHua                          0x00176bcc +[ServerAddress loadServerAdressList:dealArray:] (SeverAdress.m:102)
12  WenHua                          0x0012ebcc -[Adapter randomTradeServer] (Adapter.m:7975)

这是代码:

 +(NSString *)ServerAddressFileInDocument
    {
        NSString *docPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
        return [docPath stringByAppendingPathComponent:@"ServerAddress.plist"];
    }

+ (void)loadServerAdressList:(NSMutableArray *)marketArray dealArray:(NSMutableArray *)dealArray 
{ 
      NSData *data = [NSData dataWithContentsOfFile:[FilePathsManager        ServerAddressFileInDocument]]; 
      NSKeyedUnarchiver *unArchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data];
      [marketArray setArray:[unArchiver decodeObjectForKey:@"market"]]; 
      [dealArray setArray:[unArchiver decodeObjectForKey:@"deal"]]; 
      [unArchiver finishDecoding]; [unArchiver release];
 } 

在这个崩溃报告中,这是否意味着应用程序崩溃"NSSearchPathForDirectoriesInDomains"?我不熟悉崩溃报告,感谢您的帮助。

4

1 回答 1

0

在 (FilePathsManager.m:90) 运行“[FilePathsManager ServerAddressFileInDocument]”时,您的应用似乎崩溃了

于 2013-06-17T05:25:42.837 回答