我的应用程序崩溃

我的应用程序崩溃

本文介绍了我的应用程序崩溃,关闭,有很少的信息,为什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个崩溃,将非常感谢一些如何找到和解决问题的建议。
游戏只是关闭。当应用程序附加并在调试器中运行时,没有调试输出说为什么像正常崩溃。我知道它发生后一个LoadView,因为在LoadView结束时的NSLog是最后一个输出,在屏幕上每次。下面是有限的崩溃报告表单组织者('未知'过程我认为,因为它是在调试器中运行)。这只是开始发生在ios6。根据仪器显然没有内存泄漏,虽然我不知道我完全信任它。崩溃往往发生在你玩游戏一段时间,来回穿过屏幕,所以感觉像一个泄漏。然而,它总是返回到同一个屏幕的事实表明这是一个问题的视图控制器。我不知道rpages是什么,我不知道90974是否太大。

I have a crash and would greatly appreciate some advice on how to find and fix the problem.The Game simply shuts downs. When the app is attached and running in the debugger, there is no debug output to say why like with a 'normal' crash. I know it happens after a LoadView because an NSLog at the end of LoadView is the last output, on the same screen every time. Below is the limited crash report form Organizer ('unknown' process I think because it was running in the debugger?) This has only started happening on ios6. There are apparently no memory leaks according to the instrument though I'm not sure I entirely trust it. The crash tends to happen when you play the game for a while and go back and forth through the screens so it feels like a leak. However the fact it is always when returning to the same screen suggests it's a problem with that view controller. I don't know what rpages is exactly and I don't know if 90974 is too big.

Incident Identifier: 7D34217C-9F8E-49B0-B399-1F5573355F31
CrashReporter Key:   29ce6ea76874d5a03d826014a1f50e1a2160db41
Hardware Model:      iPhone3,1
OS Version:          iPhone OS 6.0 (10A403)
Kernel Version:      Darwin Kernel Version 13.0.0: Sun Aug 19 00:27:34 PDT 2012; root:xnu-2107.2.33~4/RELEASE_ARM_S5L8930X
Date:                2012-10-30 22:48:15 -0700
Time since snapshot: 206 ms

Free pages:        958
Active pages:      2673
Inactive pages:    2118
Throttled pages:   101092
Purgeable pages:   0
Wired pages:       22186
Largest process:   MyCrashingApp

