gpt4 book ai didi

ios - BSXPCMessage 收到消息 : Connection interrupted 的错误

转载 作者:IT老高 更新时间:2023-10-28 11:38:45 27 4
gpt4 key购买 nike

更新:引用 #19285042 并向苹果提交错误报告

非常奇怪的错误,在网上找不到任何东西。它说“BSXPCMessage 收到消息错误:连接中断”

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

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

#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 错误造成的。

XPC 服务适用于 reduce crashes by isolating less stable components例如过滤器和插件。这通常不是致命的,并且连接将通过 launchd 重新启动服务来恢复。由于这不是一项长期运行的服务,而只是一项操作,因此您的图像过滤器很可能并未实际应用。

这是 iOS 8 中的一个非常大的错误,您应该提交 Radar (错误报告)让 Apple 知道(又一个)iOS 8 存在错误。

如果你打算这样做,你应该安装 Quick Radar ,跟踪 Radar 编号,并在 Stack Overflow 上用相同的问题回复许多其他类似问题。鼓励其他人提交一份重复的 Radar 报告,以引用您的原始问题。这将使该漏洞在 Apple 得到更多关注。

苹果真的把这个赶了出来。 previously mentioned workaround如果你可以让不同的 CIFilter 子类做你想做的事,那很好。否则,您将不得不修改复制图像,保存其 NSData 表示,或以其他方式将其从 CIImage 工作流程中删除。

关于ios - BSXPCMessage 收到消息 : Connection interrupted 的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26065808/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com