设置基本SDK后,iPhone模拟器在NSKeyedUnarchiver中崩溃 [英] iPhone Simulator chrashes in NSKeyedUnarchiver after setting base SDK

查看:50
本文介绍了设置基本SDK后,iPhone模拟器在NSKeyedUnarchiver中崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在xcode(雪豹上为3.2)和sdk 3.1.2开始了一个项目.现在,我将此设置更改为3.0,并且在编译时没有警告.在设备上运行应用程序没有任何问题,但是模拟器每次启动时都会崩溃,但以下情况除外:

I started a project in xcode (3.2 on snow leopard) with base sdk 3.1.2. Now I changed this setting to 3.0 and it compiles without a warning. There are no problems running the app on the device, but the simulator crashes on launch every time with the following exception:

由于未捕获的异常"NSInvalidArgumentException"而终止应用程序,原因:"[NSKeyedUnarchiver initForReadingWithData:]:不可理解的存档(0x4e,0x49、0x42、0x41、0x72、0x63、0x68、0x69)"

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '[NSKeyedUnarchiver initForReadingWithData:]: incomprehensible archive (0x4e, 0x49, 0x42, 0x41, 0x72, 0x63, 0x68, 0x69)'

我不使用 NSKeyedUnarchiver ,所以为什么应用程序尝试调用它?还有什么档案是令人费解的?我在构建之前重置了模拟器,因此没有userDefaults或其他任何内容.
感谢您的帮助!

I do not use the NSKeyedUnarchiver, so why is the app trying to call it? And what archive is incomprehensible? I reset the simulator before building, so there are no userDefaults or anything else around.
Thanks for your help!

推荐答案

我通过以下详细的堆栈跟踪信息解决了该问题:

I solved the problem with this detailed stack trace:

#0  0x302ac924 in ___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___  
#1  0x904a3509 in objc_exception_throw  
#2  0x3028e5fb in +[NSException raise:format:arguments:]  
#3  0x3028e55a in +[NSException raise:format:]  
#4  0x30513b77 in -[NSKeyedUnarchiver initForReadingWithData:]  
#5  0x30ab4b2a in -[UINib instantiateWithOptions:owner:loadingResourcesFromBundle:]  
#6  0x30ab6eb3 in -[NSBundle(NSBundleAdditions) loadNibNamed:owner:options:]  
#7  0x308f85f1 in -[UIApplication _loadMainNibFile]  
#8  0x30901a15 in -[UIApplication _runWithURL:sourceBundleID:]  
#9  0x308fef33 in -[UIApplication handleEvent:withNewEvent:]  
#10 0x308fad82 in -[UIApplication sendEvent:]  
#11 0x309013e1 in _UIApplicationHandleEvent  
#12 0x32046375 in PurpleEventCallback  
#13 0x30245560 in CFRunLoopRunSpecific  
#14 0x30244628 in CFRunLoopRunInMode  
#15 0x308f930d in -[UIApplication _run]  
#16 0x309021ee in UIApplicationMain  
#17 0x0000255c in main at main.m:14  

调用mainNibFile时,应用程序崩溃.而且我不知道为什么,但是只需重新保存MainWindow.xib即可解决问题.

The app crashes while calling the mainNibFile. And I don't know why, but simply re-saving the MainWindow.xib solved the problem.

这篇关于设置基本SDK后,iPhone模拟器在NSKeyedUnarchiver中崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