regulaforensics / DocumentReader-iOS

iOS Framework for reading and validation of identification documents
56 stars 15 forks source link

App crash with OCR mode selected #33

Closed olcayertas closed 3 years ago

olcayertas commented 3 years ago

Hi, our application is crashing when OCR scenario selected with the latest SDK:

Here is the call stack:

Thread 9 Queue : com.regula.recognizesample.scanphotoqueue (serial)
#0  0x0000000198052d88 in __pthread_kill ()
#1  0x0000000197f6f74c in pthread_kill$VARIANT$armv81 ()
#2  0x0000000197ebe934 in abort ()
#3  0x0000000198026cc0 in abort_message ()
#4  0x0000000198018df8 in demangling_terminate_handler() ()
#5  0x0000000197f7fe90 in _objc_terminate() ()
#6  0x000000019802614c in std::__terminate(void (*)()) ()
#7  0x00000001980260e4 in std::terminate() ()
#8  0x0000000197f7fe04 in objc_terminate ()
#9  0x0000000109c1b744 in _dispatch_client_callout ()
#10 0x0000000109c2a944 in _dispatch_sync_invoke_and_complete_recurse ()
#11 0x0000000109c2a25c in _dispatch_sync_f_slow ()
#12 0x00000001039f73d4 in -[RGLDocumentReaderCameraViewController scanImage] at /Users/administratorregula/regula/DocumentReaderAPI_Git/DocumentReader/Controllers/RGLDocumentReaderCameraViewController.m:2521
#13 0x00000001039f8d04 in __50-[RGLDocumentReaderCameraViewController scanImage]_block_invoke_12 at /Users/administratorregula/regula/DocumentReaderAPI_Git/DocumentReader/Controllers/RGLDocumentReaderCameraViewController.m:2616
#14 0x0000000109c1a338 in _dispatch_call_block_and_release ()
#15 0x0000000109c1b730 in _dispatch_client_callout ()
#16 0x0000000109c1de88 in _dispatch_queue_override_invoke ()
#17 0x0000000109c2cd74 in _dispatch_root_queue_drain ()
#18 0x0000000109c2d698 in _dispatch_worker_thread2 ()
#19 0x0000000197f74b38 in _pthread_wqthread ()

This is the error message:

libc++abi.dylib: terminating with uncaught exception of type std::__1::regex_error: One of *?+{ was not preceded by a valid regular expression.

MRZ and MRZ or OCR scenarios are working fine.

vyakimchik commented 3 years ago

Hello. Could you please describe the steps on how we can reproduce it ourselves?

olcayertas commented 3 years ago

Steps:

Is doesn't happen always but happening alot.

vyakimchik commented 3 years ago

It seems that the issue is in that document that you are trying to process. Could you please send us an image of it to support@regulaforensics.com so that we can reproduce the crash?

vyakimchik commented 3 years ago

Solved.