【问题标题】:iPhone task switcher image is blackiPhone任务切换器图像为黑色
【发布时间】:2014-09-26 17:25:39
【问题描述】:

我继承了一个代码库,只是注意到当我关闭应用程序(点击主页按钮)然后尝试使用任务切换器(双击主页按钮)切换到该应用程序时,我的应用程序出现在任务切换器中一个完全黑色的图像,而不是我正在查看的最后一页的预期屏幕截图。

这是否发生在其他人身上?关于可能导致它的任何想法?正如我所说,我继承了这个代码库,所以我不知道是什么原因造成的。

Matt 在接受的答案中弄清楚了下面发生了什么,但我想我会在这里添加一些日志,以防其他人遇到这种情况:

// Logs showing a correct shutdown
Sep 26 16:48:14 iPod-touch iap2d[2096] <Warning>: process HTTPLeakTester is now running in the background
Sep 26 16:48:15 iPod-touch iap2d[2096] <Warning>: process HTTPLeakTester is now suspending

// Logs Showing my killed app's shutdown
Sep 26 16:47:19 iPod-touch iap2d[2096] <Warning>: process ***** is now running in the background
Sep 26 16:47:19 iPod-touch SpringBoard[42] <Warning>: BSXPCMessage received error for message: Connection interrupted
Sep 26 16:47:19 iPod-touch SpringBoard[42] <Warning>: Application 'UIKitApplication:*****[0x5d54]' exited voluntarily.
Sep 26 16:47:19 iPod-touch assertiond[56] <Error>: assertion failed: 12A365: assertiond + 62335 [032107D4-DB2B-36DD-AC98-6060D8C62F73]: 0x3
Sep 26 16:47:19 iPod-touch assertiond[56] <Warning>: pid_suspend failed for <BKNewProcess: 0x16614640; *****; pid: 2386>: Unknown error: -1, Unknown error: -1
Sep 26 16:47:19 iPod-touch Unknown[56] <Error>: 
Sep 26 16:47:19 iPod-touch assertiond[56] <Warning>: Could not set priority of <BKNewProcess: 0x16614640; *****; pid: 2386> to 2, priority: No such process
Sep 26 16:47:19 iPod-touch assertiond[56] <Warning>: Could not set priority of <BKNewProcess: 0x16614640; *****; pid: 2386> to 4096, priority: No such process
Sep 26 16:47:19 iPod-touch assertiond[56] <Error>: assertion failed: 12A365: assertiond + 62335 [032107D4-DB2B-36DD-AC98-6060D8C62F73]: 0x3
Sep 26 16:47:19 iPod-touch UserEventAgent[17] <Warning>: id=***** pid=2386, state=0
Sep 26 16:47:19 iPod-touch iap2d[2096] <Warning>: process ***** is now switching to other state
Sep 26 16:47:19 iPod-touch iap2d[2096] <Warning>: process ***** is now terminated

【问题讨论】:

  • 搜索ignoreSnapshotOnNextApplicationLaunch
  • 谢谢马特,我在谷歌搜索这个问题后已经这样做了。它不在此代码库中。
  • 您能否追踪应用程序willResignActivedidEnterBackground 中可能发生的其他情况? (搜索这些短语。)
  • 两者都没有实现。不幸的是,如果它这么简单,我就不需要问了。
  • 我担心你会这么说。 :( 我对自己的应用程序执行此操作有一个模糊的记忆,我正在尝试重建原因。该应用程序实际上是否已针对最新系统重新编译?我的模糊记忆是在那之前我遇到了这个问题;例如 iOS 6 应用程序在 iOS 7 上运行可能会像这样。

标签: ios iphone ios7


【解决方案1】:

我猜测该应用程序对内存管理不善(或者在后台运行时可能尝试做其他错误,例如使用大量 CPU 时间过长)。毕竟,你继承了它,所以你不知道,这不是你的错。结果是,当我们进入后台时,看门狗进程发现应用程序表现不佳并立即将其杀死。

如果您使用应用切换器进入后台,切换到黑色快照并启动,然后应用从头开始启动,您可以确认这一点。这证明它是在后台终止的。

如果这个猜测是正确的,那么当应用程序成为更好的公民时,问题应该会消失。

【讨论】:

  • 哦,好猜。该应用程序确实被完全杀死。他们用大量的计时器构建了它,这些计时器向网络中充斥着请求(我现在正在清理它),我可以看到操作系统在退出时杀死了它。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2010-10-23
  • 2012-10-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多