jonathanpalma / react-native-tesseract-ocr

Tesseract OCR wrapper for React Native
MIT License
565 stars 172 forks source link

Crash when using another language #88

Closed kriptonhaz closed 3 years ago

kriptonhaz commented 4 years ago

Describe the bug Just use a code from example and changing into LANG_INDONESIAN when after select image from camera it just crash. But when using LANG_ENGLISH is doing just fine.

Dependencies (please complete the following information):

To Reproduce Steps to reproduce the behavior:

  1. Copy from example
  2. Change language into Indonesian
  3. Copy ind.traineddata into /assets/tessdata
  4. Select image from camera

Expected behavior Get the result just like from example

Smartphone (please complete the following information):

logcat

08-27 06:27:53.721 14341 14963 D SoLoader: libimagepipeline.so not found on /data/data/com.project/lib-main 08-27 06:27:53.721 14341 14963 D SoLoader: libimagepipeline.so found on /data/app/com.project-2/lib/arm64 08-27 06:27:53.811 14341 14963 D SoLoader: libnative-imagetranscoder.so not found on /data/data/com.project/lib-main 08-27 06:27:53.811 14341 14963 D SoLoader: libnative-imagetranscoder.so found on /data/app/com.project-2/lib/arm64 08-27 06:27:54.068 664 664 F DEBUG : pid: 14341, tid: 14960, name: Thread-76096 >>> com.project <<< 08-27 06:27:54.184 664 664 F DEBUG : #00 pc 00000000000f2828 /data/app/com.project-2/lib/arm64/libtess.so (_ZN9tesseract9Tesseract15recog_all_wordsEP8PAGE_RESP10ETEXT_DESCPK4TBOXPKci+184) 08-27 06:27:54.184 664 664 F DEBUG : #01 pc 00000000000e0560 /data/app/com.project-2/lib/arm64/libtess.so (_ZN9tesseract11TessBaseAPI9RecognizeEP10ETEXT_DESC+844) 08-27 06:27:54.184 664 664 F DEBUG : #02 pc 00000000000e1930 /data/app/com.project-2/lib/arm64/libtess.so (_ZN9tesseract11TessBaseAPI11GetHOCRTextEP10ETEXT_DESCi+76) 08-27 06:27:54.184 664 664 F DEBUG : #03 pc 00000000002910f4 /data/app/com.project-2/lib/arm64/libtess.so (Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetHOCRText+116) 08-27 06:27:54.184 664 664 F DEBUG : #04 pc 0000000000ba6ccc /data/app/com.project-2/oat/arm64/base.odex (offset 0x6fb000) (java.lang.String com.googlecode.tesseract.android.TessBaseAPI.nativeGetHOCRText(long, int)+144) 08-27 06:27:54.184 664 664 F DEBUG : #05 pc 0000000000ba90a0 /data/app/com.project-2/oat/arm64/base.odex (offset 0x6fb000) (java.lang.String com.googlecode.tesseract.android.TessBaseAPI.getHOCRText(int)+132) 08-27 06:27:54.184 664 664 F DEBUG : #06 pc 0000000000bad36c /data/app/com.project-2/oat/arm64/base.odex (offset 0x6fb000) (void com.reactlibrary.TesseractOcrModule$1.run()+496)

jonathanpalma commented 4 years ago

@kriptonhaz are you also adding Indonesian trained data under the tessdata directory?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.