Multiple instances of OCR causes Java crash
I am trying to run two processes at the same time with two browsers using Selenium and Sikuli. When Sikuli does an OCR of an image on both threads at the same time, it causes Java to crash. When I put a semaphore there so it will only do one at a time, it works fine. But this will be much slower when many browsers are running. Here is the code:
byte[] thisScreen = ((TakesScreensh
BufferedImage screenImage = ImageIO.read(new ByteArrayInputS
Image thisImage = new Image(screenImage);
String pageText = thisImage.text();
It causes this Java error:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_
#
# 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 windows-amd64 compressed oops)
# Problematic frame:
# C [libtesseract-
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Project\
#
# If you would like to submit a bug report, please visit:
# http://
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Dan
- Solved:
- Last query:
- Last reply: