Ubuntu 12: sikuli-ide crashes with Tesseract 3.0 --- language files missing ???

Bug #979524 reported by fossin
48
This bug affects 7 people
Affects Status Importance Assigned to Milestone
SikuliX
Fix Released
Critical
RaiMan

Bug Description

********** fixed in the Debian world

*********** Ubuntu 12.04 *****************************
--- from comment #9 (thanks Robert Campbell)
Very happy that sikuli is working now on my Ubuntu 12.04.
In summary, after doing the:
sudo apt-get install sikuli-ide
to get sikuli installed,
you must also do (again, Florian points this out earlier):
sudo apt-get install tesseract-ocr-eng
sudo apt-get install libswing-layout-java
and wrap up with what I stated at the beginning of this:
if there is a /tmp/sikuli directory, do: sudo rm -r /tmp/sikuli
and wrap up with:
sudo mkdir -p /tmp/sikuli
sudu ln -s /usr/share/tesseract-ocr/tessdata/ /tmp/sikuli

That's how I got sikuli to run as expected on Ubuntu 12.04.

----------------------------------------------

I have default precise pangolin ubuntu install with sikuli on top of it. When I run sikuli-ide and try to create an script via gui, as sson as I am done with taking a screenshot and selecting the area to "Click" on sikluli-ide crashes. Please see log below.

$ sikuli-ide
[info] locale: en_US
Error opening data file /tmp/sikuli/tessdata/eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory.
Failed loading language 'eng'
Tesseract couldn't load any languages!
vlog 1 Input
vlog 1 Canny
vlog 1 AdaptiveThresholded
vlog 1 LongLinesFound
vlog 1 LongLinesRemoved
vlog 1 NonEdgeRemoved
vlog 1 blobs-extracted
vlog 1 blobs-filtered
vlog 1 lineblobs
vlog 1 lineblobs-filtered
vlog 1 lineblobs-merged
vlog 1 paragblobs
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x022bfb6d, pid=23685, tid=3030788928
#
# JRE version: 7.0_03-b147
# Java VM: OpenJDK Client VM (22.0-b10 mixed mode, sharing linux-x86 )
# Derivative: IcedTea7 2.1.1pre
# Distribution: Ubuntu precise (development branch), package 7~u3-2.1.1~pre1-1ubuntu1
# Problematic frame:
# C [libtesseract.so.3+0x226b6d] tesseract::Classify::CharNormClassifier(TBLOB*, DENORM const&, INT_TEMPLATES_STRUCT*, ADAPT_RESULTS*)+0x61
#
# Core dump written. Default location: /home/code/core or core.23685
#
# An error report file with more information is saved as:
# /home/code/hs_err_pid23685.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
# https://bugs.launchpad.net/ubuntu/+source/openjdk-7/
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted (core dumped)

Installed packages are

$ dpkg --list | grep sikuli
ii libsikuli-script-java 1.0~x~rc3.tesseract3-dfsg1-1 Visual scripting API for jython
ii libsikuli-script-jni 1.0~x~rc3.tesseract3-dfsg1-1 Native libs for libsikuli-java
ii sikuli-ide 1.0~x~rc3.tesseract3-dfsg1-1 IDE to develop sikuli scripts

Revision history for this message
RaiMan (raimund-hocke) wrote :

--- Tesseract couldn't load any languages!
Seems, that Tesseract is not installed correctly on your system

summary: - sikuli-ide crashes on precise pangolin
+ Ubuntu: sikuli-ide crashes on precise pangolin
Revision history for this message
fossin (krishnaact) wrote : Re: [Bug 979524] Re: sikuli-ide crashes on precise pangolin

Googling for "Tesseract couldn't load any languages!"
I find a couple of bugs filed. One in debian and one in ubuntu apart from
this one.

Most likely this is not a problem with my system, but a more general
problem with either the packaging of tesseract or with sikuli-ide.

Thanks
Krishna

From: RaiMan <email address hidden>
To: <email address hidden>
Sent: Wednesday, April 11, 2012 11:42 PM
Subject: [Bug 979524] Re: sikuli-ide crashes on precise pangolin

--- Tesseract couldn't load any languages!
Seems, that Tesseract is not installed correctly on your system

** Summary changed:

- sikuli-ide crashes on precise pangolin
+ Ubuntu: sikuli-ide crashes on precise pangolin

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/979524

Title:
  Ubuntu: sikuli-ide crashes on precise pangolin

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/979524/+subscriptions

