BSXPCMessage 收到消息错误:连接中断

BSXPCMessage received error for message: Connection interrupted(BSXPCMessage 收到消息错误:连接中断)

本文介绍了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 服务旨在减少崩溃通过隔离不太稳定的组件,例如过滤器和插件.这通常不是致命的,并且连接将通过 launchd 重新启动服务来恢复.由于这不是一项长期运行的服务,而只是一项操作,因此您的图像过滤器很可能并未实际应用.

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 中的一个非常大的错误,您应该提交 Radar(错误报告)让 Apple 知道(又一个)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 收到消息错误:连接中断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:BSXPCMessage 收到消息错误:连接中断

基础教程推荐