Closed DaiZrei closed 11 months ago
Hi, does it crash with the sample app too?
If it does, could you quickly try few older Tesseract4Android versions if it crashes there too?
And finally, to see where it really crashes, you should compile the library manually in debug mode. To do it with sample project:
I tried compiling your Sample, no problem with it. But I tried moving it to a new project and unfortunately I get the same problem. I also tried to compile the native version of the library and got the following errors in the debugger
@DaiZrei What *.traineddata file are you using? If you try the eng.traineddata
from the sample, does it work in your project?
If it doesn't, maybe you have some problem with the path where that traineddata file is saved? Because if sample project works for you, then there must be something wrong in your code.
@DaiZrei What *.traineddata file are you using? If you try the
eng.traineddata
from the sample, does it work in your project?If it doesn't, maybe you have some problem with the path where that traineddata file is saved? Because if sample project works for you, then there must be something wrong in your code.
I have completely transferred all the classes of the Sample project from your repository to the new project, including the traineddata file. And there are problems in the new project. And if I use it in your project, then everything is fine. Perhaps there are some nuances of the project configuration?
@DaiZrei Can you create some reproducible project which will fail this way on any device/emulator? Or does the issue still happens only on these specific devices?
@DaiZrei Random idea - what happens when you specify ndkVersion in your new project to the same value as used here?
I believe older version is used by default so maybe that is the difference which causes your crashes? EDIT: But since the library is already built, it doesn't make sense actually...
@DaiZrei Have you solved your problem? I'd like to know what was wrong, or if there is still something wrong with the library.
I'm closing this due to inactivity. If you still have the problem, feel free to reopen this.
Hello. I use the compiled version of the library in my application. When I run the app on my Google Pixel 6a everything works great. But if I run the application on a weaker device or on a device with an old version of Android, I get a crash with the following error: A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 12321. Tested on two devices: Xiaomi Redmi note 10 Pro(Android 11) and Xiaomi Mi 5(Android 8). All attempts to correct the error, to no avail.
Detail log:
22971-22971 libc com.example.forblitz.livestatistics A Fatal signal 6 (SIGABRT), code -6 in tid 22971 (.livestatistics) 2023-06-09 02:16:51.102 23086-23086 DEBUG pid-23086 A pid: 22971, tid: 22971, name: .livestatistics >>> com.example.forblitz.livestatistics <<< 2023-06-09 02:16:51.119 23086-23086 DEBUG pid-23086 A https://github.com/adaptech-cz/Tesseract4Android/issues/2 pc 000000000021cfc4 /data/app/com.example.forblitz.livestatistics-SH0kovyRsnozQwxSJhbXWg==/lib/arm64/libtesseract.so (_ZNK9tesseract7ERRCODE5errorEPKcNS_16TessErrorLogCodeES2_z+368) 2023-06-09 02:16:51.119 23086-23086 DEBUG pid-23086 A https://github.com/adaptech-cz/Tesseract4Android/issues/3 pc 0000000000232cd8 /data/app/com.example.forblitz.livestatistics-SH0kovyRsnozQwxSJhbXWg==/lib/arm64/libtesseract.so (_ZN9tesseract8Classify22InitAdaptiveClassifierEPNS_15TessdataManagerE+420) 2023-06-09 02:16:51.119 23086-23086 DEBUG pid-23086 A https://github.com/adaptech-cz/Tesseract4Android/issues/4 pc 0000000000310b08 /data/app/com.example.forblitz.livestatistics-SH0kovyRsnozQwxSJhbXWg==/lib/arm64/libtesseract.so (ZN9tesseract7Wordrec14program_editupERKNSt6__ndk112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPNS_15TessdataManagerESB+84) 2023-06-09 02:16:51.120 23086-23086 DEBUG pid-23086 A https://github.com/adaptech-cz/Tesseract4Android/issues/5 pc 00000000001d1c90 /data/app/com.example.forblitz.livestatistics-SH0kovyRsnozQwxSJhbXWg==/lib/arm64/libtesseract.so (_ZN9tesseract9Tesseract14init_tesseractERKNSt6ndk112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_S9_NS_13OcrEngineModeEPPciPKNS1_6vectorIS7_NS5_IS7_EEEESH_bPNS_15TessdataManagerE+688) 2023-06-09 02:16:51.120 23086-23086 DEBUG pid-23086 A https://github.com/adaptech-cz/Tesseract4Android/issues/6 pc 0000000000180d78 /data/app/com.example.forblitz.livestatistics-SH0kovyRsnozQwxSJhbXWg==/lib/arm64/libtesseract.so (_ZN9tesseract11TessBaseAPI4InitEPKciS2_NS_13OcrEngineModeEPPciPKNSt6ndk16vectorINS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEENSB_ISD_EEEESH_bPFbS2_PNS7_IcSC_EEE+1040) 2023-06-09 02:16:51.120 23086-23086 DEBUG pid-23086 A https://github.com/adaptech-cz/Tesseract4Android/issues/7 pc 0000000000180958 /data/app/com.example.forblitz.livestatistics-SH0kovyRsnozQwxSJhbXWg==/lib/arm64/libtesseract.so (_ZN9tesseract11TessBaseAPI4InitEPKcS2_NS_13OcrEngineModeEPPciPKNSt6__ndk16vectorINS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEENSB_ISD_EEEESH_b+56) 2023-06-09 02:16:51.120 23086-23086 DEBUG pid-23086 A https://github.com/adaptech-cz/Tesseract4Android/issues/8 pc 00000000003134f0 /data/app/com.example.forblitz.livestatistics-SH0kovyRsnozQwxSJhbXWg==/lib/arm64/libtesseract.so (Java_com_googlecode_tesseract_android_TessBaseAPI_nativeInitOem+136) 2023-06-09 02:16:51.121 23086-23086 DEBUG pid-23086 A https://github.com/adaptech-cz/Tesseract4Android/issues/9 pc 0000000000043f34 /data/app/com.example.forblitz.livestatistics-SH0kovyRsnozQwxSJhbXWg==/oat/arm64/base.odex (offset 0x30000)