UIWebView causes "Serious" Core Graphics wen playing video

Originator:jnjosh
Number:rdar://15962845 Date Originated:1/31/2014
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 7
Classification:Other Bug Reproducible:Sometimes
 
Summary:
When displaying a UIWebView on a non-retina device running iOS 7 several Core Graphics logs are occasionally displayed in the log when playing an HTML 5 video / YouTube video. They are benign but the wording implies they are serious and there are like 25 of them logged out.

Example of one of the 25:

Jan 31 18:16:52 Joshs-iPad WebViewTest[2868] <Error>: CGContextSaveGState: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context  and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.

Steps to Reproduce:
1. Create a single view project
2. Add web view to nib
3. Direct web view to a URL containing an HTML 5 or YouTube Video
4. Run
5. Tap play on the video and observe the log.

This doesn't happen every time, but will occasionally spit out the errors to the console.

Sample project is attached.

Expected Results:
Video plays properly without displaying Core Graphics errors in the console.

Actual Results:
Several errors are displayed like this: 

Jan 31 18:16:52 Joshs-iPad WebViewTest[2868] <Error>: CGContextSaveGState: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context  and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.


Version:
iOS 7.0.4 running in Xcode Version 5.0.2 (5A3005)

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!