RaghavBhardwaj / tesseract-ocr

Automatically exported from code.google.com/p/tesseract-ocr
Other
0 stars 1 forks source link

Error: Illegal min or max specification! #1469

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Downloaded the leptonica 1.72
1.1. ./configure
1.2. make
1.3. sudo make install
1.4. sudo ldconfig

2. Downloaded wget tesseract 3.02
2.1. ./autogen.sh
2.2. ./configure
2.3. make
2.4. sudo make install
2.5. sudo ldconfig

3. Create a project on Eclipse Luna with de example code of Tess4J, with all 
the libraries imported on the classpath

What is the expected output? What do you see instead?
I was expecting a text from the image but I got this:

Error: Illegal min or max specification!
signal_termination_handler:Error:Signal_termination_handler called:Code 5002
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fc949889a2c, pid=31846, tid=140503037437696
#
# JRE version: Java(TM) SE Runtime Environment (8.0_45-b14) (build 1.8.0_45-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode linux-amd64 
compressed oops)
# Problematic frame:
# C  [libtesseract.so+0x24ba2c]  ERRCODE::error(char const*, TessErrorLogCode, 
char const*, ...) const+0x15c
#
# Core dump written. Default location: 
/home/gsouza/Dev/workspace/ocr/tess4j/core or core.31846
#
# An error report file with more information is saved as:
# /home/gsouza/Dev/workspace/ocr/tess4j/hs_err_pid31846.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

What version of the product are you using? On what operating system?
LinuxMint 17.1
Eclipse Luna
Tesseract 3.03
Leptonica 1.72

I have already set the LC_NUMERIC=C through the terminal. But the error pesists.
I have tried setting the LC_NUMERIC using setTessVariable but it isn't working 
either

public class OCR {

    public static void main(String[] args) {
            File arquivo = new File("/home/gsouza/Desktop/imagemocr.jpg");
            Tesseract tesseract = Tesseract.getInstance();
            tesseract.setTessVariable("LC_NUMERIC", "C");

        try {
            String result = tesseract.doOCR(arquivo);

            System.out.println(result);
        } catch(TesseractException e) {
            e.printStackTrace();
        }
    }

}

Original issue reported on code.google.com by gso...@reglare.com.br on 30 Apr 2015 at 6:25

GoogleCodeExporter commented 9 years ago

Original comment by zde...@gmail.com on 1 May 2015 at 7:21