x 1.0rc1: Linux: Fedora 14: Capture crashes Sikuli - workaround

Bug #702625 reported by Edu
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SikuliX
In Progress
Low
RaiMan

Bug Description

Sikuli version: Sikuli-X-1.0rc1
OS: Fedora 14

To reproduce:
1. Launch Sikuli-IDE from the command line with sikuli-ide.sh.
2. Click the capture button.
3. After the delay, select something.

Result: Sikuli crashes and the following message appears in the shell: "Unable to load unicharset file /tmp/sikuli/tessdata/eng.unicharset".

The file /tmp/sikuli/tessdata/eng.unicharset exists but is empty. The reason is that the tesseract OCR resources are not found (writeFileList in sikuli-script/src/main/java/org/sikuli/script/ResourceExtractor.java:21) and the NullPointerException is ignored. The empty file causes tesseract to crash.

I'm using the tesseract 2.04 Fedora RPM. The resource files are in /usr/share/tesseract/tessdata. Adding this path to the TESSERACT_DATA_DIR confsets in cmake_modules/common.cmake fixes the problem.

Tags: build ubuntu
Edu (karlmicha)
Changed in sikuli:
assignee: nobody → Edu (karlmicha)
Edu (karlmicha)
description: updated
Revision history for this message
Arnaud Gelas (arnaudgelas) wrote :

In my case on Fedora 14 (64 bits), I had to recompile tesseract 2.04 myself (cause it was not compiled with -fPIC).

Even if I provide the right address for TESSERACT_DATA_DIR in the CMakeCache.txt, or add the corresponding address in cmake_modules/common.cmake, it crashes...

Revision history for this message
Edu (karlmicha) wrote :

After you add the path to common.cmake, delete the sikuli-script/build, sikuli-ide/build and sikuli-script/target/jar/tessdata directories, then build from scratch as described in build-linux.txt. The tesseract data dir is determined by cmake and the tesseract files are copied to sikuli-script/target/jar/tessdata by cmake. It took me a while to figure this out but after these steps Sikuli does not crash anymore.

Revision history for this message
Edu (karlmicha) wrote :
Changed in sikuli:
status: New → In Progress
RaiMan (raimund-hocke)
summary: - Capture crashes Sikuli on Fedora 14
+ x 1.0rc1: Linux: Fedora 14: Capture crashes Sikuli - workaround
Revision history for this message
Arnaud Gelas (arnaudgelas) wrote :

I have tried provided patch on Fedora 14 (64 bits), it does not solve the problem...

Revision history for this message
Tsung-Hsiang Chang (vgod) wrote :

Applied Edu's patch.

Changed in sikuli:
status: In Progress → Fix Committed
Revision history for this message
Edu (karlmicha) wrote : Re: [Bug 702625] Re: x 1.0rc1: Linux: Fedora 14: Capture crashes Sikuli - workaround

Did you remove the build directories and the tessdata directory in
sikuli-script/target/jar as described in comment #2 and then rebuild?

On Tue, Feb 8, 2011 at 1:00 PM, Arnaud Gelas <email address hidden> wrote:
> I have tried provided patch on Fedora 14 (64 bits), it does not solve
> the problem...
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/702625
>
> Title:
>  x 1.0rc1: Linux: Fedora 14: Capture crashes Sikuli - workaround
>
> Status in Sikuli:
>  In Progress
>
> Bug description:
>  Sikuli version: Sikuli-X-1.0rc1
>  OS: Fedora 14
>
>  To reproduce:
>  1. Launch Sikuli-IDE from the command line with sikuli-ide.sh.
>  2. Click the capture button.
>  3. After the delay, select something.
>
>  Result: Sikuli crashes and the following message appears in the shell:
>  "Unable to load unicharset file /tmp/sikuli/tessdata/eng.unicharset".
>
>  The file /tmp/sikuli/tessdata/eng.unicharset exists but is empty. The
>  reason is that the tesseract OCR resources are not found
>  (writeFileList in sikuli-
>  script/src/main/java/org/sikuli/script/ResourceExtractor.java:21) and
>  the NullPointerException is ignored. The empty file causes tesseract
>  to crash.
>
>  I'm using the tesseract 2.04 Fedora RPM. The resource files are in
>  /usr/share/tesseract/tessdata. Adding this path to the
>  TESSERACT_DATA_DIR confsets in cmake_modules/common.cmake fixes the
>  problem.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/sikuli/+bug/702625/+subscribe
>

Revision history for this message
Arnaud Gelas (arnaudgelas) wrote :

Edu,

Thanks!!!
Removing these directories actually solve my problem!

Is there a better way (not a hack) to solve this issue, or an automated one?

Arnaud

RaiMan (raimund-hocke)
tags: added: build
Changed in sikuli:
status: Fix Committed → In Progress
assignee: Edu (karlmicha) → RaiMan (raimund-hocke)
importance: Undecided → Low
tags: added: ubuntu
removed: capture crash linux
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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