Fatal signal 11 (SIGSEGV) Error in Tesseract

2019-09-11 03:31发布

问题:

I have developing an android ocr app with Tesseract Library.

And I build the project with ndk-build. And I created my project and placed the eng.trainneddata(version 3.02) in the assets folder of my application and when I started my application I copied the file to the tessdata folder into my folder tivs.

And i emulated into my one of the device with 1GB of RAM and 900MB free space of my phone it works perfectly. I tested that in my another device (Moto e) it tells the error Fatal signal 11 (SIGSEGV) when i calls the getUTF8 Text().

EDIT:

public static final String DATA_PATH = Environment
        .getExternalStorageDirectory().toString() + "/TIVS/";
TessBaseAPI baseApi = new TessBaseAPI();
    baseApi.setDebug(true);
    baseApi.init(DATA_PATH, lang);
    baseApi.setImage(bitmap);
    baseApi.setRectangle(20,400,600,100); // I forgot to add this line
    String recognized_text = baseApi.getUTF8Text(); //Error occuring on this line 

It continuously falls the same error all other devices.