简体   繁体   English

iOS7-应用导致设备(非应用)崩溃

[英]iOS7 - App causes device (not app) to crash

Our company has an app which is basically an eBook reader. 我们公司有一个基本上是电子书阅读器的应用程序。

We use the RMSDK to perform book downloads & read. 我们使用RMSDK进行图书下载和阅读。

Now, something very strange is happening in iOS7 devices (not in the simulator): 现在,iOS7设备(而不是模拟器)中发生了非常奇怪的事情:

  1. I download a book using the fulfillment method in the RMSDK 我使用RMSDK中的实现方法下载了一本书
  2. I wait for the book to finish downloading. 我等待这本书完成下载。 The book is saved in the NSCachesDirectory (for App Store guidelines reasons) - so far, everything works fine 该书保存在NSCachesDirectory中(出于App Store指南的原因)-到目前为止,一切正常
  3. I hit the home button, the app moves to the background 我按下主页按钮,应用程序移至后台
  4. I hit the app button to bring the app back, that's when the problem happens: 我按下应用程序按钮以将应用程序重新带回,这就是问题发生的时间:

The app gets completely stuck. 该应用程序完全卡住了。 Hitting the home button does nothing, hitting the power button shuts down the screen, but then hitting the power button again does nothing. 按下主页按钮没有任何作用,按下电源按钮可以关闭屏幕,但是再次按下电源按钮则没有任何作用。 The device itself has effectively crashed. 设备本身已有效崩溃。

After a few minutes, the Apple logo appears on the device and the device comes back to life after a reboot. 几分钟后,Apple徽标会出现在设备上,并且重启后设备会恢复正常。

I have no idea what in my code could be causing the device to act this way. 我不知道代码中的什么会导致设备以这种方式运行。 Shouldn't the iOS7 sandbox prevent me from being able to crash the whole device? iOS7沙箱是否应该阻止我使整个设备崩溃?

Any ideas on why this could be happening and what I can do to prevent it would be greatly appreciated. 任何关于为什么会发生这种情况以及我能做些什么来防止它的想法,将不胜感激。

EDIT: I placed a breakpoint on the -(void)applicationDidBecomeAcvive: method in the AppDelegate, and it's not being called when clicking on the app icon in the last phase before the crash. 编辑:我在AppDelegate中的-(void)applicationDidBecomeAcvive:方法上放置了一个断点,并且在崩溃前的最后一个阶段单击应用程序图标时未调用该断点。

EDIT: The RMSDK is using libcurl to download the books. 编辑: RMSDK使用libcurl下载书籍。 Could this be a cause for this behavior? 这可能是这种行为的原因吗?

EDIT: The problem is happening if I click on ANY app after I click on the home button, not just on the same app. 编辑:如果我单击主页按钮后,而不是仅在同一应用程序上单击任何应用程序,就会发生问题。 So for example, I click on the home button, then I try to open Fruit Ninja , and the device crashes. 因此,例如,我单击主页按钮,然后尝试打开Fruit Ninja ,设备崩溃。

We managed to solve this issue by disabling functions in RMSDK, which call mkfifo() . 我们设法通过禁用RMSDK中的调用mkfifo()函数来解决此问题。 I'm not sure how much I can say here due to NDA but they're all located in one file and can be cleanly converted to no-ops with a nice preprocessor #if defined() 由于NDA,我不确定在这里能说多少,但是它们都位于一个文件中,并且可以通过一个很好的预处理器#if defined()干净地转换为no-ops。

Its an OS level bug. 它是操作系统级别的错误。 iOS 7 is still unstable in areas, for example my Apps report crashes in places that are part of iOS 7 itself and couldn't be caused by my app. iOS 7在某些方面仍然不稳定,例如,我的Apps报告在iOS 7本身的一部分中崩溃,并且不是由我的应用程序引起的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM