Jetsam killing UIWebView app with no warning
| Originator: | garvankeeley | ||
| Number: | rdar://24908457 | Date Originated: | mar 1,2016 |
| Status: | Open | Resolved: | |
| Product: | iOS | Product Version: | 9.2.1 |
| Classification: | Crash | Reproducible: | Always |
Summary:
Opening the site https://brendeneich.com in a UIWebView causes the app to be killed by jetsam. No memory warnings are sent to the app.
1) Jetsam is killing the app with no warning
2) Jetsam shouldn't be killing the app at all, the memory pressure isn't high enough
Steps to Reproduce:
Create a UIWebView-based app, and on a non-simulator, open brendeneich.com. The app will be killed with no warning by Jetsam.
Or, download Brave Browser, Dolphin or Puffin Browsers, they are all UIWebView browsers.
Expected Results:
1) Don't kill, there isn't enough memory pressure
2) If killed, send a warning so we can stop loading the web view
Actual Results:
App killed by Jetsam.
(NOTE: not reproducible in simulator
Version:
iOS 9.2.1
Notes:
Attempted to monitor memory pressure, but no memory pressure warnings happen:
dispatch_source_t source = dispatch_source_create(DISPATCH_SOURCE_TYPE_MEMORYPRESSURE, 0, DISPATCH_MEMORYPRESSURE_WARN|DISPATCH_MEMORYPRESSURE_CRITICAL, dispatch_get_main_queue());
dispatch_source_set_event_handler(source, ^{
dispatch_source_memorypressure_flags_t pressureLevel = dispatch_source_get_data(source);
[NSNotificationCenter.defaultCenter postNotificationName:UIApplicationDidReceiveMemoryWarningNotification object:nil userInfo:@{@"pressure": @(pressureLevel)}];
});
dispatch_resume(source);
Configuration:
iPhone 5c, iPad Air
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!