Memory leak leads to crash when Safari Web Inspector attached to UIWebView
| Originator: | michael.melanson | ||
| Number: | rdar://15232050 | Date Originated: | 15-Oct-2013 |
| Status: | Insufficient information | Resolved: | |
| Product: | iOS / Safari | Product Version: | |
| Classification: | Reproducible: |
Summary: When Safari's remote Web Inspector is connected to a UIWebView on an iOS device, it causes the UIWebView to retain memory when the web view repeatedly requests the same resource. Eventually, the available memory is exhausted and the application crashes. Steps to Reproduce: 1. Open a page in a UIWebView which repeatedly requests an image (image/jpeg) resource. The image may be uncacheable (Cache-Control: no-cache, no-store, must-revalidate; Pragma: no-cache; Expires: 0). 2. Attach Instruments to the application with an Allocations instrument. 3. Attach Safari's remote Inspector to the UIWebView. 4. Wait. Expected Results: Memory usage remains flat over time. No crash is observed. Actual Results: After step 2, memory usage is flat. After step 3, it begins to increase in a sawtooth pattern. Eventually, several low memory warnings are issued then the application crashes. Version: iOS 7.0.2; Safari 6.0.5; Instruments 5.0 (51166). Also reproducible in iOS Simulator 7.0 (463.9.4). Notes: Closing the Safari web inspector window releases the extra memory. Configuration: UIWebView must be configured to allow the remote debugger (developer extras).
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!
Apple requested a crash log on 17-Oct-2014. Not sure why...
I haven't gotten around to producing one for them yet.