<Error>: CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

could any one please tell me how to get rid of that err on Xcode 7


<Error>: CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.


Mant thanks all.

Replies

Please check https://forums.developer.apple.com/thread/13683


The issue seems to be bound to entry

UIViewControllerBasedStatusBarAppearance

in your app's info.plist file.

If you remove it and use the UIViewController's method to set your status bar style on a VC basis.


- (UIStatusBarStyle)preferredStatusBarStyle {
    return UIStatusBarStyleLightContent;
}

Hello,

none of the above suggestions helped me.



In my info.plist I have nothing related to "UIViewControllerBasedStatusBarAppearance" and only use standard font (but I change the color of a text).



Anyone else have any suggestions?



Come to know whether DST engineers are now analyzing this issue, since even the previous version of Xcode and the iOS 8.4 was all working well?

I have this same exact problem. Happened seemingly out of nowhere, tried everything, can't fix it. I'm now reinstalling XCode7 because I couldn't think of anything else to try. My coworkers running the exact same branch do not have the issue. Its very depressing.

Ok - was just able to run the project by unchecking "debug executable". So now I'm sadly without breakpoints, but at least it runs. Also runs in release mode.