Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BSXPCMessage received error for message: Connection interrupted

UPDATE: Reference #19285042 and submit bug reports to apple

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

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 
like image 455
Aggressor Avatar asked Sep 26 '14 18:09

Aggressor


1 Answers

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

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.

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.

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.

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.

like image 52
lswank Avatar answered Oct 02 '22 20:10

lswank