1

调用时:

NSDictionary *dict = [NSKeyedUnarchiver unarchiveObjectWithData:dictData];


Program received signal SIGSEGV, Segmentation fault.
0x400c6844 in strcmp ()
from /Users/myname/.apportable/cache/devices/4dfcdd3168ea50fb/libs/libc.so

是否存在适用库的错误?

测试代码:

NSDictionary *dictionary = [[NSDictionary alloc]initWithObjectsAndKeys:[NSValue valueWithRange:NSMakeRange(0,16)],@"Archive_Version",[NSValue valueWithRange:NSMakeRange(16,0)],@"Clothes.txt",nil];

NSData *dictData = [NSKeyedArchiver archivedDataWithRootObject:dictionary];

[dictionary release];

NSDictionary *dict2 = [NSKeyedUnarchiver unarchiveObjectWithData:dictData];

我使用 Apportable 的免费版本,当我在控制台中调试时,结果是:

(gdb) po 字典 {Archive_Version = "{location=0, length=16}"; Clothes.txt = "{location=16, length=0}"; }

(gdb) po dict2 {Archive_Version = "{location=-284, length=1588768934}"; Clothes.txt = "{location=7, length=1593147632}"; }

谢谢~

4

1 回答 1

0

NSArchiver 存在一个已知错误,将在即将进行的基础重构中修复。查看https://code.google.com/p/apportable/了解已知的错误报告。

于 2013-11-12T19:47:58.543 回答