【问题标题】:ios random crash debugging - help interpreting console infoios 随机崩溃调试 - 帮助解释控制台信息
【发布时间】:2012-12-01 10:37:25
【问题描述】:

当我的应用随机崩溃时,我在控制台中收到以下报告。它似乎发生在应用程序的不同屏幕上,但我在下面添加了一个示例。我不太确定从哪里开始解决此问题,因此您可以提供的任何帮助或建议都会很棒!谢谢:-)

Dec  1 10:27:41 Olivias-iPad Moonshine2[4171] <Warning>: [MPAVController] Autoplay:                 Disabling autoplay for pause
Dec  1 10:27:41 Olivias-iPad Moonshine2[4171] <Warning>: [MPAVController] Autoplay: Disabling autoplay
Dec  1 10:27:41 Olivias-iPad Moonshine2[4171] <Warning>: [MPAVController] Autoplay: Enabling autoplay
Dec  1 10:27:41 Olivias-iPad Moonshine2[4171] <Warning>: [MPAVController] Autoplay: Likely to keep up or full buffer: 0
Dec  1 10:27:41 Olivias-iPad Moonshine2[4171] <Warning>: [MPAVController] Autoplay: Skipping autoplay, not enough buffered to keep up.
Dec  1 10:27:41 Olivias-iPad Moonshine2[4171] <Warning>: [MPAVController] Autoplay: Skipping autoplay, disabled (for current item: 1, on player: 0)
Dec  1 10:27:41 Olivias-iPad Moonshine2[4171] <Warning>: [MPAVController] Autoplay: Enabling autoplay
Dec  1 10:27:41 Olivias-iPad Moonshine2[4171] <Warning>: [MPAVController] Autoplay: Likely to keep up or full buffer: 0
Dec  1 10:27:41 Olivias-iPad Moonshine2[4171] <Warning>: [MPAVController] Autoplay: Skipping autoplay, not enough buffered to keep up.
Dec  1 10:27:41 Olivias-iPad Moonshine2[4171] <Warning>: [MPAVController] Autoplay: Enabling autoplay
Dec  1 10:27:41 Olivias-iPad Moonshine2[4171] <Warning>: [MPCloudAssetDownloadController] Prioritization requested for media item ID: 0
Dec  1 10:27:42 Olivias-iPad Moonshine2[4171] <Warning>: [MPAVController] Autoplay: Enabling autoplay
Dec  1 10:27:42 Olivias-iPad Moonshine2[4171] <Warning>: [MPAVController] Autoplay: Likely to keep up or full buffer: 1
Dec  1 10:27:42 Olivias-iPad Moonshine2[4171] <Warning>: [MPAVController] Autoplay: Enabling autoplay
Dec  1 10:27:42 Olivias-iPad Moonshine2[4171] <Warning>: [MPAVController] Autoplay: _streamLikelyToKeepUp: 0 -> 1
Dec  1 10:27:42 Olivias-iPad Moonshine2[4171] <Warning>: [MPAVController] Autoplay: Enabling autoplay
Dec  1 10:27:42 Olivias-iPad Moonshine2[4171] <Warning>: [MPAVController] Autoplay: Enabling autoplay
Dec  1 10:27:42 Olivias-iPad Moonshine2[4171] <Warning>: [MPAVController] Autoplay: Enabling autoplay
Dec  1 10:27:42 Olivias-iPad Moonshine2[4171] <Warning>: This is my variable Moonshine
Dec  1 10:27:42 Olivias-iPad Moonshine2[4171] <Warning>: i'm moon
Dec  1 10:27:42 Olivias-iPad UserEventAgent[13] <Notice>: jetsam: kernel termination snapshot being created
Dec  1 10:27:42 Olivias-iPad com.apple.launchd[1] (UIKitApplication:com.apple.mobilemail[0x55e7][4132]) <Notice>: (UIKitApplication:com.apple.mobilemail[0x55e7]) Exited: Killed: 9
Dec  1 10:27:42 Olivias-iPad com.apple.launchd[1] (UIKitApplication:com.apple.mobilephone[0xccd5][4130]) <Notice>: (UIKitApplication:com.apple.mobilephone[0xccd5]) Exited: Killed: 9
Dec  1 10:27:42 Olivias-iPad com.apple.launchd[1] (com.apple.tccd[4133]) <Notice>: (com.apple.tccd) Exited: Killed: 9
Dec  1 10:27:42 Olivias-iPad com.apple.launchd[1] (com.apple.TextInput.kbd[4144]) <Notice>: (com.apple.TextInput.kbd) Exited: Killed: 9
Dec  1 10:27:42 Olivias-iPad com.apple.launchd[1] (UIKitApplication:com.yourcompany.Moonshine2[0x74c9][4171]) <Notice>: (UIKitApplication:com.yourcompany.Moonshine2[0x74c9]) Exited: Killed: 9
Dec  1 10:27:42 Olivias-iPad backboardd[690] <Warning>: Application 'UIKitApplication:com.apple.mobilemail[0x55e7]' exited abnormally with signal 9: Killed: 9
Dec  1 10:27:42 Olivias-iPad backboardd[690] <Warning>: Application 'UIKitApplication:com.apple.mobilephone[0xccd5]' exited abnormally with signal 9: Killed: 9
Dec  1 10:27:42 Olivias-iPad backboardd[690] <Warning>: Application 'UIKitApplication:com.yourcompany.Moonshine2[0x74c9]' exited abnormally with signal 9: Killed: 9
Dec  1 10:27:43 Olivias-iPad kernel[0] <Debug>: launchd[4176] Builtin profile: MobileMail (sandbox)
Dec  1 10:27:44 Olivias-iPad ReportCrash[4175] <Error>: libMobileGestalt copySystemVersionDictionaryValue: Could not lookup ReleaseType from system version dictionary
Dec  1 10:27:44 Olivias-iPad ReportCrash[4175] <Notice>: Saved crashreport to /Library/Logs/CrashReporter/LowMemory-2012-12-01-102744.plist using uid: 0 gid: 0, synthetic_euid: 0 egid: 0
Dec  1 10:27:48 Olivias-iPad kernel[0] <Debug>: launchd[4182] Builtin profile: syncdefaultsd (sandbox)

