Javacpp-presets: "Error: Illegal Parameter specification!" in a Linux process invoking tesseract

Created on 18 Jul 2018  路  3Comments  路  Source: bytedeco/javacpp-presets

When calling the "api.GetUTF8Text()" I receive a SIGSEV, after the log:

Warning. Invalid resolution 0 dpi. Using 70 instead.

Error: Illegal Parameter specification!
A fatal error has been detected by the Java Runtime Environment:
"Fatal error encountered!" == nullptr:Error:Assert failed:in file globaloc.cpp, line 75

So it seems tesseract is invoked but then seems to have a problem with a parameter. (which one?)

  • tried on two Linux machines, identical result
  • tried with different languages
  • tried with different LC_NUMERIC settings (some info in the internet suggest a problem with locales)
  • works on Windows
  • tesseract works fine using its binaries on the command line
  • also tried with tess4J - there i receive SIGSEV as well, but without different log ("Tesseract couldn't load any languages!")

My config:

        <dependency>
            <groupId>org.bytedeco.javacpp-presets</groupId>
            <artifactId>tesseract-platform</artifactId>
            <version>4.0.0-beta.3-1.4.2</version>
        </dependency>
bash/:~$ tesseract -v
tesseract 4.0.0-beta.1
 leptonica-1.75.3
  libgif 5.1.4 : libjpeg 8d (libjpeg-turbo 1.5.2) : libpng 1.6.34 : libtiff 4.0.9 : zlib 1.2.11 : libwebp 0.6.1 : libopenjp2 2.3.0

 Found AVX
 Found SSE

OS: Ubuntu 18.04

Any help highly apprceiated - thanx!

question

All 3 comments

Does the sample code in the README.file work?
https://github.com/bytedeco/javacpp-presets/tree/master/tesseract#sample-usage

Yeah, that's a known issue:
https://github.com/tesseract-ocr/tesseract/issues/1010#issuecomment-320521746
You'll need to set your locale to something else to make Tesseract happy.

Thanks for directing me to the example, that was helpful.

It turned out that the example is runnable indeed, and then I could boil it down to that line:
api.SetPageSegMode(1);
mode 0 and 1 lead to a core dump, 2 or higher works.

I am not sure if this has something to do with the locale (tesseract internally), since I tried out a few variants, with no change to the problems. Additonally, the problem exists both on my workstation (locale de_AT) and the server (locale en_US).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

blueberry picture blueberry  路  34Comments

nanguantong picture nanguantong  路  25Comments

eix128 picture eix128  路  23Comments

archenroot picture archenroot  路  23Comments

kusaanko picture kusaanko  路  43Comments