goat
goat

Reputation: 69

App "crashes" when quit while in background

I am using Xcode 7.1 and Swift 2.1 and am encountering a very bizarre crash in my application. My testing is being done on a real device, specifically the iPhone 6 running iOS 9.1.

Scenario 1 - I am using my app like normal, I double tap the home button and swipe up on my app to quit it. In this case, Xcode goes from "Running [app name] on [device name]" to "Finished running [app name] on [device name]" just as it should.

Scenario 2 - I am using my app like normal, I double tap the home button and go to a different running app while my app is still running in the background. Then, I double tap the home button once more and go back to my app. Finally I double tap the home button and quit my app. In this case, Xcode goes from "Running [app name] on [device name]" to "Finished running [app name] on [device name]" just as it should.

Scenario 3 - I am using my app like normal, I double tap the home button and go to a different running app while my app is still running in the background. Then, I double tap the home button once more and quit my app (not the app being currently used) and Xcode treats this as a crash. The line class AppDelegate: UIResponder, UIApplicationDelegate { gets highlighted red and says "Thread 1: signal SIGKILL". In the crash log, all it says is "(lldb)" and the breakdown of what went wrong under thread 1 does not highlight any of my own code. I also created a blank application, tried these scenarios, and was greeted by the same behavior and an identical thread breakdown.

How can I fix, or even begin to understand, what's going wrong here? According to this I may be dealing with a "watch-dog timeout", granted the source is possibly outdated. This isn't really affecting my users nor the application in a negative way, but I do believe these "crashes" get reported to App Analytics. Some days I see a relatively large amount of crashes being reported and I would like to eliminate this particular occurrence so I can know how many people are experiencing functional crashes which actually affect the user experience. Any input is appreciated, thank you in advance.

Upvotes: 1

Views: 882

Answers (1)

matt
matt

Reputation: 535140

Then, I double tap the home button once more and quit my app (not the app being currently used) and Xcode treats this as a crash

It is a crash. You have killed the app dead. That what the SIGKILL is telling you. This is normal.

Upvotes: 6

Related Questions