Revision history for this message
RaiMan (raimund-hocke) wrote : Re: Ubuntu: sikuli-ide crashes on precise pangolin

When using Tesseract 3.0, you have to install the language support files separately
(http://code.google.com/p/tesseract-ocr/wiki/ReadMe)

Might cause the problem in your case.

If Tesseract 3.0 does not work, try to install the prior version 2.04 instead (which is expected by the current version of Sikuli).

I do not know, wether Tesseract 3.0 should be compatible towards Sikuli out of the box.

RaiMan (raimund-hocke)
summary: - Ubuntu: sikuli-ide crashes on precise pangolin
+ Ubuntu 12: sikuli-ide crashes with Tesseract 3.0 --- language files
+ missing ???
Revision history for this message
fossin (krishnaact) wrote : Re: [Bug 979524] Re: Ubuntu 12: sikuli-ide crashes with Tesseract 3.0 --- language files missing ???

The upstream debian bug for this problem is

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=667513

Revision history for this message
fossin (krishnaact) wrote :

Fixed in upstream (at debian), please pull it.

http://packages.debian.org/source/sid/sikuli

RaiMan (raimund-hocke)
Changed in sikuli:
status: New → Fix Released
description: updated
Revision history for this message
fossin (krishnaact) wrote :

When will this fix make it to Precise Pangolin? Will it?

Revision history for this message
Florian Hars (hars) wrote :

The workaround is to just install the addidional dependencies by hand

sudo apt-get install tesseract-ocr-eng
sudo apt-get install libswing-layout-java

Revision history for this message
Florian Hars (hars) wrote :

You must also do

mkdir -p /tmp/sikuli
ln -s /usr/share/tesseract-ocr/tessdata/ /tmp/sikuli

(probably every time you start sikuli-ide) as sikuli-ide completely ignores the TESSDATA_PREFIX environment variable that could tell it where to look for its data.

Revision history for this message
Robert Campbell (rcampbellnc) wrote :

Adding a note to this - in my /tmp dir, a sikuli directory already exists, thus I could not create the link there.
First I did a:
sudo rm -r /tmp/sikuli
followed by Florian's suggestions above (prefaced with sudo):
sudo mkdir -p /tmp/sikuli
sudu ln -s /usr/share/tesseract-ocr/tessdata/ /tmp/sikuli

After this, I do not have the crash associated with libtesseract.so.3

Very happy that sikuli is working now on my Ubuntu 12.04.
In summary, after doing the:
sudo apt-get install sikuli-ide
to get sikuli installed, you must also do (again, Florian points this out earlier):
sudo apt-get install tesseract-ocr-eng
sudo apt-get install libswing-layout-java
and wrap up with what I stated at the beginning of this:
if there is a /tmp/sikuli directory, do: sudo rm -r /tmp/sikuli
and wrap up with:
sudo mkdir -p /tmp/sikuli
sudu ln -s /usr/share/tesseract-ocr/tessdata/ /tmp/sikuli

That's how I got sikuli to run as expected on Ubuntu 12.04.

RaiMan (raimund-hocke)
description: updated
Changed in sikuli:
milestone: none → x1.0
assignee: nobody → RaiMan (raimund-hocke)
status: Fix Released → In Progress
Revision history for this message
Neal McBurnett (nealmcb) wrote :

I modified the procedure in the revised description (and comment #9) and it worked for me. Besides ensuring that I had all the packages mentioned, I also did the /tmp/sikuli steps, but not as sudo, since that seems odd.
Thanks for the workaround. I'm also curious what the changes are in Debian, and how the "in progress" work differs from that.

Revision history for this message
RaiMan (raimund-hocke) wrote :

@Neal
-- fixed in Debian world
... simply means, that there are packages for Sikuli X available, that simply run out of the box

-- in progress
... is only a marker for me, that I want to visit this packaging stuff again in the next time when the new version is running on my Ubuntu 12

RaiMan (raimund-hocke)
tags: added: fkt-text ubuntu
RaiMan (raimund-hocke)
Changed in sikuli:
importance: Undecided → Medium
RaiMan (raimund-hocke)
tags: added: build
RaiMan (raimund-hocke)
Changed in sikuli:
importance: Medium → High
RaiMan (raimund-hocke)
Changed in sikuli:
status: In Progress → Fix Committed
importance: High → Critical
RaiMan (raimund-hocke)
Changed in sikuli:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.