BSXPCMessage收到错误消息:连接中断 [英] BSXPCMessage received error for message: Connection interrupted

查看:69
本文介绍了BSXPCMessage收到错误消息:连接中断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新:参考#19285042并将错误报告提交给苹果

非常奇怪的错误,没有在网上找到任何东西.俗话说"BSXPCMessage收到错误消息:连接中断"

Very weird error and not finding anything online. Its saying "BSXPCMessage received error for message: Connection interrupted"

我只是在做一些基本的过滤器应用程序.仅当我将UIImageView.image重新分配给另一个UIImage时,才会出现错误消息.如果仅注释掉该行,我将不会收到错误消息.因此,如果您能想到我将过滤后的图像分配给UIImageView时出现此消息的任何原因,那将是非常有用的.

I'm just doing some basic filter applications. The error message ONLY occurs if I reassign the UIImageView.image to another UIImage. If I comment out just that line I will not get the error. So if you can think of any reason why this message appears when I assign a filtered image to a UIImageView that would be incredibly helpful.

如果您可以提出导致此错误的任何原因,我将不胜感激.

If you can suggest any cause for this error I would appreciate it.

#import "FilterTestsViewController.h"

@interface FilterTestsViewController ()

@end

@implementation FilterTestsViewController

UIImage* _originalImage;
UIImage* _filterImage;
UIImageView* _uiImageView;

- (void)viewDidLoad
{
    [super viewDidLoad];
    [self initialize];
    //flip image by 180*

}

-(void)initialize
{
    _originalImage = [UIImage imageNamed:@"ja.jpg"]; //creates image from file, this will result in a nil CIImage but a valid CGImage;
    [self createFilterImage];
    _uiImageView = [[UIImageView alloc] initWithImage:_filterImage]; //creates a UIImageView with the UIImage
    [self.view addSubview:_uiImageView]; //adds the UIImageView to view;
}

-(void)createFilterImage
{
    NSString* filterName = @"CIFalseColor";
    CIImage* ciImage = [CIImage imageWithCGImage:_originalImage.CGImage];
    CIFilter* filter = [CIFilter filterWithName:filterName keysAndValues:kCIInputImageKey,ciImage, nil];
    _filterImage = [UIImage imageWithCIImage:[filter outputImage]];
}

@end

推荐答案

您收到的消息归因于iOS 8中的CIFilter错误.

The message you are getting is due to a CIFilter bug in iOS 8.

XPC服务旨在减少崩溃通过隔离不稳定的组件(例如过滤器和插件).通常这不是致命的,通过启动重新启动服务可以恢复连接.由于这不是一项长期运行的服务,而只是一项操作,因此很可能实际上并未应用您的图像过滤器.

XPC Services are meant to reduce crashes by isolating less stable components such as filters and plugins. This is usually not fatal and the connection will be restored by launchd restarting the service. Since this is not a long running service, but simply an operation, chances are that your image filter is not actually being applied.

这很大程度上是iOS 8中的一个错误,您应该提交一个雷达(错误报告),让苹果知道iOS 8的另一个错误.

This is very much a bug in iOS 8, and you should file a Radar (bug report) to let Apple know that (yet another piece of) iOS 8 has a bug.

如果要执行此操作,则应安装快速雷达,并跟踪雷达编号,并针对同一问题回答有关Stack Overflow的许多其他类似问题.鼓励其他人参考您的原始问题提交一份重复的Radar报告.这将使该错误在Apple引起更多关注.

If you are going to do that, you should install Quick Radar, keep track of the Radar number, and reply to the many other similar questions on Stack Overflow with the same issue. Encourage other people to file a duplicate Radar report referencing your original issue. That will give the bug more attention at Apple.

苹果真的赶了这个.如果您可以使另一个CIFilter子类执行以下操作,则先前提到的解决方法很好你要.否则,您只需要修改图像,保存其NSData表示形式或以其他方式将其从CIImage工作流程中删除即可.

Apple really rushed this one out. The previously mentioned workaround is fine if you can make a different CIFilter subclass do what you want. Otherwise, you will just have to tinker around with copying the image, saving its NSData representation, or otherwise removing it from the CIImage workflow in some other way.

这篇关于BSXPCMessage收到错误消息:连接中断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