GPUImageToneCurveFilter crashes
GPUImageToneCurveFilter crashes. The following fix solved the problem:
NSMutableArray *preparedSplinePoints = [[NSMutableArray arrayWithCapacity:[splinePoints count]] retain];
That won't even compile, because this is an ARC-enabled project. You can't call -retain.
I see. I am using GPUImage in a non-ARC project and I'm including the GPUImage project inside mine, per instructions. Yet without the change the array is prematurely released in my setting. And oddly the fix does compile for me and solve the problem. I'll explore further.
The whole framework is dependent on being built using ARC, so there's no way the compiler should allow -retain there. If it is, then that file (among others) is not being built correctly, and a crash here will be the least of your worries because the whole framework will leak memory like a sieve. If included as a sub-project, this should always build using the project defaults, which has ARC enabled, unless you're using a version of Xcode that lacks support for ARC.
Thanks. I managed to fixed it now. I had the project and the source both inside my project. Apologies for the false bug report. The mistake was completely on my end.
Better to find that out now than have your application start failing in very weird ways. I've done this in the past, and things went south in a hurry.