Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/337.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Tesseract Api崩溃_Java_Ocr_Tesseract - Fatal编程技术网

Java Tesseract Api崩溃

Java Tesseract Api崩溃,java,ocr,tesseract,Java,Ocr,Tesseract,我正在使用tesseract。我使用2个队列将图像转换为文本。当我运行多个进程时,我的tesseract api失败并给出致命错误 错误1::: Error in pixCreateNoInit: pix_malloc fail for data Error in pixCreate: pixd not made Error in pixGetData: pix not defined Error in pixGetWpl: pix not defined # # A fatal error h

我正在使用tesseract。我使用2个队列将图像转换为文本。当我运行多个进程时,我的tesseract api失败并给出致命错误

错误1:::

Error in pixCreateNoInit: pix_malloc fail for data
Error in pixCreate: pixd not made
Error in pixGetData: pix not defined
Error in pixGetWpl: pix not defined
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fcc74e6245f, pid=7113, tid=0x00007fcc77be2700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_101-b13) (build 1.8.0_101-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.101-b13 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# 09:50:22.551 [pool-4-thread-5] INFO  o.a.p.pdmodel.font.PDCIDFontType2 - OpenType Layout tables used in font Arial are not implemented in PDFBox and will be ignored
C  [libtesseract.so.3.0.3+0xe145f]  tesseract::ImageThresholder::SetImage(unsigned char const*, int, int, int, int)+0x9f
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /tmp/hs_err_pid7113.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.
#
Error in pixCreateNoInit: pix_malloc fail for data
Error in pixCreate: pixd not made
Error in pixGetData: pix not defined
Error in pixGetWpl: pix not defined
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fcc74e6245f, pid=7113, tid=0x00007fcc77be2700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_101-b13) (build 1.8.0_101-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.101-b13 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# 09:50:22.551 [pool-4-thread-5] INFO  o.a.p.pdmodel.font.PDCIDFontType2 - OpenType Layout tables used in font Arial are not implemented in PDFBox and will be ignored
C  [libtesseract.so.3.0.3+0xe145f]  tesseract::ImageThresholder::SetImage(unsigned char const*, int, int, int, int)+0x9f
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /tmp/hs_err_pid7113.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 bugSuccessfully launced OCR workers
当我去#/tmp/hs#u err#u pid7113.log

我发现:

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.sun.jna.Native.invokeVoid(JI[Ljava/lang/Object;)V+0
j  com.sun.jna.Function.invoke([Ljava/lang/Object;Ljava/lang/Class;Z)Ljava/lang/Object;+30
J 11588 C1 com.sun.jna.Function.invoke(Ljava/lang/Class;[Ljava/lang/Object;Ljava/util/Map;)Ljava/lang/Object; (538 bytes) @ 0x00007f7ff2343c9c [0x00007f7ff23427a0+0x14fc]
J 11587 C1 com.sun.jna.Library$Handler.invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; (320 bytes) @ 0x00007f7ff20b4c34 [0x00007f7ff20b2f80+0x1cb4]
j  com.sun.proxy.$Proxy6.TessBaseAPISetImage(Lnet/sourceforge/tess4j/ITessAPI$TessBaseAPI;Ljava/nio/ByteBuffer;IIII)V+52
j  net.sourceforge.tess4j.Tesseract.setImage(IILjava/nio/ByteBuffer;Ljava/awt/Rectangle;I)V+37
j  net.sourceforge.tess4j.Tesseract.setImage(Ljava/awt/image/RenderedImage;Ljava/awt/Rectangle;)V+27
j  net.sourceforge.tess4j.Tesseract.doOCR(Ljava/util/List;Ljava/lang/String;Ljava/awt/Rectangle;)Ljava/lang/String;+60
j  net.sourceforge.tess4j.Tesseract.doOCR(Ljava/util/List;Ljava/awt/Rectangle;)Ljava/lang/String;+4
j  net.sourceforge.tess4j.Tesseract.doOCR(Ljava/awt/image/BufferedImage;Ljava/awt/Rectangle;)Ljava/lang/String;+6
j  net.sourceforge.tess4j.Tesseract.doOCR(Ljava/awt/image/BufferedImage;)Ljava/lang/String;+3
j 

我也有类似的问题。如果将
doOCR()
文件
作为输入参数而不是
缓冲图像
,则问题消失