我继承了一个iOS应用程序,它使用Irrlicht引擎来实现其大部分功能,并且遇到了一个相当烦人的问题。
我们正在使用Facebook Connect登录并注册,因为我只能假设其他内存问题我正在使用iPhone上的FB应用程序和iPad上的对话窗口。
然而,在iPod Touch第4代上,应用程序会在登录对话框出现后立即崩溃。 它适用于其他设备 - 带有捕获。如果将iPad 1插入Mac,那么当Facebook Dialog出现时,无论我是否通过xcode实际运行它,它都会崩溃。无论如何,3GS似乎都能正常工作,我相信iPad 3也能可靠运行。 iPad 3和有问题的iPod不在现场,所以我无法彻底测试它们。
鉴于3GS版本没有问题,iPod版本是否会如此容易崩溃是否有任何原因。他们目前都在使用同一组资产,所以如果这是问题我会期望他们都崩溃。
有什么建议吗?
编辑:这是受影响设备上的控制台输出。
May 30 23:16:23 unknown kernel[0] <Debug>: launchd[1298] Builtin profile: container (sandbox)
May 30 23:16:23 unknown kernel[0] <Debug>: launchd[1298] Container: /private/var/mobile/Applications/87B7926A-AA91-48BA-B7EE-73BCDBACCC17 [69] (sandbox)
May 30 23:16:23 unknown Golman[1298] <Warning>: Unknown class AdMobView in Interface Builder file.
May 30 23:16:37 unknown MobileMail[1245] <Warning>: Received memory warning.
May 30 23:16:38 unknown Golman[1298] <Warning>: Received memory warning.
May 30 23:16:38 unknown Golman[1298] <Warning>: Warning: Libinfo call to mDNSResponder on main thread
May 30 23:16:38 unknown SpringBoard[51] <Warning>: Received memory warning.
May 30 23:16:42 unknown Golman[1298] <Warning>: enter login page
May 30 23:16:53 unknown Golman[1298] <Warning>: leave login page
May 30 23:16:53 unknown Golman[1298] <Warning>: enter login page
May 30 23:17:00 unknown Golman[1298] <Warning>: leave login page
May 30 23:17:00 unknown Golman[1298] <Warning>: enter login page
May 30 23:17:18 unknown Golman[1298] <Warning>: leave login page
May 30 23:17:18 unknown Golman[1298] <Warning>: enter login page
May 30 23:17:21 unknown Golman[1298] <Warning>: leave login page
May 30 23:17:21 unknown Golman[1298] <Warning>: enter login page
May 30 23:17:24 unknown Golman[1298] <Warning>: leave login page
May 30 23:17:24 unknown Golman[1298] <Warning>: enter login page
May 30 23:17:38 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.plantpot.golman[0xaf95]) Exited: Killed: 9
May 30 23:17:38 unknown UserEventAgent[12] <Notice>: jetsam: kernel termination snapshot being created
May 30 23:17:39 unknown SpringBoard[51] <Warning>: Unable to send deactivation event to <SBApplication: 0xfda12e0> com.plantpot.golman userLaunch statusBarWindowContextId = 1325144038 statusBarOrientation = 3 activate: deactivate: animate animationStart = 36566.94129066667 animationScale = 0.001 animationDuration = 0.4 : (ipc/send) invalid destination port
May 30 23:17:39 unknown SpringBoard[51] <Warning>: Application 'Golman' exited abnormally with signal 9: Killed: 9
May 30 23:17:40 unknown kernel[0] <Debug>: launchd[1304] Builtin profile: container (sandbox)
May 30 23:17:40 unknown kernel[0] <Debug>: launchd[1304] Container: /private/var/mobile/Applications/8FF2FEC5-D24D-4DBB-BC6B-782F89051CFC [69] (sandbox)
May 30 23:17:41 unknown ReportCrash[1303] <Notice>: Saved crashreport to /Library/Logs/CrashReporter/LowMemory-2012-05-30-231741.plist using uid: 0 gid: 0, synthetic_euid: 0 egid: 0
May 30 23:17:46 unknown UIKitApplication:com.facebook.Facebook[0x4c2b][1304] <Notice>: wait_fences: failed to receive reply: 10004003
May 30 23:17:50 unknown Golman[1308] <Warning>: Unknown class AdMobView in Interface Builder file.
May 30 23:17:50 unknown kernel[0] <Debug>: launchd[1308] Builtin profile: container (sandbox)
May 30 23:17:50 unknown kernel[0] <Debug>: launchd[1308] Container: /private/var/mobile/Applications/87B7926A-AA91-48BA-B7EE-73BCDBACCC17 [69] (sandbox)
May 30 23:17:51 unknown Golman[1308] <Warning>: Logged into facebook
May 30 23:18:01 unknown MobileMail[1245] <Warning>: Received memory warning.
May 30 23:18:02 unknown SpringBoard[51] <Warning>: Received memory warning.
May 30 23:18:03 unknown Golman[1308] <Warning>: void SendDelegateMessage(NSInvocation*): delegate (webView:didCommitLoadForFrame:) failed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode
May 30 23:18:05 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.apple.mobilemail[0x6fdf]) Exited: Killed: 9
May 30 23:18:05 unknown UserEventAgent[12] <Notice>: jetsam: kernel termination snapshot being created
May 30 23:18:05 unknown SpringBoard[51] <Warning>: pid_suspend failed for [1304]: Unknown error: -1, Unknown error: -1
May 30 23:18:05 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.facebook.Facebook[0x4c2b]) Exited: Killed: 9
May 30 23:18:05 unknown SpringBoard[51] <Warning>: Application 'Mail' exited abnormally with signal 9: Killed: 9
May 30 23:18:06 unknown SpringBoard[51] <Warning>: Application 'Facebook' exited abnormally with signal 9: Killed: 9
May 30 23:18:06 unknown Golman[1308] <Warning>: Received memory warning.
May 30 23:18:07 unknown Golman[1308] <Warning>: Warning: Libinfo call to mDNSResponder on main thread
May 30 23:18:08 unknown ReportCrash[1310] <Notice>: Saved crashreport to /Library/Logs/CrashReporter/LowMemory-2012-05-30-231808.plist using uid: 0 gid: 0, synthetic_euid: 0 egid: 0
May 30 23:18:09 unknown Golman[1308] <Warning>: (friends list received)
May 30 23:18:11 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.plantpot.golman[0x8c4]) Exited: Killed: 9
May 30 23:18:11 unknown UserEventAgent[12] <Notice>: jetsam: kernel termination snapshot being created
May 30 23:18:11 unknown SpringBoard[51] <Warning>: Application 'Golman' exited abnormally with signal 9: Killed: 9
May 30 23:18:12 unknown SpringBoard[51] <Notice>: Posting 'com.apple.iokit.hid.displayStatus' notifyState=0
May 30 23:18:12 unknown SpringBoard[51] <Notice>: MultitouchHID: detection mode: 0->255
May 30 23:18:12 unknown UserEventAgent[12] <Warning>: DEBUG: Changing screen blanked state: 1
May 30 23:18:12 unknown UserEventAgent[12] <Warning>: DEBUG: We could backup; waking backupd to decide
May 30 23:18:12 unknown UserEventAgent[12] <Warning>: TRACE: <MBManagerClient: 0x1402d0> establishing connection with daemon...
May 30 23:18:13 unknown UserEventAgent[12] <Warning>: TRACE: <MBConnection: 0x155340> sending {
command = kMBMessageWakeUp;
}
May 30 23:18:14 unknown backupd[1313] <Warning>: INFO: Scheduling next backup at 5/31/12 11:01:35 PM
May 30 23:18:17 unknown ReportCrash[1314] <Notice>: Saved crashreport to /Library/Logs/CrashReporter/LowMemory-2012-05-30-231817.plist using uid: 0 gid: 0, synthetic_euid: 0 egid: 0
编辑2:我刚刚在屏幕上使用了分配工具。 “All Allocation”字段中的实时字节此时最多只能达到34/35 MB。这似乎不足以引起内存问题。此外,内存警告开始出现在该点之前,当它将纹理加载到游戏中时。该应用程序使用Irrlicht库,如果这可以解决问题。几乎所有的图像,动画,声音等都是从一开始就加载的,但是当发生这种情况时应用程序永远不会崩溃。几乎总是在打开某种类型的Web视图时,例如FB对话框。正如评论中所提到的,这个项目最初属于其他人。不幸的是,当它们完成它时它并不完全稳定。
编辑3:现在尝试使用Memory Monitor。第一次在加载纹理时崩溃,并向我展示它使用~80MB真实和~200MB虚拟内存。之后我停止加载任何纹理,这次它仍然崩溃,显示69MB和179MB。删除了音频和动画“虚拟”,它在开始时被初始化并以38MB / 147MB的速度崩溃。
不知道如何在没有加载纹理的情况下如此快速地消耗这么多内存。