lionheart / openradar-mirror

A mirror of radars pulled from http://openradar.me/.
246 stars 17 forks source link

34788843: Serious bug in iOS 11 - notification causes app to crash #18546

Open openradar-mirror opened 6 years ago

openradar-mirror commented 6 years ago

Description

Area: UserNotifications Framework

Summary: Showing a notification and then putting the app in the background causes the app to crash. An assertion with the name "will present notification" forces the OS to kill the app.

Steps to Reproduce:

  1. Install the test project TestCrashInBackground via Xcode on an iPhone running iOS 11.1 beta. The test project is attached to this bug report (ios-test-crash-in-background.zip).
  2. Disconnect the phone from the computer.
  3. Press once on the text "Schedule notification" in the TestCrashInBackground app.
  4. Notification appears.
  5. Click on the home button (app is now in background).
  6. Lock device.
  7. Wait 3 minutes.
  8. Connect the iPhone to the computer again.
  9. In Xcode, go to Window->Devices And Simulators and press on View Device Logs.
  10. There is now a crash file for the app TestCrashInBackground.

Expected Results: A notification should not cause the app to crash!

Actual Results: The app has crashed and the following info is available in the crash log: Exception Type: EXC_CRASH (SIGKILL) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: Namespace , Code 0x8badf00d Triggered by Thread: 0

Filtered syslog: None found

Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 libsystem_kernel.dylib 0x00000001853c4bc4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x00000001853c4a3c mach_msg + 72 2 CoreFoundation 0x0000000185875c4c CFRunLoopServiceMachPort + 196 3 CoreFoundation 0x0000000185873818 CFRunLoopRun + 1424 4 CoreFoundation 0x0000000185793e78 CFRunLoopRunSpecific + 436 5 GraphicsServices 0x0000000187628f84 GSEventRunModal + 100 6 UIKit 0x000000018f5360bc UIApplicationMain + 208 7 TestCrashInBackground 0x0000000100e8dbac 0x100e88000 + 23468 8 libdyld.dylib 0x00000001852b656c start + 4

In system_logs.logarchive (from the sysdiagnose) I can see that an assertion with the name "will present notification" is added: default 2017-10-03 14:32:16.280562 +0200 assertiond [SpringBoard:53] Attempting to acquire assertion for TestCrashInBack:507: <BKProcessAssertion: 0x101235c90; "will present notification" (notificationAction:30s); id:…E1D79D51D1D9> default 2017-10-03 14:32:16.281283 +0200 assertiond [TestCrashInBack:507] Add assertion: <BKProcessAssertion: 0x101235c90; id: 53-96A5F4EA-4C42-4675-97E4-E1D79D51D1D9; name: "will present notification"; state: active; reason: notificationAction; duration: 30.0s> { owner = <BSProcessHandle: 0x10110a810; SpringBoard:53; valid: YES>; flags = preventSuspend, preventThrottleDownUI, preventIdleSleep, preventSuspendOnSleep; }

That assertion is never removed. And eventually the app is killed: default 2017-10-03 14:33:00.436085 +0200 assertiond [TestCrashInBack:507] Forcing crash report with description: TestCrashInBack:507 has active assertions beyond permitted time: (owner: SpringBoard:53)

Version/Build: iOS 11.1 beta (15B5066f)

Configuration: Xcode Version 9.1 beta (9B37)

Comment to open radar readers: not sure how to attach a test project when creating a new open radar issue.

- Product Version: iOS 11.1 beta Created: 2017-10-03T14:01:16.541730 Originated: 2017-10-06T00:00:00 Open Radar Link: http://www.openradar.me/34788843

openradar-mirror commented 6 years ago

Modified: 2017-10-04T10:17:33.909670

openradar-mirror commented 6 years ago

Modified: 2017-10-04T10:17:33.909670

openradar-mirror commented 6 years ago

Modified: 2017-10-04T10:17:33.909670

openradar-mirror commented 6 years ago

Modified: 2017-10-04T10:17:33.909670

openradar-mirror commented 6 years ago

Modified: 2017-10-04T10:17:33.909670

openradar-mirror commented 6 years ago

Modified: 2017-10-04T10:17:33.909670

openradar-mirror commented 6 years ago

Modified: 2017-10-06T07:27:36.234300

openradar-mirror commented 6 years ago

Modified: 2017-10-06T07:27:36.234300

openradar-mirror commented 6 years ago

Modified: 2017-10-06T07:27:36.234300

openradar-mirror commented 6 years ago

Modified: 2017-10-06T07:27:36.234300

openradar-mirror commented 6 years ago

Modified: 2017-10-06T07:27:36.234300

openradar-mirror commented 6 years ago

Modified: 2017-10-06T07:27:36.234300

openradar-mirror commented 6 years ago

Modified: 2017-10-06T07:27:36.234300

openradar-mirror commented 6 years ago

Modified: 2017-10-06T07:27:36.234300

openradar-mirror commented 6 years ago

Modified: 2017-10-06T07:27:36.234300

openradar-mirror commented 6 years ago

Modified: 2017-10-06T07:27:36.234300