【问题讨论】:

  • 当 Mail、Phone 和您的应用程序随后被杀死时,这通常意味着您的应用程序正在消耗内存。
  • 您似乎使用了太多内存,您是否尝试过使用 Instruments 分配检查器来分析您的应用程序?
  • 感谢您的建议。我刚刚使用仪器分配检查器分析了该应用程序。查看结果(已创建并仍在运行),我可以看到应用程序使用得越多,运行和总字节数增加的越多。从结果看来,当用户在应用程序中移动时,被删除的视图以某种方式保存在内存中。那有意义吗?你对我能做些什么来确保它们从内存中释放有什么建议吗?我正在使用:
  • FourthViewController *aFourthView = [[FourthViewController alloc] initWithNibName:@"FourthView" bundle:nil]; [自我 setFourthViewController:aFourthView]; [aFourthView 发布]; [thirdViewController.view removeFromSuperview]; [self.window setRootViewController:fourthViewController]; [第三个ViewController 发布]; thirdViewController = nil;

标签: ios debugging crash console


【解决方案1】:

根据您的评论,可能thirdViewController 实际上没有正确保留,但它保留在内存中,不会被窗口保留(或者从您使用窗口的方式来看)。

此外,按照您使用它的方式,使用为此目的构建的健壮对象(如 UITabController)可能会更好。可以在不显示任何地方的情况下使用它,并且您可以以编程方式换出视图控制器。如果这不合适,那么 UINavigationController 肯定会。没有必要重新发明轮子。干杯。

【讨论】:

  • 认为可能是这样。我在将项目转换为 ARC 以管理内存方面做了一些工作,但我发现视图保留在内存中。我有一个 UINavigationController。我的应用程序仅在横向左方向运行。当我使用 [window setRootViewController:viewController];加载然后 [self.window addSubview:[finalViewController view]];新视图以纵向显示 - 如果我在加载时将其旋转到带有代码的横向左侧,则会出现各种其他随机问题。
  • 如果我使用 [self.viewController.view removeFromSuperview] 而不是 addSubview; [self.window setRootViewController:finalViewController];viewController = nil;旋转没问题,但视图没有发布,我的应用程序存在内存问题,最终崩溃。任何想法都会很棒-感谢我在这里可能遗漏了一些相当基本的东西。
  • 我发现我可以通过添加 [viewController viewDidUnload] 来解决这个问题;
猜你喜欢
  • 1970-01-01
  • 2019-11-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-07-31
  • 1970-01-01
  • 2016-08-06
相关资源
最近更新 更多