gpt4 book ai didi

xcode - CGContextSaveGState : invalid context 0x0 Error only on device

转载 作者:行者123 更新时间:2023-12-03 10:19:58 33 4
gpt4 key购买 nike

更新:我在 Swift 2.0 中使用 XCode 7 Beta

当我尝试在 iPhone 上运行我的应用程序时,出现以下 3 个错误:

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

当我启用 CG_CONTEXT_SHOW_BACKTRACE 变量时,我得到了这个:
Backtrace:
<<redacted>+40>
<<redacted>+432>
<<redacted>+144>
<<redacted>+172>
<<redacted>+332>
<<redacted>+112>
<<redacted>+820>
<<redacted>+688>
<<redacted>+356>
<<redacted>+80>
<<redacted>+808>
<<redacted>+344>
<<redacted>+420>
<<redacted>+104>
<<redacted>+284>
<<redacted>+556>
<<redacted>+504>
<<redacted>+1792>
<<redacted>+220>
<<redacted>+284>
<<redacted>+920>
<<redacted>+168>
<<redacted>+184>
<<redacted>+56>
<<redacted>+24>
<<redacted>+540>
<<redacted>+724>
<CFRunLoopRunSpecific+384>
<<redacted>+460>
<UIApplicationMain+204>
<main+164>

我不确定如何解释这一点,我没有在我的代码中使用任何 CoreGraphics 内容,其他类似问题的答案对我不起作用。我知道在没有代码的情况下很难帮助调试,但我无法弄清楚哪些代码与此相关,因此如果有人有想法,我可以发布更多代码。

最佳答案

从我的实验来看,这似乎是由于定义了 UIViewControllerBasedStatusBarAppearanceInfo.plist .

它发生在 iOS 9(测试版和 GM)上,但不在 8.4 上。

关于xcode - CGContextSaveGState : invalid context 0x0 Error only on device,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32236204/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com