rmtheis / tess-two

Fork of Tesseract Tools for Android
Apache License 2.0
3.76k stars 1.38k forks source link

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) _ZN9tesseract9AmbigSpec19compare_ambig_specsEPKvS2_ #212

Closed SidhanshuUdawat closed 7 years ago

SidhanshuUdawat commented 7 years ago

Summary:

backtrace:

  native: pc 00000000000e7dca  /data/app/com.app.com.myapp-2/lib/arm/libtess.so (_ZN9tesseract9AmbigSpec19compare_ambig_specsEPKvS2_+17)
  native: pc 00000000000e9979  /data/app/com.app.com.myapp-2/lib/arm/libtess.so (_ZN5ELIST19add_sorted_and_findEPFiPKvS1_EbP10ELIST_LINK+172)
  native: pc 00000000000e7cf3  /data/app/com.app.com.myapp-2/lib/arm/libtess.so (_ZN9tesseract13UnicharAmbigs15InsertIntoTableER13GenericVectorIPNS_14AmbigSpec_LISTEEiPiiPKciPNS_9AmbigSpecEP10UNICHARSET+314)
  native: pc 00000000000e728d  /data/app/com.app.com.myapp-2/lib/arm/libtess.so (_ZN9tesseract13UnicharAmbigs17LoadUnicharAmbigsERK10UNICHARSETPNS_5TFileEibPS1_+344)
  native: pc 00000000000e70f7  /data/app/com.app.com.myapp-2/lib/arm/libtess.so (_ZN9tesseract13UnicharAmbigs13LoadUniversalERK10UNICHARSETPS1_+62)
  native: pc 00000000000ba84d  /data/app/com.app.com.myapp-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract24init_tesseract_lang_dataEPKcS2_S2_NS_13OcrEngineModeEPPciPK13GenericVectorI6STRINGESA_b+944)
  native: pc 00000000000bb145  /data/app/com.app.com.myapp-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract23init_tesseract_internalEPKcS2_S2_NS_13OcrEngineModeEPPciPK13GenericVectorI6STRINGESA_b+40)
  native: pc 00000000000bae81  /data/app/com.app.com.myapp-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract14init_tesseractEPKcS2_S2_NS_13OcrEngineModeEPPciPK13GenericVectorI6STRINGESA_b+248)
  native: pc 000000000008e2d9  /data/app/com.app.com.myapp-2/lib/arm/libtess.so (_ZN9tesseract11TessBaseAPI4InitEPKcS2_NS_13OcrEngineModeEPPciPK13GenericVectorI6STRINGESA_b+184)
  native: pc 0000000000185429  /data/app/com.app.com.myapp-2/lib/arm/libtess.so (Java_com_googlecode_tesseract_android_TessBaseAPI_nativeInitOem+72)
  native: pc 0000000000d31da7  /data/app/com.app.com.myapp-2/oat/arm/base.odex

Steps to reproduce the issue:

    mTessBaseApi = new TessBaseAPI();
    mTessBaseApi.setDebug(false);
    mTessBaseApi.init(mDataPath, mLang);

This is happening with signed apk, basically post uploading to Google Play. Issue is for only specific Native platform armeabi-v7a

Expected result:

OCR should scan the data and provide the expected results / output.

Tess-two version:

6.3.0

Android version:

Android 6.0

Phone/device model: Galaxy Note Edge (tblte) / Redmi 3S (land)

Phone/device architecture (armeabi, armeabi-v7a, x86, mips, arm64-v8a, x86_64, mips64):

Native platform armeabi-v7a

rmtheis commented 7 years ago

Thanks for reporting this. Do you have an input image for which this native crash happens consistently?

SidhanshuUdawat commented 7 years ago

Usually this happens when scanning McDonald's or KFC over the counter receipts. This crash is happening in all devices with Native platform: armeabi-v7a.

Do you have any idea how to fix this ?

rmtheis commented 7 years ago

@SidhanshuUdawat Short answer: No. The simplest way to investigate this crash would be to reproduce it.

Please provide an input image for which this native crash happens consistently, and a link to the training data file that you're using.