OSS-DocumentScanner icon indicating copy to clipboard operation
OSS-DocumentScanner copied to clipboard

[Bug] Crash while scanning photo text

Open rileyhawk1417 opened this issue 1 year ago • 20 comments
trafficstars

Version

App version 1.2.25 Build 35

What platform are you using?

Android

OS Version

Android 12 The phone is a Tecno KH6 running stock android.

What happened?

Tried scanning some text from a photo but it crashed. Theres a screen recording of it below. Pretty sure thats not supposed to happen.

https://github.com/Akylas/OSS-DocumentScanner/assets/42723553/61114b6c-939b-4c01-bdf9-ad927f451263

Relevant log output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

rileyhawk1417 avatar Jan 30 '24 20:01 rileyhawk1417

@rileyhawk1417 indeed it is not supposed to happen. Could you share the image so i can try to reproduce? If i cant i will share a test version with debug logs and crash report thanks

farfromrefug avatar Jan 30 '24 20:01 farfromrefug

Sure this is the image I was trying to scan. IMG-20240130-WA0028.jpg

Am open to running a debug version for sharing logs.

rileyhawk1417 avatar Jan 31 '24 06:01 rileyhawk1417

@rileyhawk1417 ok i cant reproduce it using your image. Does it work for other images? or is OCR simply always crashing for you? I will create a test release for you

farfromrefug avatar Jan 31 '24 08:01 farfromrefug

Well I did try the other settings best, fast they did work fine its just the standard setting that's crashing. I usually went with standard for the previous versions I was on.

rileyhawk1417 avatar Jan 31 '24 09:01 rileyhawk1417

@rileyhawk1417 ok good to know. And standard works for other images?

farfromrefug avatar Jan 31 '24 09:01 farfromrefug

Well some images do manage to get the progress bar to 100%. The app still crashes when using OCR in standard mode. Others dont even give it time to scan.

rileyhawk1417 avatar Jan 31 '24 19:01 rileyhawk1417

@rileyhawk1417 it seems like a tesseract crash. But to make sure i 100% understand. You never get on image to work with standard? By work meaning finishing and let you see the scanned text

farfromrefug avatar Feb 01 '24 08:02 farfromrefug

Yes thats correct the standard setting doesnt do the scan completely(meaning it scanning successfully and not crashing), and it also doesnt show any text.

rileyhawk1417 avatar Feb 01 '24 08:02 rileyhawk1417

🤔so tesseract is the engine for the OCR?

rileyhawk1417 avatar Feb 01 '24 08:02 rileyhawk1417

@rileyhawk1417 yes right now the app is using tesseract. I already faced issues with Tesseract. Not sure why it always crashes in your case. English right? Need to make a test build for you today...

farfromrefug avatar Feb 01 '24 09:02 farfromrefug

Yes am using english text in most cases. 🤔First time I heard of tesseract might be something fun to look into.

rileyhawk1417 avatar Feb 01 '24 11:02 rileyhawk1417

@rileyhawk1417 can you try this build https://github.com/Akylas/OSS-DocumentScanner/releases/tag/test_android ? upon crash and then app restart it should send me a bug report.

farfromrefug avatar Feb 01 '24 12:02 farfromrefug

Just tested on 3 images, it crashed each time on the standard setting. Doesn't have any indication that a bug report was sent though, hope they got to you.

rileyhawk1417 avatar Feb 01 '24 13:02 rileyhawk1417

@rileyhawk1417 thanks i got the report. It is indeed a crash in tesseract. I ll investigate but it is a bit tough as i cant reproduce it here. Thanks for the report

farfromrefug avatar Feb 01 '24 14:02 farfromrefug

No worries glad it came through.

rileyhawk1417 avatar Feb 01 '24 15:02 rileyhawk1417

Same issue here. The OCR model download failed due to connection lost in my first attempt. The app should try to download it again in the next attempt, instead it shows the 'detecting text' screen and crashes after few seconds

RamPawar7 avatar Feb 15 '24 14:02 RamPawar7

@RamPawar7 good catch! i did not think about this. WIll fix

farfromrefug avatar Feb 15 '24 14:02 farfromrefug

In the latest update, the app now correctly downloads the models if it was failed in previous attempt. But I had to clear the app data after updating for it to work

RamPawar7 avatar Feb 16 '24 09:02 RamPawar7

@RamPawar7 yes i am totally sorry i forgot to tell you that. To have the less impact it had to be you (failed download) reset the app. Otherwise all app users would have been asked to download again. Sorry for forgetting to tell you!

farfromrefug avatar Feb 16 '24 12:02 farfromrefug

@farfromrefug No worries. I am a new user, so I didn't have any important data

RamPawar7 avatar Feb 16 '24 13:02 RamPawar7