Akylas / OSS-DocumentScanner

Android document document scanning app
https://www.akylas.fr
MIT License
695 stars 24 forks source link

[Bug] Crash while scanning photo text #103

Open rileyhawk1417 opened 7 months ago

rileyhawk1417 commented 7 months ago

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

farfromrefug commented 7 months ago

@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

rileyhawk1417 commented 7 months ago

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

Am open to running a debug version for sharing logs.

farfromrefug commented 7 months ago

@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

rileyhawk1417 commented 7 months ago

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.

farfromrefug commented 7 months ago

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

rileyhawk1417 commented 7 months ago

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.

farfromrefug commented 7 months ago

@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

rileyhawk1417 commented 7 months ago

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 commented 7 months ago

🤔so tesseract is the engine for the OCR?

farfromrefug commented 7 months ago

@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...

rileyhawk1417 commented 7 months ago

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

farfromrefug commented 7 months ago

@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.

rileyhawk1417 commented 7 months ago

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.

farfromrefug commented 7 months ago

@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

rileyhawk1417 commented 7 months ago

No worries glad it came through.

RamPawar7 commented 6 months ago

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

farfromrefug commented 6 months ago

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

RamPawar7 commented 6 months ago

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

farfromrefug commented 6 months ago

@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!

RamPawar7 commented 6 months ago

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