I started up an Xcode project using the ‘single view’ application template and added two lines to the template-created ViewController class in viewDidLoad:
UITextView *textView = [[UITextView alloc] initWithFrame:CGRectInset(self.view.bounds, 10, 10)];
[self.view addSubview:textView];
In the simulator, I have enabled the “Chinese – simplified” ‘Stroke’ keyboard.
When I use the UITextView, switch to this keyboard, and touch the ^_^ key, the console presents the following errors:
<Error>: CGContextSaveGState: invalid context 0x0
<Error>: CGContextDrawLinearGradient: invalid context 0x0
<Error>: CGContextSetFillColorWithColor: invalid context 0x0
<Error>: CGContextFillRects: invalid context 0x0
<Error>: CGContextFillRects: invalid context 0x0
<Error>: CGContextSetFillColorWithColor: invalid context 0x0
<Error>: CGContextFillRects: invalid context 0x0
<Error>: CGContextSaveGState: invalid context 0x0
<Error>: CGContextDrawLinearGradient: invalid context 0x0
<Error>: CGContextSetFillColorWithColor: invalid context 0x0
<Error>: CGContextFillRects: invalid context 0x0
<Error>: CGContextFillRects: invalid context 0x0
<Error>: CGContextSetFillColorWithColor: invalid context 0x0
<Error>: CGContextFillRects: invalid context 0x0
Is this a bug? Should I worry about it?
I have reproduced the bug in the iOS 6.0 simulator and on my iPhone 4S running iOS 6.0.1, but it doesn’t happen in the iOS 5.0 simulator. It’s a bug in iOS 6. You should open a bug report on it at http://bugreport.apple.com.
That said, it doesn’t seem to be particularly harmful, so I wouldn’t worry about it.