GPUImage icon indicating copy to clipboard operation
GPUImage copied to clipboard

NSInternalInconsistencyException, reason: 'Error at CVPixelBufferCreate -6661'

Open valvoline opened this issue 14 years ago • 3 comments

Hi all,

The last commit introduce some bugs in the blend filters. I've tried either ColorDodge or ColorBurn in a custom FilterGroup as follow:

blendFilter = [[GPUImageColorDodgeBlendFilter alloc] init];

[self addFilter:blendFilter];

[posterizeFilter addTarget:blendFilter];
[sketchFilter addTarget:blendFilter];


self.initialFilters = [NSArray arrayWithObject:saturation];
self.terminalFilter = blendFilter;

and i received the following error at startup:

2012-06-10 16:03:32.644 SimplePhotoFilter[1067:707] FBO size: 0.000000, 0.000000
2012-06-10 16:03:32.650 SimplePhotoFilter[1067:707] *** Assertion failure in -[GPUImageColorDodgeBlendFilter createFilterFBOofSize:], /Users/valvoline/Desktop/BradLarson-GPUImage-ba70b43/framework/Source/GPUImageFilter.m:257
2012-06-10 16:03:32.655 SimplePhotoFilter[1067:707] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error at CVPixelBufferCreate -6661'
*** First throw call stack:
(0x3539588f 0x367bc259 0x35395789 0x312103a3 0x51a1 0x57e9 0x10e6d 0x639b 0x5d49 0x63cf 0x5d49 0x63cf 0x5d49 0x63cf 0x5d49 0x63cf 0x5d49 0x63cf 0xedb9 0x93b1 0x9ba9 0x313c6b2b 0x313c5e91 0x353682ad 0x352eb4a5 0x352eb36d 0x365e7439 0x323e1e7d 0x328d 0x2d28)
terminate called throwing an exception(lldb) 

valvoline avatar Jun 10 '12 14:06 valvoline

I managed to solve the problem adding the following, just after the filter initialization:

filter = [[GPUImageCustomFilter4 alloc] init];
[filter forceProcessingAtSize:CGSizeMake(640, 960)];
[filter prepareForImageCapture];

is this the right way to use the blending filters?

valvoline avatar Jun 11 '12 09:06 valvoline

A couple of weeks ago, I fixed a problem with two input filters by preventing the size of the frame from being set by the second filter. Unfortunately, that appears to have some side effects if the first input is not allowed to set the input frame size first. I'm off at WWDC, so I won't be able to fix this for a while.

BradLarson avatar Jun 11 '12 14:06 BradLarson

This should now be fixed with the new way that I synchronize the input of blend filters. You may need to remove any old targetToIgnoreForUpdates settings you had before, though.

BradLarson avatar Jul 17 '12 04:07 BradLarson