Open khambir opened 4 years ago
Hello, Thank you for all the info. We tried to reproduce the crash on our end on iPhone X, but we had all successful attempts. When you say that it happens quite often, can you tell us some statistics regarding it? Also, you can contact us directly at support@microblink.com Thanks, Branka
Quite often - about 80% of scanner launch.
Hi @khambir, Could you please send us a video of a scanning process with the crashing issue? Thanks, Branka
@Brankacro yes, sure.
As you can see, the scanner works well, but when the document in focus and I activate the passport scanner the app is broken.
Thanks @khambir for the video. Can you please try one more thing, to build the sample from the Sample folder in the root of our SDK, using the PassportRecognizer and see how it goes? How does this sound? Please, let us know. Thanks, Branka
This issue has been there specifically in SDK 5.1.0. I can reproduce it consistently in the attached sample project. Just try scanning any document that is supported by BlinkIDRecognizer multiple times. Like in the attached sample project, after the document is scanning then you will be asked to confirm if the picture taken is clear enough. Hit "Retake" on that screen to do the re-scan. Do this 2-3 times and you will see the crash. TestBlink.zip
Hi @khambir and @pankajhotwani2,
Thanks for reporting this. We've investigated this in more detail and so far it seems we've introduced a memory leak in v5.1. We'll take this with the biggest priority for the next week. If we confirm the issue and find the root cause, we'll be updating the SDK immediately after that.
We'll keep you posted.
Jurica.
Seems we have similar issue.
Hi @khambir, @pankajhotwani2, @vg-identance,
We've found a memor leak in v5.1 where there was a retain cycle between MBBlinkIDRecognizer and MBBlinkIDOverlayViewController. We've managed to fix it and we've released v5.1.1 today.
Can you try if you have the same issue with the updated SDK?
Thank you, Jurica.
Hi @Cerovec
Unfortunately, I can reproduce the crash on v.5.1.1
Hi @khambir
please send us your demo where you are getting this crash
@juraskrlec behavior is the same as here: https://github.com/BlinkID/blinkid-ios/files/4058341/video.zip
Hi,
Thank you. What puzzles us is that we cannot reproduce the same thing with our sample apps. We also ran instruments on our sample app and couldn't find any problems. See attached.
Can you: 1) Try our sample app and see if the crash happens there for you? 2) Run your test app through instruments (leaks) and see if your custom UI implementation has any memory leaks?
@pankajhotwani2, @vg-identance - are you still experiencing the same issue?
Thank you, Jurica.
@khambir Can you check in your Custom UI implementation how do you dismiss the Recognizer Runner View Controller? It looks like the current process is like this
1) pressing scan pushes recognizer runner view controller modally 2) successful scan pushes confirm image view controller modally 3) hitting retake pushes another recognizer runner view controller modally
If we're right, this is the problem. You can't have multiple recognizer runner view controllers running at the same time in the same stack. You should dismiss the first one before starting another.
Looking forward to your feedback.
Jurica.
@Cerovec Thanks Jurica! I verified the new SDK version 5.1.1 and its working like a charm so the fix that you put in seems to be working correctly.
Note: If you want to cross check then you can try running the TestBlink sample project that I attached in my previous post.
Thanks Again!
Pankaj
@Cerovec we do not use multiple recognizer runner view controllers running at the same time. Everything works fine with version 5.0, but with 5.1 and 5.1.1 we have the crash. But frankly speaking, it's too hard to reproduce this crash with 5.1.1, but in any case, it is possible for me.
I tried again today with 5.1.1 in the same sample app project and today I could reproduce the issue again. So looks like there was still an issue with 5.1.1, its just that it was hard to reproduce. Sorry for the confusion..
So @Cerovec, unfortunately the issue still persist in 5.1.1. Can you confirm?
Thanks, Pankaj
@Cerovec
@Cerovec Are there any plans to fix the crash in the upcoming version?
@Cerovec still get same crash on v5.2
@vg-identance @Cerovec can confirm, same crash for me on v5.2. Going to try 5.0 and see if that helps.
@vg-identance @Cerovec I can confirm that on any of the 5.0.x versions, the framework does not crash. As soon as you move to 5.1.0 it becomes unstable.
Hi @jowie @vg-identance
Please share with us your code where you are getting this crash, so we can reproduce it at our end and see what's going on.
Best, Jura
@jowie @vg-identance @pankajhotwani2
You can also contact us directly to support@microblink.com (if you don't want to share your code publicly).
Regards
Hi @khambir @pankajhotwani2 @vg-identance @jowie,
we were testing TestBlink project provided by pankajhotwani2.
We are getting the same crash on 5.0.0 and 5.2.0.
In provided TestBlink project, crash is solved by moving [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(customScanningComplete:) name:@"scanningComplete" object:nil];
into viewDidLoad
. Currently, on every scan observer is added.
With that, the crash was fixed on 5.0.0, but not on 5.2.0.
Since we changed the processing queue, it looks like _dict
property still holds a reference.
In - (IBAction)startScan:(id)sender
you are setting these properties to nil
.
_fullDocumentImageString = nil;
_faceImageString = nil;
_part1Scanned = NO;
If you also add in this method _dict = nil;
, the bug will be fixed and it won't crash anymore.
@TCvetkovic Solution provided worked in TestBlink project. Thanks!
The solution for my code was different. I was calling reconfigureRecognizers
during the scanning process, which it doesn't seem to like. Once I removed that, the crashes went away. 👍
@jowie, @pankajhotwani2, @vg-identance
We've managed to find a part of our OpenGL code which was fragile and sensitive to crashes if used from multiple threads. We're releasing v5.3 this week where this will be sorted out as well.
We suggest you upgrade to v5.3 so that we can test if this helps you.
@jowie, @pankajhotwani2, @vg-identance,
Can you please check if v5.3 solves your issues? It was released yesterday.
Thanks, Jurica.
@Cerovec Thanks, seems works better
Can not reproduce in v5.3
Thanks @Cerovec! New version 5.3.0 is working good so far.
Thanks, Pankaj
@pankajhotwani2, @khambir, @vg-identance, @jowie,
We're reopening this issue as it appears that it still exists. What's your experience? Do you have any crash reporting mechanisms? Do you see the crash happening in production?
Do you have any way of reproducing this issue?
Thanks! Jurica.
Not in production yet.
Hi @Cerovec
This crash I do not have in production, but there are other ones. Unfortunately, I can not reproduce them, but I can see crashes in the Firebase crashlytics.
Two types of crashes:
The first one:
Fatal Exception: NSGenericException *** -[AVCaptureSession stopRunning] stopRunning may not be called between calls to beginConfiguration and commitConfiguration
The second one:
Crashed: com.microblink.frame.processing EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000 scanningRegionForFrameInBounds
@vg-identance - thanks for the feedback!
@khambir, thanks! For the crash with [AVCaptureSession stopRunning]
, we have another issue opened. https://github.com/BlinkID/blinkid-ios/issues/266
For the crash with scanningRegionForFrameInBounds
, we didn't have this kind of report. We opened a new issue for it: https://github.com/BlinkID/blinkid-ios/issues/298, we can continue the discussion there.
If anyone else experiences the crashes with GLEngine gleRunVertexSubmitARM:
, please let us know.
@Cerovec so we finally get to the prod state and begin to receive a lot of crashes with GLEngine gleRunVertexSubmitARM
on version 5.3
Hi @vg-identance,
Thanks for the update! We have some clues as where the issue might be, but we need some more digging to get to the bottom of it.
In the meantime, keep us informed about the severity of the crash, if possible.
Thanks, Jurica.
@Cerovec some of the crash logs:
Crashed: com.microblink.frame.processing
0 GLEngine 0x2222cb1c0 gleRunVertexSubmitARM + 1924
1 GLEngine 0x2222c8914 gleSetVertexArrayFunc + 144
2 GLEngine 0x222271ab0 glDrawArrays_IMM_ES2Exec + 580
3 Microblink 0x10279133c scanningRegionForFrameInBounds + 1577948
4 libdispatch.dylib 0x2005c17d4 _dispatch_client_callout + 16
5 libdispatch.dylib 0x20056a324 _dispatch_lane_serial_drain$VARIANT$mp + 592
6 libdispatch.dylib 0x20056ae40 _dispatch_lane_invoke$VARIANT$mp + 428
7 libdispatch.dylib 0x2005734ac _dispatch_workloop_worker_thread + 596
8 libsystem_pthread.dylib 0x2007a2114 _pthread_wqthread + 304
9 libsystem_pthread.dylib 0x2007a4cd4 start_wqthread + 4
Crashed: com.microblink.frame.processing
0 GLEngine 0x1a07f728c gleRunVertexSubmitARM + 1900
1 GLEngine 0x1a07f4c34 gleSetVertexArrayFunc + 144
2 GLEngine 0x1a07b91c4 glDrawArrays_IMM_ES2Exec + 712
3 Microblink 0x10694933c scanningRegionForFrameInBounds + 1577948
4 libdispatch.dylib 0x1863b6184 _dispatch_client_callout + 16
5 libdispatch.dylib 0x186362464 _dispatch_lane_serial_drain$VARIANT$mp + 608
6 libdispatch.dylib 0x186362e58 _dispatch_lane_invoke$VARIANT$mp + 420
7 libdispatch.dylib 0x18636c340 _dispatch_workloop_worker_thread + 588
8 libsystem_pthread.dylib 0x186405fa4 _pthread_wqthread + 276
9 libsystem_pthread.dylib 0x186408ae0 start_wqthread + 8
Crashed: com.microblink.frame.processing
0 GLEngine 0x1a2bef264 gleRunVertexSubmitARM + 1860
1 GLEngine 0x1a2becc34 gleSetVertexArrayFunc + 144
2 GLEngine 0x1a2bb11c4 glDrawArrays_IMM_ES2Exec + 712
3 Microblink 0x10458133c scanningRegionForFrameInBounds + 1577948
4 libdispatch.dylib 0x1883f3184 _dispatch_client_callout + 16
5 libdispatch.dylib 0x1883d0710 _dispatch_lane_serial_drain$VARIANT$armv81 + 564
6 libdispatch.dylib 0x1883d1128 _dispatch_lane_invoke$VARIANT$armv81 + 400
7 libdispatch.dylib 0x1883da43c _dispatch_workloop_worker_thread + 576
8 libsystem_pthread.dylib 0x188442b88 _pthread_wqthread + 276
9 libsystem_pthread.dylib 0x188445760 start_wqthread + 8
Crashed: com.microblink.frame.processing
0 GLEngine 0x1bbb90d7c gleRunVertexSubmitARM + 1976
1 GLEngine 0x1bbbbb5f0 gliSetInteger.cold.1 + 8968
2 GLEngine 0x1bbb8e510 gleLLVMArrayFunc + 112
3 GLEngine 0x1bbb8e490 gleSetVertexArrayFunc + 84
4 GLEngine 0x1bbb50204 glDrawArrays_IMM_ES2Exec + 716
5 OpenGLES 0x1bbbdf8f8 glDrawArrays + 56
6 Microblink 0x102de533c scanningRegionForFrameInBounds + 1577948
7 libdispatch.dylib 0x1a0d99fd8 _dispatch_client_callout + 20
8 libdispatch.dylib 0x1a0da0450 _dispatch_lane_serial_drain + 568
9 libdispatch.dylib 0x1a0da0e7c _dispatch_lane_invoke + 368
10 libdispatch.dylib 0x1a0da9f20 _dispatch_workloop_worker_thread + 580
11 libsystem_pthread.dylib 0x1a0dff6d0 _pthread_wqthread + 280
12 libsystem_pthread.dylib 0x1a0e059e8 start_wqthread + 8
Crashed: com.microblink.frame.processing
0 GLEngine 0x1b3b9c4d4 gleRunVertexSubmitARM + 1844
1 GLEngine 0x1b3bc8450 gliSetInteger.cold.1 + 7310443600
2 GLEngine 0x1b3b99ef4 gleSetVertexArrayFunc + 144
3 GLEngine 0x1b3b5f3b0 glDrawArrays_IMM_ES2Exec + 700
4 Microblink 0x1032ad33c scanningRegionForFrameInBounds + 1577948
5 libdispatch.dylib 0x198e0b524 _dispatch_client_callout + 16
6 libdispatch.dylib 0x198de8b3c _dispatch_lane_serial_drain$VARIANT$armv81 + 564
7 libdispatch.dylib 0x198de954c _dispatch_lane_invoke$VARIANT$armv81 + 396
8 libdispatch.dylib 0x198df284c _dispatch_workloop_worker_thread + 580
9 libsystem_pthread.dylib 0x198e5cb74 _pthread_wqthread + 272
10 libsystem_pthread.dylib 0x198e5f740 start_wqthread + 8
@Cerovec any update on this?
Hi @vg-identance
Apologies for keeping you waiting.
We've released BlinkID 5.6, where the issue you were having should be fixed now.
Would you mind giving us feedback on whether the new release fixed it?
Regards, Milan
Yes the issue still persist in Blink ID 5.6.0. I rolled back to 5.3.0 which works for me.
Also have this issue in 5.6.0 but only was able to replicate in Debug build with frequency about 1 crash in 150 tries iOS 13.6, xCode 11, Passport
Hi everyone,
Just to make a follow-up on this thread.
Did you maybe get a chance to test the latest version (v5.8) and trying to reproduce the issue?
Regards, Milan
@mparadina currently update with 5.8 still in development
Environment
Describe the problem
The app is crashing after scanning the document.
Steps to reproduce:
MBPassportRecognizer
Try to do it several times, the bug is reproducing not every time, but quite often. I use iPhone X. I can not reproduce this bug with BlinkID SDK 5.0, only with 5.1.