相关疑难解决方法(0)

找不到CFBundle CertUIFramework.axbundle的可执行文件

刚刚更新到Xcode 5,这是它为我的所有应用程序投入记录器的第一个错误.似乎无法理解为什么会这样.

    2013-09-19 10:46:54.341 MyApp[1156:a0b] Cannot find executable 
for CFBundle 0x8a7c7a0 </Applications/Xcode.app/Contents/Developer/Platforms/
iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/
System/Library/AccessibilityBundles/CertUIFramework.axbundle> (not loaded)
Run Code Online (Sandbox Code Playgroud)

编辑(11-11-2013): 一旦我等待一个可靠的工作解决方案接受并关闭,给所有人阅读.在您重新打开项目之前,最高投票答案才有效.

编辑(30-09-2014): 我可以看到自XCode 6发布以来已经对它进行了排序!最后

xcode xcode5 xcode6

114
推荐指数
5
解决办法
5万
查看次数

CGContext无效上下文0x0

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

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

和重复的类似错误:

  • CGContextSaveGState
  • CGContextSetFlatness
  • CGContextAddPath
  • CGContextDrawPath
  • CGContextRestoreGState
  • CGContextSaveGState
  • CGContextSetFlatness
  • CGContextAddPath
  • CGContextDrawPath
  • CGContextRestoreGState
  • CGContextSetFillColorWithColor
  • CGContextSetStrokeColorWithColor
  • CGContextSetFillColorWithColor
  • CGContextSetStrokeColorWithColor
  • CGContextGetBlendMode
  • CGContextSetBlendMode
  • 和更多...

在我的应用程序中,我不使用任何CGContext的东西.我只是一个UITextView,UIButton而且UILabel.添加的代码不多.只需设置以下内容UITextView:

[self.text_view setText:@"123"];
Run Code Online (Sandbox Code Playgroud)

如何解决错误?

我正在使用Xcode 5.0(build 5A1413),iOS 7 Simulator(64位Retina 4"),Mac OS X 10.8.5

objective-c ios7

23
推荐指数
1
解决办法
1万
查看次数

UISlider setMaximumTrackTintColor

我正在尝试在UISlider上动态配置轨道颜色.

这行代码非常适合设置滑块轨道的低侧.

[self.sliderBar setMinimumTrackTintColor:[UIColor redColor]];

当尝试对滑块轨道的高端做同样的事情时,这行代码会向调试日志报告3个致命错误.

[self.sliderBar setMaximumTrackTintColor:[UIColor redColor]];

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

<Error>: clip: invalid context 0x0. This is a serious error. This application, or a library it uses, …
Run Code Online (Sandbox Code Playgroud)

objective-c uislider ios ios7

13
推荐指数
2
解决办法
1万
查看次数

使用UIBezierPath和CAShapeLayer时出现"无效上下文0x0"

我的困境与这个SO线程中描述的困境非常相似.我阅读了该主题的每个答案,但无法找到解决我问题的任何答案.我已经将我的问题缩小到下面函数内的4行.4行中的每一行都输出了几行错误,我在下面列出了所有错误(我删除了重复项).

我试过移动[path closePath];到这4行以下,但它没有改变任何东西.我还在第一行之前设置了一个断点,并逐行手动完成了这个功能,而这只是造成严重破坏的4行.

对于这个问题似乎是一个趋势,一切都完全按照它应该呈现,但它充斥着控制台与这些类型的消息.

任何帮助将不胜感激,我很乐意提供更多信息和更新.


功能:

-(CAShapeLayer *)lineBetweenPoint:(CGPoint)start andPoint:(CGPoint)end {

    //Draw the first circle
    UIBezierPath *path = [UIBezierPath bezierPathWithArcCenter:start radius:kLineEndRadius startAngle:0 endAngle:DEGREES_TO_RADIANS(360) clockwise:TRUE];

    //Add the line
    [path moveToPoint:start];
    [path addLineToPoint:end];
    [path moveToPoint:end];

    //Draw the second circle
    [path addArcWithCenter:end radius:kLineEndRadius startAngle:0 endAngle:DEGREES_TO_RADIANS(360) clockwise:TRUE];

    //Close the path and set the coloring
    [path closePath];

    /*The following 4 lines cause problems*/
    [[UIColor blueColor] setStroke]; /*CAUSES PROBLEM*/
    [[UIColor blueColor] setFill]; /*CAUSES PROBLEM*/
    [path stroke]; /*CAUSES PROBLEM*/
    [path fill]; /*CAUSES PROBLEM*/

    //Create …
Run Code Online (Sandbox Code Playgroud)

objective-c cashapelayer ios uibezierpath

9
推荐指数
1
解决办法
6023
查看次数

iOS错误 - CGContextRestoreGState:无效的上下文0x0

我有一个一直运行良好的phonegap应用程序,现在我在日志中收到以下消息,是否有人知道这可能是什么?

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

非常感谢!

xcode objective-c ios cordova

6
推荐指数
1
解决办法
1313
查看次数

在iOS7中使用物理键盘在UITextfield上键入时出现错误

最近我将我的Xcode升级到Xcode5 ......

当我尝试在我的应用程序的任何UITextfield(使用我的物理键盘)上写入时,有时在我的iPhone/iPad模拟器上运行我的应用程序,这个错误出现在我的Xcode5 ouptut窗口上:

<Error>: CGContextSetBlendMode: 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.
Run Code Online (Sandbox Code Playgroud)

如果我使用模拟器的键盘(屏幕),它工作正常,但出于测试目的,我宁愿在我的Mac键盘上键入以进行快速开发/测试,任何想法如何解决这个问题?

提前致谢

iphone keyboard ios

5
推荐指数
1
解决办法
4189
查看次数

如何使用Implicitly Unwrapped Optionals?

我正在将NSView移植到Swift,我需要使用Quartz CGContextAddPath.

import Cocoa

class MYView: NSView {

    init(frame: NSRect) {
        super.init(frame: frame)
    }

    override func drawRect(dirtyRect: NSRect) {
        super.drawRect(dirtyRect)


        NSColor .redColor() .set()
        NSRectFill(self.bounds)
        var p :CGMutablePathRef = CGPathCreateMutable()
        var ctx =  NSGraphicsContext.currentContext().graphicsPort()
        CGContextAddPath(ctx, p) // compiler rejects this line

    }

}
Run Code Online (Sandbox Code Playgroud)

你怎么理解这个错误信息?

Cannot convert the expression's type 'Void' to type 'CGContext!'
Run Code Online (Sandbox Code Playgroud)

CGContextAddPath的Swift签名是:

func CGContextAddPath(context: CGContext!, path: CGPath!)
Run Code Online (Sandbox Code Playgroud)

我的错误是什么?

我用这个时:

let context = UnsafePointer<CGContext>(ctx).memory
Run Code Online (Sandbox Code Playgroud)

我现在有一个运行时错误:

Jun 3 15:57:13 xxx.x SwiftTest[57092] <Error>: CGContextAddPath: invalid context 0x7fff73bd0060. This is a serious error. …

swift

5
推荐指数
1
解决办法
1788
查看次数

UIColor SetFill不起作用

在这段代码中

for (int i=0;i<3;i++) {
    CGContextAddLineToPoint(context, self.xShift+15+self.rectLen*self.width+self.rectLen*(i+1), self.yShift+self.rectLen*10);
    CGContextAddLineToPoint(context, self.xShift+15+self.rectLen*self.width+self.rectLen*(i+1), self.yShift+self.rectLen*10+self.rectLen);
    CGContextAddLineToPoint(context, self.xShift+15+self.rectLen*self.width+self.rectLen*i, self.yShift+self.rectLen*10+self.rectLen);
    CGContextAddLineToPoint(context, self.xShift+15+self.rectLen*self.width+self.rectLen*i, self.yShift+self.rectLen*10);
    CGContextMoveToPoint(context, self.xShift+15+self.rectLen*self.width+self.rectLen*i, self.yShift+self.rectLen*10);
}
    CGContextAddLineToPoint(context, self.xShift+15+self.rectLen*self.width+self.rectLen*4, self.yShift+self.rectLen*10);
    CGContextAddLineToPoint(context, self.xShift+15+self.rectLen*self.width+self.rectLen*4, self.yShift+self.rectLen*10+self.rectLen);
    CGContextAddLineToPoint(context, self.xShift+15+self.rectLen*self.width+self.rectLen*3, self.yShift+self.rectLen*10+self.rectLen);
    CGContextAddLineToPoint(context, self.xShift+15+self.rectLen*self.width+self.rectLen*3, self.yShift+self.rectLen*10);
    [[UIColor cyanColor] setFill];
    [[UIColor blackColor] setStroke];
    CGContextSetLineWidth(context, 1);
    CGContextDrawPath(context, kCGPathStroke);
Run Code Online (Sandbox Code Playgroud)

使用setFill方法的行不起作用.这可能是什么问题?代码位于drawRect:方法中

core-graphics objective-c uicolor ios

1
推荐指数
1
解决办法
2844
查看次数