低内存警告总是导致iPad(第一代)崩溃

我的第一代iPad(iOS 5.0.1)的testing者之一正在抱怨不断崩溃。 从描述给我们的方式来看,我们确信当设备收到低内存警告时会发生崩溃。

为了certificate这一点,我们给testing者提供了一个内存版本,它没有足够的内存来提供低内存警告,并且工作正常。 但这不是一个解决办法。

作为testing者,我们有20台第一代iPad,他们都没有这个问题。

是否有可能在设备上设置可能导致内存不足警告时崩溃的内容?

iOS 5.0.1安装不正确?

有没有人知道为什么这个设备特别是崩溃的低内存警告,没有其他?

任何帮助将不胜感激, – 丰富

可以肯定的是,你应该尝试从设备获取崩溃日志。 testing人员必须将设备与iTunes同步,然后导航到iTunes复制任何崩溃报告的文件夹。 这取决于你使用的是什么平台。

Mac OS X: ~/Library/Logs/CrashReporter/MobileDevice/<DEVICE_NAME> Windows XP: C:\Documents and Settings\<USERNAME>\Application Data\Apple Computer\Logs\CrashReporter\MobileDevice\<DEVICE_NAME> Windows Vista or 7: C:\Users\<USERNAME>\AppData\Roaming\Apple Computer\Logs\CrashReporter\MobileDevice\<DEVICE_NAME> 

<USERNAME>是计算机的用户login名。 <DEVICE_NAME>是iPod touch或iPhone的名称,例如“我的iPhone”。

有办法自动收集崩溃报告,我发布了一个可能性的概述作为另一个答案的一部分在这里: 包括自定义数据到iOS崩溃转储

此外,您可以在iOS模拟器中testing时自动记忆警告。 子类UIViewController并在视图控制器出现时自动触发内存警告。

这里是一些如何做到这一点的示例代码:

 #import "BaseViewController.h" @interface BaseViewController (Private) - (void)simulateMemoryWarning; @end @implementation BaseViewController - (void) viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; #if TARGET_IPHONE_SIMULATOR #if defined (CONFIGURATION_Debug) // If we are running in the simulator and it's the DEBUG target // then simulate a memory warning. Note that the DEBUG flag isn't // defined by default. To define it add this Preprocessor Macro for // the Debug target: DEBUG=1 [self simulateMemoryWarning]; #endif #endif } - (void)simulateMemoryWarning { #if TARGET_IPHONE_SIMULATOR #if defined (CONFIGURATION_Debug) SEL memoryWarningSel = @selector(_performMemoryWarning); if ([[UIApplication sharedApplication] respondsToSelector:memoryWarningSel]) { [[UIApplication sharedApplication] performSelector:memoryWarningSel]; } else { NSLog(@"%@",@"Whoops UIApplication no loger responds to -_performMemoryWarning"); } (CFStringRef)@"UISimulatedMemoryWarningNotification", NULL, NULL, true); #endif #endif } @end 

现在使用这个当你自己的视图控制器的子类,而不是从UIViewController的子类。 这段代码最初是在这里发布的https://gist.github.com/956403,并通过添加从这里https://stackoverflow.com/a/2785175/474794的解决scheme调整到与Xcode 4.2.1一起工作

我是一个运行5.0.1的iPad 1用户,并且随着各种应用程序(Safari,Dropbox,Pages,愤怒的小鸟,香料盗贼等等)一直有这个问题。 如果你想崩溃日志,我会很乐意提供尽可能多的,你喜欢。

我可以让游戏运行一段时间的唯一方法是closures几乎所有额外的“服务”(电子邮件,通知,位置),然后重新启动设备。 然后强制所有进程closures。 我已经恢复了这个设备,并且在5.1版本出来之前就把所有的东西都恢复了。

如果你有一个特定的应用程序,你想我testing我会很乐意。

我有一个iPad 3G的16GB

安德烈