Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After scanning for some seconds with a Scan quality insufficient : 0.0, I get a "GPUImageFramebuffer unlock" Exception. #3

Closed
kikolobo opened this issue Mar 21, 2016 · 9 comments

Comments

@kikolobo
Copy link

2016-03-21 17:50:02.556 PassportScanner[9842:4849034] *** Assertion failure in -[GPUImageFramebuffer unlock], /Users/frlobo/Downloads/PassportScanner-master-2/Pods/GPUImage/framework/Source/GPUImageFramebuffer.m:269
2016-03-21 17:50:02.558 PassportScanner[9842:4849034] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Tried to overrelease a framebuffer, did you forget to call -useNextFrameForImageCapture before using -imageFromCurrentFramebuffer?'
*** First throw call stack:
(0x18382d900 0x182e9bf80 0x18382d7d0 0x1841a099c 0x100197c80 0x100197e2c 0x184ac447c 0x184ac3510 0x18370d664 0x184ac3210 0x18370d664 0x18851cc24 0x182eb5ae8 0x18371142c 0x18411741c 0x1841d6728 0x101b65bb0 0x101b6b658 0x1837e4bb0 0x1837e2a18 0x183711680 0x184c20088 0x188588d90 0x1001005e4 0x1832b28b8)
libc++abi.dylib: terminating with uncaught exception of type NSException

@evermeer
Copy link
Owner

I have done some work on this issue before. See issue #2
Apparently this is a known issue for the GPUImage library
Is the crash in your case reproducible or was it an one time instance?
I have a problem reproducing this issue.
Could you tell me what your iPhone, iOS and XCode version is?

@kikolobo
Copy link
Author

Sure.
iPhone 6S
It is intermittent error, unpredictable when it will happen.

I am also having a hard time detecting passports on paper. On screen it's easier although not super easy.

I haven't been able to scan a paper passport.

When I get success can the 7 it's confused by a 1.

I will give it more in depth tries in different lighting conditions.

Thanks for the library, I will try to contribute as much as I can.

@evermeer
Copy link
Owner

I have had very good results with an iPhone 6 (see video) but on a 5 the result was also not so optimal. The OCR library has some specific requirements for the image in order to make a good scan. It feels like i have to test different settings and use those based on the device version.

@Freedom4eva
Copy link

Way is this
On 22 Mar 2016 9:52 am, "Kiko Lobo" notifications@github.com wrote:

2016-03-21 17:50:02.556 PassportScanner[9842:4849034] *** Assertion
failure in -[GPUImageFramebuffer unlock],
/Users/frlobo/Downloads/PassportScanner-master-2/Pods/GPUImage/framework/Source/GPUImageFramebuffer.m:269
2016-03-21 17:50:02.558 PassportScanner[9842:4849034] *** Terminating app
due to uncaught exception 'NSInternalInconsistencyException', reason:
'Tried to overrelease a framebuffer, did you forget to call
-useNextFrameForImageCapture before using -imageFromCurrentFramebuffer?'
*** First throw call stack:
(0x18382d900 0x182e9bf80 0x18382d7d0 0x1841a099c 0x100197c80 0x100197e2c
0x184ac447c 0x184ac3510 0x18370d664 0x184ac3210 0x18370d664 0x18851cc24
0x182eb5ae8 0x18371142c 0x18411741c 0x1841d6728 0x101b65bb0 0x101b6b658
0x1837e4bb0 0x1837e2a18 0x183711680 0x184c20088 0x188588d90 0x1001005e4
0x1832b28b8)
libc++abi.dylib: terminating with uncaught exception of type NSException


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#3

@kikolobo
Copy link
Author

I am trying to do my scanning on an iPhone 6S. I am guessing that an approach might be to ask the user to take a picture of the passport and then have the app analyze it instead of capturing video frames. This has the advantage of better quality in the picture, and also you can filter the image in say... 10 different ways and see which one of the scans pass the success test and use those results....

I am going to try and find the time to contribute and help you with this.

@evermeer
Copy link
Owner

Now that there is a GPUImage2 library I will try to convert to that one.

@evermeer
Copy link
Owner

There is now a GPUImage2 branch where I am using the GPUImage library. The code now looks a lot cleaner (pure swift) It still has a problem that I need to fix. It's only scanning the left part of the processed image.

@evermeer
Copy link
Owner

evermeer commented Jan 3, 2017

The GPUImage2 branch is now stable and gives good results.

@evermeer
Copy link
Owner

evermeer commented Jan 3, 2017

The GPUImage2 version is now merged to master and released as version 2.0.1

@evermeer evermeer closed this as completed Jan 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants