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
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…