Investigating Error at CVOpenGLESTextureCacheCreateTextureFromImage -6683
While doing batch processing (one source image, many different filters) I am getting the Error -6683 in GPUImageFilter using fast texture upload. In approx. 1 out of 100 cases, the method CVOpenGLESTextureCacheCreateTextureFromImage returns an Error (-6683) and exits due to the NSAssert.
This occurs on iPhone 4, 4S and 5. iOS 6.
I am about to investigate why this happens and pondering how to implement a proper error handling. I would appreciate, if anybody can give some hints or information on the nature of this error. What are possible reasons that lead to the error when calling CVOpenGLESTextureCacheCreateTextureFromImage?
Maybe there are too many textures in use already? Maybe textures are not deleted properly under certain circumstances? (Just speculating)
I am thankful for any tips.
I believe this is the same issue as #427. Not sure what the source of it is.
Hi JensDee - did you succeed nailing this issue?
Thanks
No, not yet. However, I was able to work around the issue. I haven't commented on this issue as I haven't found the exact reason for the error, nor a real solution.
In my case, it seems to be related to TwoInputFilters and the timing of (de)allocations. I changed my implementation and made sure everything gets deallocated right after I'm done with the processing. Two GPUImagePicture objects were ivars of a NSOperation. These pictures got deallocated at some point when the Operation got deallocated. Now I switched to local vars which cause the GPUImagePicture objects to be deallocated when leaving the start method of the operation. The error does not occur anymore (on dual core devices - haven't tested on iPhone 4 yet).
In which scenario are you getting the error?
Thanks JensDee
I use one input from the camera and another one either from an image or a movie. The 6883 error happens sometimes when I'm switching between movie and an image.
Another problem that I have is flickering while I'm on a movie blending filter, I wonder if these issues are related.
Interesting. One thing I can point out is: Make sure blending images and filters are released properly (and immediately) when you don't need them anymore.
Re flickering: Be sure to call processImage on all source images in the correct order. Maybe that helps.