Skip to content

Infinite recursion for tesseract --list-langs with conda-forge binary #4230

@jonashaag

Description

@jonashaag

Current Behavior

tesseract --list-langs goes into infinite loop on macOS if TESSDATA_PREFIX is empty.

macOS Instruments shows infinite recursion in addAvailableLanguages, and a LOT of stat64 calls (multiple 10k per second).

Expected Behavior

Should not go into infinite recursion

Suggested Fix

No response

tesseract -v

tesseract 5.3.4
leptonica-1.83.1
libgif 5.2.1 : libjpeg 8d (libjpeg-turbo 3.0.0) : libpng 1.6.43 : libtiff 4.6.0 : zlib 1.2.13 : libwebp 1.3.2 : libopenjp2 2.5.2
Found NEON

Operating System

macOS 14 Sonoma

Other Operating System

No response

uname -a

Darwin ... 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:41 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8103 arm64

Compiler

From conda-forge

CPU

No response

Virtualization / Containers

None

Other Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions