kean9292 / tesseract-android-tools

Automatically exported from code.google.com/p/tesseract-android-tools
0 stars 0 forks source link

Application crashes on pre 2.2 devices #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. download and compile according to README
2. create project with target platform < 2.2
3. run & experience crash when loading libraries

What is the expected output? What do you see instead?
When setting the target plattform to 2.2 the app will load the tesseract libs 
and execute just fine. when deploying on pre 2.2 device app will crash. 

What version of the product are you using? On what operating system?
i am using an up-to-date version from git. I am compiling on mac os x 10.6.7.

Please provide any additional information below.
The libs compile fine and work under adroid 2.2+ as expected. when deploying on 
an pre 2.2 device the app crashes when trying to load the libs. 

D/dalvikvm(  234): No JNI_OnLoad found in 
/data/data/de.paluno.scanandpay/lib/libjpeg.so 0x43c3b8a0
D/dalvikvm(  234): Trying to load lib 
/data/data/de.paluno.scanandpay/lib/liblept.so 0x43c3b8a0
D/dalvikvm(  234): Added shared lib 
/data/data/de.paluno.scanandpay/lib/liblept.so 0x43c3b8a0
D/dalvikvm(  234): Trying to load lib 
/data/data/de.paluno.scanandpay/lib/libtess.so 0x43c3b8a0
I/DEBUG   (   27): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 
***
I/DEBUG   (   27): Build fingerprint: 
'generic/sdk/generic/:2.0/ECLAIR/17704:eng/test-keys'
I/DEBUG   (   27): pid: 234, tid: 234  >>> de.paluno.scanandpay <<<
I/DEBUG   (   27): signal 4 (SIGILL), fault addr 80c00000
I/DEBUG   (   27):  r0 80e2c6b8  r1 80d46cc9  r2 afe0f9f8  r3 afe0f9f8
I/DEBUG   (   27):  r4 80d83dc4  r5 be9bb754  r6 00000000  r7 00000001
I/DEBUG   (   27):  r8 ad00f380  r9 0000bd00  10 4104bc24  fp 00000000
I/DEBUG   (   27):  ip 80d83ee4  sp be9bb738  lr 80d46d49  pc 80c00000  cpsr 
a0000010
I/DEBUG   (   27):          #00  pc 00000000  
/data/data/de.paluno.scanandpay/lib/libtess.so
I/DEBUG   (   27):          #01  pc 00146d46  
/data/data/de.paluno.scanandpay/lib/libtess.so

Original issue reported on code.google.com by griebe.t...@gmail.com on 16 May 2011 at 3:20

GoogleCodeExporter commented 8 years ago
Hi,

The minimum sdk version needed is 2.2. If you try to deploy it on verison 
before 2.2. It crashes.

Original comment by srini....@gmail.com on 18 May 2011 at 4:02

GoogleCodeExporter commented 8 years ago
Hi, 

yes. I that is exactly the issue. still, more than 20 percent of active devices 
are pre 2.2 devices. 

Hence, the question is if there is any workaround to get it to work on pre 2.2 
platforms. So far, I narrowed it down to the gnustl_static library against 
which tesseract is compiled. 

Original comment by griebe.t...@gmail.com on 18 May 2011 at 6:02

GoogleCodeExporter commented 8 years ago
Hi, using NDK version 6 solves the problem for Android phones pre 2.2. Good 
luck. Volker

Original comment by Volker.S...@gmail.com on 17 Aug 2011 at 9:25

GoogleCodeExporter commented 8 years ago
Hi,

using NDK version 6 solves the problem for Android phones pre 2.2.
We tested it with a phone having Android version 2.1 and the OCR was working 
fine.

Best wishes,
Volker

Original comment by Volker.S...@gmail.com on 17 Aug 2011 at 9:30

GoogleCodeExporter commented 8 years ago
Hi,

using NDK version 6 solves the problem for Android phones pre 2.2.
We tested it with a phone having Android version 2.1 and the OCR was working 
fine.

Best wishes,
Volker

Original comment by Volker.S...@gmail.com on 17 Aug 2011 at 9:31

GoogleCodeExporter commented 8 years ago
Hi,

Was anyone able to successfully try this on Android Version 2.1 ? It works fine 
on 2.2 and not on 2.1...

Can you share the libraries and sample code for the version that works on 2.1 ?

Best regards,
vkasirajan

Original comment by vkasira...@gmail.com on 14 Oct 2011 at 6:56

GoogleCodeExporter commented 8 years ago
Hi vkasirajan,

If u read me comment above, you would have read that using the NDK version 6 
provided on the Android developer website will solve your problem. Just 
recompile the same libs you use with NDK 6 and it should run und 2.1 and below.
We did just that and for our project it is working. I am sorry that we can't 
provide any source code or libs.

Best regards,
Volker

Original comment by Volker.S...@gmail.com on 16 Oct 2011 at 9:40

GoogleCodeExporter commented 8 years ago
Hi Volker,

Thank you for your reply. As you suggested, I tried to recompile the libs using 
the NDK 6. I get the following error:

Unable to dlopen(/data/data/com.android.mytest/lib/liblept.so): Cannot load 
library: link_image[1721]:    30 could not load needed library 'libjpeg.so' for 
'liblept.so' (load_library[1051]: Library 'libjpeg.so' not found)

I took libjnigraphics.so and tried to load it using System.loadLibrary. This 
gives "UnsatisfiedLinkError". I used the 2.1 emulator as well as a 2.1 device. 
Both gives me the same errors.

All the library files are properly copied into the respective paths...

Any help, will be greately appreciated. I have attached the logs...

Best regards,
vkasirajan

Original comment by vkasira...@gmail.com on 16 Oct 2011 at 5:39

Attachments:

GoogleCodeExporter commented 8 years ago
Removed support for APIs < 8.

Original comment by alanv@google.com on 11 Sep 2012 at 8:06