> On 23 Jun 2016, at 21:39, Ken Thomases <k...@codeweavers.com> wrote: > > O > > Are there any logs generated from the above call (other than your app's crash > log)? Browse around within Console.app's log list to see. Had a poke around but nothing significant that I can see. > >> CIFilter *colorFilter = [CIFilter filterWithName:@"CIColorControls"]; >> [colorFilter setDefaults]; >> [colorFilter setValue:image forKey:kCIInputImageKey]; >> [colorFilter setValue:[NSNumber numberWithFloat:saturationValue] >> forKey:kCIInputSaturationKey]; >> [colorFilter setValue:[NSNumber numberWithFloat:brightnessValue] >> forKey:kCIInputBrightnessKey]; >> [colorFilter setValue:[NSNumber numberWithFloat:contrastValue] >> forKey:kCIInputContrastKey]; > > Any chance these values are out of valid range? No. Everything looks sane. The range of arguments passed into the method is very small so there isn’t much variation. > >> >> CIImage *filterImage = [colorFilter valueForKey:kCIOutputImageKey]; >> >> [filterImage drawAtPoint:NSZeroPoint // << this is the call site that >> eventually aborts >> fromRect:bounds >> operation:NSCompositeCopy >> fraction:alphaValue]; > > What does it mean to use a potentially non-1.0 fraction for a copy to an > as-yet-uninitialized image? No idea if that might contribute to the problem. > Maybe clearing the image to some background color first would help. > > Also, have you considered using -[CIContext createCGImage:fromRect:] to > create the image instead of drawing into a focus-locked NSImage? To get an > NSImage from the CGImage, you can use [[NSImage alloc] initWithCGImage:… > size:NSZeroSize].
Thanks for the suggestions I will give them a go. J _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com