Skip to content

Fix asynchronous caching bug #666

@Balearica

Description

@Balearica

There are currently many issues that appear to stem from 2 problems in how caching works at present.

  1. We assume that workers are created synchronously, and violating this assumption creates invalid cache files
  2. We assume that all cache files are valid

The former appears to be the most common cause of invalid caching data (as this is non-obvious to users). However, cache may be invalid for other reasons. For example, until the last version cache was often invalid because langData responses were cached (see #585). Therefore, it is possible that not all bugs listed below were directly caused by creating workers asynchronously, but hopefully solving the async issue will solve most of it.

Related issues:

  1. Worker loading language traineddata progress 0 #414
  2. Stuck on "loading language traineddata" #439
  3. Tesseract couldn't load any languages #462
  4. Error: Error: UNKNOWN: unknown error, open '\eng.traineddata' CRASH #536
  5. Cannot use cachePath with Scheduler #576
  6. Querying from multiple processes #579
  7. Node.js: Loading corrupted language trained data does not throw an error #602

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