本文介绍了CGContext无效上下文0x0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

:CGContextSetStrokeColorWithColor:无效的上下文0x0。这个
是一个严重的错误。此应用程序或它使用的库使用
无效上下文,从而导致系统稳定性和可靠性整体降低
。此通知是
礼貌:请解决此问题。它将成为
即将到来的更新中的致命错误。

: CGContextSetStrokeColorWithColor: 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.

并重复类似的错误:


  • CGContextSaveGState

  • CGContextSetFlatness

  • CGContextAddPath

  • CGContextDrawPath

  • CGContextRestoreGState

  • CGContextSaveGState

  • CGContextSetFlatness

  • CGContextAddPath

  • CGContextDrawPath

  • CGContextRestoreGState

  • CGContextSetFillColorWithColor

  • CGContextSetStrokeColorWithColor

  • CGContextSetFillColorWithColor

  • CGContextSetStrokeColorWithColor

  • CGContextGetBlendMode

  • CGContextSetBlendMode

  • 以及更多......

  • CGContextSaveGState
  • CGContextSetFlatness
  • CGContextAddPath
  • CGContextDrawPath
  • CGContextRestoreGState
  • CGContextSaveGState
  • CGContextSetFlatness
  • CGContextAddPath
  • CGContextDrawPath
  • CGContextRestoreGState
  • CGContextSetFillColorWithColor
  • CGContextSetStrokeColorWithColor
  • CGContextSetFillColorWithColor
  • CGContextSetStrokeColorWithColor
  • CGContextGetBlendMode
  • CGContextSetBlendMode
  • and more...

在我的应用程序中,我不使用任何CGContext内容。我只有 UITextView UIButton UILabel 。添加的代码不多。只需设置 UITextView 的内容:

In my App, I do not use any CGContext stuff. I just have a UITextView, UIButton and UILabel. Not much codes added yet. Just set the content of UITextView by:

[self.text_view setText:@"123"];

如何解决错误?

我正在使用Xcode 5.0(版本5A1413),iOS 7模拟器(64位Retina 4),Mac OS X 10.8.5

I'm using Xcode 5.0 (build 5A1413), iOS 7 Simulator (64-bit Retina 4"), Mac OS X 10.8.5

推荐答案

试试这个:在xcode中添加符号断点到CGPostError。(添加符号断点,并添加到符号字段类型CGPostError)

Try this: In xcode add symbolic breakpoint to CGPostError. (Add symbolic breakpoint, and to Symbol field type CGPostError)

发生错误时,调试器将停止代码执行,您可以检查方法调用堆栈并检查参数。

When error happen, debugger will stop code executions and you can check stack of methods calls and check parameters.

这篇关于CGContext无效上下文0x0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 12:31