Skip to content

App crashes when the filter is applied to image that is not taken with iPhone #599

Closed
vburojevic opened this Issue Oct 31, 2012 · 11 comments

5 participants

@vburojevic

Everything works fine if I choose photo from iPhone gallery or take a new photo and apply filter to it, but when I load an image (from web in example) into the app, and try to apply filter to it I get this:

Oct 31 15:15:41 unknown-e4-ce-8f-35-2d-a4.lan CameraFX[16037] : CGBitmapContextCreate: unsupported parameter combination: 8 integer bits/component; 32 bits/pixel; 3-component color space; kCGImageAlphaPremultipliedFirst; 4294929408 bytes/row.
Oct 31 15:15:41 unknown-e4-ce-8f-35-2d-a4.lan CameraFX[16037] : CGContextDrawImage: invalid context 0x0
2012-10-31 15:15:41.047 CameraFX[16037:530b] *** Assertion failure in -[GPUImageToonFilter createFilterFBOofSize:], /Users/vedranburojevic/Desktop/Freelance/Freelancer/dcweb1/CameraFX/Submodules/GPUImage/framework/Source/GPUImageFilter.m:356
2012-10-31 15:15:41.048 CameraFX[16037:530b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Incomplete filter FBO: 36054'
*** First throw call stack:
(0xdae012 0x2323e7e 0xdade78 0x1fe2f35 0x1e721e 0x1f3054 0x1e6782 0x1e75de 0x1e78dd 0x1e9933 0x1f7a7c 0x2e4853f 0x2e5a014 0x2e4a418 0x2e4a2a6 0x2e4b280 0x2e4b450 0x96439e12 0x96421cca)
libc++abi.dylib: terminate called throwing an exception

@BradLarson
Owner

Can you provide a link to an image that triggers this? The problem would seem to be in the CGBitmapContextCreate() line within GPUImagePicture.m, but I'd like to see what conditions would cause a problem for that.

@vburojevic

It crashes on every image downloaded on simulator. Is it maybe a simulator issue? Does GPUImage work on simulator?

@BradLarson
Owner

Yes, it does work on the Simulator. Again, a link to a sample image that exhibits this behavior would be of great help.

@gwangpa
gwangpa commented Nov 1, 2012

I have same problem too. My guess is not depends on image.

I tested with sample projects image that file name is "Lambeau.jpg".

So I think this problem is not image.

I created my crashed project on my repository. https://github.com/gwangpa/GPUImageTest

I'm using XCode 4.5 iOS SDK 6.0.

EDIT

Crash causes on simulator only. It works for my device iPhone 3GS.
And "SimpleImageFilter" works on simulator and device.
But I'm not sure what are different from my project and SimpleImageFilter.

@BradLarson
Owner

OK, I figured it out. I was reading a value from the OpenGL ES context before that context had been properly set up. This should be fixed in the code I just committed.

@vburojevic

Thank you Brad!

@gwangpa
gwangpa commented Nov 2, 2012

Great! :+1: It works. Thank you Brad :)

@BradLarson BradLarson closed this Nov 2, 2012
@kwent
kwent commented Dec 3, 2012

Same issue with last version of GPUImage only running with the simulator. On devices, no crash ...


CGBitmapContextCreate: unsupported parameter combination: 8 integer bits/component; 32 bits/pixel; 3-component color space; kCGImageAlphaLast; 480 bytes/row.
Dec  3 14:46:40 Toto-Laptop.local project[5512] <Error>: CGContextConcatCTM: invalid context 0x0
Dec  3 14:46:40 Toto-Laptop.local project[5512] <Error>: CGContextSetInterpolationQuality: invalid context 0x0
Dec  3 14:46:40 Toto-Laptop.local project[5512] <Error>: CGContextDrawImage: invalid context 0x0
Dec  3 14:46:40 Toto-Laptop.local project[5512] <Error>: CGBitmapContextCreateImage: invalid context 0x0
Dec  3 14:46:40 Toto-Laptop.local project[5512] <Error>: CGContextDrawImage: invalid context 0x0
2012-12-03 14:46:40.320 project[5512:791f] *** Assertion failure in -[GPUImageRGBFilter createFilterFBOofSize:], /Volumes/HDD/Dropbox/Projects/project/IOS/last/Libraries/GPUImage/GPUImageFilter.m:356
2012-12-03 14:46:40.323 project[5512:791f] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Incomplete filter FBO: 36054

Anybody ?

@BradLarson
Owner

@kwent - Stop that right now. I get email notifications for each post on here, and anything that tries to "bump" an issue contributes nothing of value and is just noise. These content-free updates are incredibly annoying and make me less likely to want to work on your issue.

The SimpleImageFilter example application runs just fine in the Simulator, so if you could provide code or an image that triggers this crash within that sample, I might be able to see what's wrong.

@sumonohemod

I have faced a same type of problem, but it was my mistake. The filtered image was missing in my resource directory! If anyone face the same problem, please check your image is there or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.