rhardih / bad

A collection of docker files for cross compiling various native libraries
MIT License
24 stars 5 forks source link

Tesseract crash in Recognize() #10

Closed scubess closed 5 years ago

scubess commented 5 years ago

Hi @rhardih, I might need your help. I built the tesseract (libtesseract.so), leptonica (liblept.so) & tiff (libtiff.so) from the makefile. I tried in my sample app. As I got the tesseract version number (4.0.0), I think there is no problem in initialising the tesseract engine. But when I try to recognise, I got this error thrown,


2019-10-15 13:37:43.296 29748-29748/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xc
2019-10-15 13:37:43.296 29748-29748/? A/DEBUG: Cause: null pointer dereference
2019-10-15 13:37:43.296 29748-29748/? A/DEBUG:     x0  0000007a10b58400  x1  0000000000000001  x2  0000000000000000  x3  0000000000000000
2019-10-15 13:37:43.296 29748-29748/? A/DEBUG:     x4  0000007fead187d0  x5  0000000000000000  x6  0000000080000000  x7  6d7450ff63647260
2019-10-15 13:37:43.296 29748-29748/? A/DEBUG:     x8  0000000000000000  x9  0000000000000000  x10 0000000000000001  x11 0000000000000020
2019-10-15 13:37:43.296 29748-29748/? A/DEBUG:     x12 0000007a220ea330  x13 b760e692601a80b2  x14 0000000000000030  x15 aaaaaaaaaaaaaaab
2019-10-15 13:37:43.296 29748-29748/? A/DEBUG:     x16 0000007a108925b0  x17 0000007a1069accc  x18 0000000000000044  x19 0000000000000000
2019-10-15 13:37:43.296 29748-29748/? A/DEBUG:     x20 0000007a33f9c1a0  x21 0000007a22158e40  x22 0000000000000000  x23 0000000000000000
2019-10-15 13:37:43.296 29748-29748/? A/DEBUG:     x24 0000000000000000  x25 0000000000000047  x26 0000007a221fe000  x27 0000007a2046f030
2019-10-15 13:37:43.296 29748-29748/? A/DEBUG:     x28 0000007fead18b20  x29 0000007fead18940
2019-10-15 13:37:43.296 29748-29748/? A/DEBUG:     sp  0000007fead18750  lr  0000007a105f8abc  pc  0000007a105f8ad8
2019-10-15 13:37:43.468 29748-29748/? A/DEBUG: backtrace:
2019-10-15 13:37:43.468 29748-29748/? A/DEBUG:     #00 pc 00000000000a2ad8  /data/app/com.example.sample_adaptech_tess4android-CyBezkRI0S-FOpfPG0w6CQ==/lib/arm64/libtesseract.so (tesseract::Tesseract::recog_all_words(PAGE_RES*, ETEXT_DESC*, TBOX const*, char const*, int)+184)
2019-10-15 13:37:43.468 29748-29748/? A/DEBUG:     #01 pc 0000000000283840  /data/app/com.example.sample_adaptech_tess4android-CyBezkRI0S-FOpfPG0w6CQ==/lib/arm64/libtesseract.so (tesseract::TessBaseAPI::Recognize(ETEXT_DESC*)+1092)
2019-10-15 13:37:43.468 29748-29748/? A/DEBUG:     #02 pc 00000000002821dc  /data/app/com.example.sample_adaptech_tess4android-CyBezkRI0S-FOpfPG0w6CQ==/lib/arm64/libtesseract.so (tesseract::TessBaseAPI::GetUTF8Text()+48)
2019-10-15 13:37:43.468 29748-29748/? A/DEBUG:     #03 pc 0000000000003538  /data/app/com.example.sample_adaptech_tess4android-CyBezkRI0S-FOpfPG0w6CQ==/lib/arm64/libwhat3words-ocr-jni.so (Java_com_what3words_java_1wrapper_OCREngineImp_nativeReadBitmap+612)
2019-10-15 13:37:43.468 29748-29748/? A/DEBUG:     #04 pc 0000000000577fe0  /system/lib64/libart.so (art_quick_generic_jni_trampoline+144)```

@rhardih, is there anything I missed from the build, please? Also, i using tesseract 4.0.0 with 1.74.4 have any impacts to create this issue? 
rhardih commented 5 years ago

You should try the tesseract issue tracker for tesseract specific problems. Also, if you want help there, you are most likely to succeed, if you include a sample project or piece of code, that makes the error reproducible, for whoever decides to take a look. 👍

scubess commented 5 years ago

Thank you so much! I believe i post with an example in tesseract repo. Also, i close this issue too.