Error Message in Debug Area

With every playground that runs in Xcode 7.0 beta 5, the following three errors display in the debug area:

Aug 6 13:11:50 Tour1[17353] <Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

Aug 6 13:11:50 Tour1[17353] <Error>: CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

Aug 6 13:11:50 Tour1[17353] <Error>: CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.


How do I fix this? How do I set the environmental variables and what do I set them to?

Replies

Xcode 7.0.1 (7A1001)

any news?

someone has tested with Xcode 7.0.1 Beta 3 (7B85)?

Hi,

7.0.1 Beta 3 (7B85) also failed.

I tested today with Xcode 7.0.1 Beta 3 (7B85), but these errors are still being launched.

Luckily this finally appears to be resolved in Xcode 7.1, at least for me.

Actually, it wasn't Xcode 7.1, but rather iOS 9.1 that seems to have fixed the problem.


From Xcode 7.1, pushing to iOS 9.1 has no errors, but pushing to 9.0 does show the errors.

Hey Guys, I got a fix for this issue


Go to your app-info.plist. And add


<key>NSAppTransportSecurity</key>

<dict>

<key>NSAllowsArbitraryLoads</key>

<true/>

</dict>

Hi,


on 10/29/2015 Apple sent me an email stating that he had already solved this bug.


Fortunately the error was not with my project. Unfortunately Apple took one month to recognize and resolve the issue.

I'm also facing that problem. I am Using ios 9.1 and XCODE 7.2 Beta.


Can you please tell me , how to we file the bug report and what is that number...

I'm also facing that problem. I am Using ios 9.1 and XCODE 7.2 Beta.


Can you please tell me , how to we file the bug report and what is that number...how to make that number..


can you tell me step by step process

Xcode Version 7.2 (7C68) - problem still occurs.

Xcode 7.2 still exists

<Error>: CGContextRestoreGState: invalid context 0x0. Backtrace:

<-[CUSFlashLabel drawRect:]+912>

<<redacted>+368>

<<redacted>+260>

<<redacted>+2364>

<<redacted>+1224>

<<redacted>+228>

<<redacted>+44>

<<redacted>+252>

<<redacted>+512>

<<redacted>+80>

<<redacted>+32>

<<redacted>+372>

<<redacted>+928>

<CFRunLoopRunSpecific+384>

<GSEventRunModal+180>

<UIApplicationMain+204>

<main+124>

Is also happening in my keyboard extension

I just ran into this issue as well. Using Xcode 7.2.1 (7C1002)

Hi,


Xcode Version 7.3 (7D175) - problem still occurs.

Any solution ?


I got problems in xcode 8.0 beta.