我已经阅读了尽可能多的关于这个可怕问题的搜索结果,不幸的是,每个搜索结果似乎都专注于特定的函数调用。
我的问题是我从多个函数中得到相同的错误,我猜这是从我使用的函数中回调的。
更糟糕的是,实际代码位于自定义私有(private)框架中,该框架正在导入另一个项目中,因此调试不是那么简单?
谁能指出我正确的方向?我有一种感觉,我错误地调用了某些方法或使用了错误的上下文,但此时 xcode 的输出并不是很有帮助。
: CGContextSetFillColorWithColor: 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.
: 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: 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.
: CGContextSetFlatness: 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.
: CGContextAddPath: 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.
: CGContextDrawPath: 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.
: CGContextRestoreGState: 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.
: CGContextGetBlendMode: 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.
当呈现自定义 View 或其继承的类之一时,可能会发生这些错误。此时它们会产生多次,直到键盘不提供任何输入。触摸事件仍在注册中,但系统速度变慢,最终可能导致未分配对象错误。
编辑#1:我确实可以访问正在导入的框架,但我没有在导致问题的类中看到任何奇怪的东西。
编辑 #2: 我刚刚收到一封电子邮件,说 iOS 7.1 已经发布给开发者。我很想知道这是否会消失,或者变得更糟,或者可以解决。
最佳答案
如果您想知道是什么代码导致了这些日志,您可以 add a symbolic breakpoint在 CGPostError
上。
关于objective-c - iOS 7.0 下的无效上下文 0x0 和系统降级,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19599266/