2014-09-26 82 views
0

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

这发生过其他人吗?有什么想法可能会导致它?正如我所说,我继承了这个代码库,所以我不知道是什么原因造成了这种情况。

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 [7D4-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 [7D4-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 
+0

搜索'ignoreSnapshotOnNextApplicationLaunch'。 – matt 2014-09-26 17:29:03

+0

感谢马特,我在谷歌搜索这个问题之后就已经这么做了。它不在这个代码库中。 – 2014-09-26 17:35:29

+0

你可以追踪应用程序'willResignActive'和'didEnterBackground'还有什么可能发生? (搜索这些短语。) – matt 2014-09-26 18:02:25

回答

1

我要去猜测该应用程序是对内存管理不当(或者在后台运行时尝试做其他事情,例如使用大量CPU太久)。毕竟,你继承了它,所以你不知道,这不是你的错。其结果是,当我们进入后台时,监督程序会发现应用程序行为不佳,并立即将其终止。

如果您使用应用切换器进入背景,切换到黑色快照并启动,并且应用从头开始启动,则可以确认此操作。这证明它在后台被终止。

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

+0

Oooo,很好的猜测,应用程序确实被完全杀死了,他们用大量的定时器构建了它,这些定时器充斥着请求的网络(我正在清理这个现在就开始),我可以看到操作系统在退出时正在查杀。 – 2014-09-26 23:51:04