rmtheis / tess-two

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

Crashing reported on 64-bit devices #197

Closed rmtheis closed 6 years ago

rmtheis commented 7 years ago

Needs investigation as to which architectures are affected, and when the issue was introduced.

rmtheis commented 7 years ago

6.2.0

armv7: No crash x86_64: Crash

6.1.1

armv7: No crash x86_64: Crash

6.0.4

armv7: No crash x86_64: Crash

rmtheis commented 7 years ago

A workaround for this issue was committed in https://github.com/rmtheis/tess-two/commit/688d487b11c2e8d17816fd91ba7de5a3c1cfd041. 64-bit devices will fall back to run the 32-bit ABIs instead of the 64-bit versions, avoiding the crashing.

wangyangke commented 7 years ago

This bug is solved?

wangyangke commented 7 years ago

Don't build 64-bit ABIs by default,i edit module's build.gradle file to add tess-two as an external dependency:

dependencies { compile 'com.rmtheis:tess-two:8.0.0' }, but still crash

rmtheis commented 7 years ago

@wangyangke Try File->Invalidate Caches and Restart. Otherwise please create a new issue with more info.

jenia commented 6 years ago

@rmtheis This does not avoid the error for me unfortunately.

I'm still getting a crash which says:

java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/org.opencv.engine-1/lib/arm64/libopencv_java3.so" is 64-bit instead of 32-bit

Do you know how can I fix this?

Thanks kindly.

anonym24 commented 6 years ago

@jenia

try

ndk {
    abiFilters  'armeabi', 'armeabi-v7a', "x86"
}
SahSantoshh commented 6 years ago

@jenia did you find the fix, I got this. Why these kind of errors occurs.

A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xe422613f in tid 26569 (AsyncTask #3)

rmtheis commented 6 years ago

@SahSantoshh Please open a new issue for the problem you're seeing with steps to reproduce the problem on an emulator. We'd like to be able to look into your issue and fix it.

SahSantoshh commented 6 years ago

Hi @rmtheis Thanks for your concern. But I fixed the issue by adding two line of code in manifest.xml file.

android:largeHeap="true"
android:hardwareAccelerated="false"
amatsegor commented 5 years ago

Nothing works for me ( Neither manifest flags or abiFilters (since I'm using other native libs alongside tess-two) Still

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 A/DEBUG: Cause: null pointer dereference backtrace: A/DEBUG: #00 pc 00000000001ea110 /data/app/ua.amatsehor.sample-7mQG6gmeFUSzz-Rmv3Aj1g==/lib/arm64/libtess.so (tesseract::Dict::def_letter_is_okay(void*, int, bool) const+2768)