Processes
 Name                    <UUID>                       rpages       recent_max       [reason]          (state)

  MobileMail <bff817c61ce33c85a43ea9a6c98c29f5>         1165             1165         [vm]         (resume) (continuous)
  MobilePhone <3fca241f2a193d0fb8264218d296ea41>        898              898         [vm]         (resume) (continuous)
  tccd <eb5ddcf533663f8d987d67cae6a4c4ea>               119              119         [vm]         (daemon)
  MyCrashingApp <f6c54a2392523abe8745d853870bf985>      90974            90974         [vm]         (audio) (frontmost) (resume)
  ptpd <04a56fce67053c57a7979aeea8e5a7ea>               665              665                      (daemon)
  locationd <892cd1c9ffa43c99a82dba197be5f09e>          1237             1237                      (daemon)
  dataaccessd <2a3f6a518f3f3646bf35eddd36f25005>        614              614                      (daemon)
  mediaserverd <80657170daca32c9b8f3a6b1faac43a2>       1316             1316                      (daemon)
  syslogd <cbef142fa0a839f0885afb693fb169c3>            139              139                      (daemon)
  wifid <9472b090746237998cdbb9b34f090d0c>              284              284                      (daemon)
  iaptransportd <f784f30dc09d32078d87b450e8113ef6>      192              192                      (daemon)
  SpringBoard <27372aae101f3bbc87804edc10314af3>        3477             3477
  backboardd <5037235f295b33eda98eb5c72c098858>         9957             9957                      (daemon)
  aggregated <8c3c991dc4153bc38aee1e841864d088>         75               75                      (daemon)
  BTServer <c92fbd7488e63be99ec9dbd05824f5e5>           198              198                      (daemon)
  configd <4245d73a9e96360399452cf6b8671844>            897              897                      (daemon)
  fairplayd.N90 <3ac48d9cfb143757bccce4fe6c154533>      135              135                      (daemon)
  fseventsd <996cc4ca03793184aea8d781b55bce08>          315              315                      (daemon)
  imagent <1e68080947be352590ce96b7a1d07b2f>            528              528                      (daemon)
  mDNSResponder <3e557693f3073697a58da6d27a827d97>      237              237                      (daemon)
  lockdownd <ba1358c7a8003f1b91af7d5f58dd5bbe>          207              207                      (daemon)
  powerd <2d2ffed5e69638aeba1b92ef124ed861>             123              123                      (daemon)
  UserEventAgent <6edfd8d8dba23187b05772dcdfc94f90>     427              427                      (daemon)
  debugserver <185719f06f1631d4922c652bdd4c8529>        0                0                      (daemon)
  gputoolsd <889065a15ba8372ca533e023c10bd776>          0                0                      (daemon)
  springboardservi <ff6f64b3a21a39c9a1793321eefa5304>   0                0                      (daemon)
  syslog_relay <45e9844605d737a08368b5215bb54426>       0                0                      (daemon)
  syslog_relay <45e9844605d737a08368b5215bb54426>       0                0                      (daemon)
  DTMobileIS <23303ca402aa3705870b01a9047854ea>         0                0                      (daemon)
  afcd <b0aff2e7952e34a9882fec81a8dcdbb2>               120              120                      (daemon)
  notification_pro <845b7beebc8538ca9ceef731031983b7    118              118                      (daemon)
  filecoordination <fbab576f37a63b56a1039153fc1aa7d8>   115              115                      (daemon)
  distnoted <a89af76ec8633ac2bbe99bc2b7964bb0>          101              101                      (daemon)
  apsd <94d8051dd5f5362f82d775bc279ae608>               280              280                      (daemon)
   networkd <0032f46009f53a6c80973fe153d1a588>          147              147                      (daemon)
   CommCenterClassi <c82f228b14a830cdb88e3cc1068330b3>  616              616                      (daemon)
   notifyd <51c0e03da8a93ac8a595442fcaac531f>           167              167                      (daemon)
   ReportCrash <8c32f231b2ed360bb151b2563bcaa363>       135              135                      (daemon)

结束

推荐答案

您的应用程序崩溃,因为Jetsam(又名memorystatus),是iOS的低内存条件处理程序,杀死它(这是类似于Linux的OOM和Android的LowMemory杀手) 。你看到的是内存快照。请允许我解释:

Your app is crashing because Jetsam (a.k.a memorystatus), which is iOS's low memory condition handler, kills it (this is similar to Linux's OOM and Android's LowMemory Killer). What you are seeing is the memory snapshot. Allow me to explain:


Free pages:        958  - how much free physical memory (in multiples of 4K)
Active pages:      2673 - how many pages in physical memory have recently been used
Inactive pages:    2118 - how many pages in physical memory have NOT recently been used
Throttled pages:   101092 - how many pages are subject to throttling (long story, irrelevant here)
Purgeable pages:   0      - how many pages can be kicked out, on low memory condition
Wired pages:       22186  - how many pages are resident locked, mostly for kernel purposes, or shared libraries

您的应用程序具有不幸的和可疑的荣誉,拥有最常驻的记忆(数量级,与其他人相比)。所以当低内存条件发生时 - 一些应用程序想要 malloc()一个大块,没有足够的空闲页面 - Jetsam只是选择顶部内存和 - 热潮。 Kill -9 。因此,没有调试转储等iOS没有交换,所以没有办法转储过程的交换清除内存。唯一的办法是出去。

Your app has the unfortunate and dubious honor of having the most resident memory (by orders of magnitude, compared to others). So when the low memory condition occurs - some app wanting to malloc() a large chunk, and not enough free pages remain - Jetsam simply chooses the top memory and -- boom. Kill -9. Hence, no debug dump, etc. iOS has no swap, so there's no way to dump processes on the swap to clear up memory. The only way is out. Death.

你可以做什么:

在Jetsam杀死你之前,通过事件,Obj-C运行时翻译成 -didReceiveMemoryWarning 。所以处理它。根据你描述的内容,你可能还想要释放 UIView 。那些消耗了大量的内存。

Before Jetsam kills you, there is usually a low memory notification via an event, which the Obj-C runtime translated into the -didReceiveMemoryWarning. So handle it. From what you're describing, you might also want to release the UIViews. Those consume a LOT of memory.

这篇关于我的应用程序崩溃,关闭,有很少的信息,为什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-27 08:49