xcode iOS 应用程序因未知原因崩溃
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16049228/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
iOS app crashing for unknown reasons
提问by Stephen
I am using the latest version of XCode and building for iOS 6.0 and above. The following is the crash log I get. It doesn't seem to be helpful at all. The only thing I notice is that for My App it says "[per-process-limit]". Does this mean anything? What else could be causing this crash? I am using ARC if that matters. Thanks
我正在使用最新版本的 XCode 并为 iOS 6.0 及更高版本构建。以下是我得到的崩溃日志。它似乎根本没有帮助。我唯一注意到的是,对于我的应用程序,它显示“[per-process-limit]”。这有什么意义吗?还有什么可能导致这次崩溃?如果这很重要,我正在使用 ARC。谢谢
Incident Identifier: B3FF81F3-FE14-46B2-A4C6-0931917D87C0
CrashReporter Key: e64be3b78430ea913edf711ceb553d83ad760b10
Hardware Model: iPhone5,1
OS Version: iPhone OS 6.1.3 (10B329)
Kernel Version: Darwin Kernel Version 13.0.0: Wed Feb 13 21:40:10 PST 2013; root:xnu-2107.7.55.2.2~1/RELEASE_ARM_S5L8950X
Date: 2013-04-16 18:57:49 -0400
Time since snapshot: 952 ms
Free pages: 1490
Active pages: 15836
Inactive pages: 7532
Throttled pages: 68031
Purgeable pages: 48
Wired pages: 165666
Largest process: Stevens Book Tra
Processes
Name <UUID> rpages recent_max [reason] (state)
timed <13d1143a8d7433cdbec64d4279aee1fe> 445 445 [vm] (daemon) (idle)
Bejeweled <ac11f9265d6634cc8ccb70757a223325> 14984 14984 [vm] (suspended)
AppStore <ffde258b8ad532398989bdd281fac800> 17866 17866 [vm] (suspended)
lsd <fe3afa7c718c30e591f1324f09d08c4f> 631 631 (daemon) (idle)
gamed <7954b1514d88384ca3f1f506b29d0812> 1510 1510 (daemon) (idle)
installd <4da1ba8fb7cd3c6690edf3e2a3c24269> 447 447 (daemon) (idle)
webbookmarksd <d241794687e23138a14c7a5ad4371181> 651 651 (daemon) (idle)
itunesstored <be14ada6a4d836f0aac6cf104f600c64> 2325 2325 (daemon) (idle)
networkd_privile <20292830d8d53949b82495c145d0a379> 131 131 (daemon) (idle)
softwareupdatese <1e626439b28f3e778f6a90c15b355c5d> 559 559 (daemon) (idle)
accountsd <6255c4bbbe953cc990fbeb8bc8d3ba86> 1141 1141 (daemon) (idle)
MobileMail <aed39adc22ee334c90bca672f578f1c0> 8775 8775 (continuous)
MobileSMS <afeef1d46f00323395b58b14f8803a82> 1726 1726 (background)
MobilePhone <872761e082c831a8a9090c8660347d5a> 1736 1736 (resume) (continuous)
tccd <e6dbe43518593da19ff55a9f3f15b3de> 325 325 (daemon)
kbd <47657f4dd979300a840367905786eccc> 782 782 (daemon)
My App <29f36b70932433febcb1123b2b6c534b> 151118 151118 [per-process-limit] (frontmost) (resume)
Pandora <6596910eed9532aca40f1ee3d6558334> 8775 8775 (audio) (background)
syslogd <42cd10099569364f811f66ad6f6dea46> 177 177 (daemon)
locationd <2d8cb2921fb538d4bb4aed62af98b4d2> 1988 1988 (daemon)
mediaserverd <221fa80d17503fc7aa86f1041bdcc0be> 2189 2189 (daemon)
wifid <71a35a9968a4358a8569e6de843ad1aa> 859 859 (daemon)
calaccessd <d4096f0836003ac8a5ef4cea07e382d1> 730 730 (daemon)
dataaccessd <7b294c10f04f36af8086f4ccb5606fae> 1778 1778 (daemon)
aosnotifyd <44b37f0df5c932e39b30230611981071> 737 737 (daemon)
iaptransportd <30bda0eeebb73681939e4223845ff0de> 378 378 (daemon)
SpringBoard <b0713272db793942ac49d8d3c84c2c2e> 11389 11389
backboardd <d9997ef1b2bc3015862615abf37ebb1b> 5874 5874 (daemon)
UserEventAgent <d19ebe160ed536c8b18c89f066b758a6> 943 943 (daemon)
securityd <eda98353705c34578e9b09867d3c96f6> 269 269 (daemon)
sandboxd <bbb7e05047a937159530525e2657928a> 277 277 (daemon)
syncdefaultsd <9c9a6da6f6993bb2be6ba01b851dc3e9> 698 698 (daemon)
mediaremoted <0279c54f0b2d30f6866036eea881cce1> 412 412 (daemon)
recentsd <99746b2acfdc3654881ad4fc961e2c89> 925 925 (daemon)
absinthed <a0bbaeb03c47300a9d5a7f6ce6468aab> 175 175 (daemon)
SCHelper <1ba907829bfa3e479f071e61c531331f> 227 227 (daemon)
filecoordination <44b0075fbc5b3af5b403fc3bcb6603b0> 350 350 (daemon)
distnoted <4b2b2984057b3df2a7e5c7d1d79a099b> 239 239 (daemon)
apsd <9ba45b14c44d340da1c3a41f28b46f65> 578 578 (daemon)
networkd <26c89c34e3e031fdb46bea7bed9df0ff> 324 324 (daemon)
aggregated <a2d209b4577a3697a10c288fd542e501> 126 126 (daemon)
fseventsd <b148ac55dd67325e822695755023a16e> 336 336 (daemon)
BTServer <e6eb89b2fe7b3b219a2d90e6735b166d> 424 424 (daemon)
imagent <e61401f9f6303ae189c517add142b837> 839 839 (daemon)
fairplayd.N41 <7d6161c8bf4633f7b62b9dbbd78ff990> 388 388 (daemon)
configd <d2cd8bc6ed643fa69392c80fc416cd8b> 795 795 (daemon)
lockdownd <f960236277c33ac78488eeea78661347> 333 333 (daemon)
powerd <fde6e83ab5f63bfeb5313e4cd86b25cc> 276 276 (daemon)
mDNSResponder <b9aedd3c47f43627af9b55c3d0844f16> 479 479 (daemon)
CommCenter <3fbedab9761b3733a3fc0cd58ab00055> 1702 1702 (daemon)
notifyd <bbd1f04dd7163c93bc9eb6e5a7b14ab7> 231 231 (daemon)
ReportCrash <3f296f612faa36d687fb3bb40a4648eb> 355 355 (daemon)
**End**
回答by Aaron Golden
Well, MyApp has got 151118 resident pages of memory, which is about 590 MB (a page under iOS is 4 KB). So that's far too much memory. Try running with the allocations tool in Instruments and see where your memory is going.
好吧,MyApp 有 151118 个常驻内存页,大约 590 MB(iOS 下一个页面为 4 KB)。所以内存太大了。尝试使用 Instruments 中的分配工具运行,看看你的内存去哪里了。
Edit, to actually answer the question:The system is killing your app because it's using too much memory. To fix the crash you need to reduce your memory usage (in this case quite drastically). I suspect that you have a bug causing a memory usage spike because it's unlikely that your app really needs as much memory as it is apparently using according to the log you posted.
编辑,实际回答这个问题:系统正在杀死您的应用程序,因为它使用了太多内存。要修复崩溃,您需要减少内存使用量(在这种情况下非常显着)。我怀疑您有一个导致内存使用量激增的错误,因为根据您发布的日志,您的应用程序不太可能真正需要与它明显使用的内存一样多的内存。