duncantl / Rtesseract

Interface to tesseract OCR system.
12 stars 4 forks source link

Memory leak when running through Sweave/knitr #3

Closed mespe closed 7 years ago

mespe commented 7 years ago

When compiling a document using Sweave/knitr, the RAutoGenRunTime library does not appear to get loaded, resulting in the document not getting compiled (knitr/Sweave fails) and these errors print:

ObjectCache(0x7f6b6aa1cf20)::~ObjectCache(): WARNING! LEAK! object 0x3d9a1e0 still has count 3 (id /usr/share/tessdata/eng.traineddatapunc-dawg) ObjectCache(0x7f6b6aa1cf20)::~ObjectCache(): WARNING! LEAK! object 0x3d99210 still has count 3 (id /usr/share/tessdata/eng.traineddataword-dawg) ObjectCache(0x7f6b6aa1cf20)::~ObjectCache(): WARNING! LEAK! object 0x3d99020 still has count 3 (id /usr/share/tessdata/eng.traineddatanumber-dawg) ObjectCache(0x7f6b6aa1cf20)::~ObjectCache(): WARNING! LEAK! object 0x3d990c0 still has count 3 (id /usr/share/tessdata/eng.traineddatabigram-dawg) ObjectCache(0x7f6b6aa1cf20)::~ObjectCache(): WARNING! LEAK! object 0x3d98d20 still has count 3 (id /usr/share/tessdata/eng.traineddatafreq-dawg)

If library(RAutoGenRunTime) is included in the .Rnw doc, then the above goes away and the doc compiles, but gives these errors:

## Warning: no function found corresponding to methods exports from ’RAutoGenRunTime’ for: ’coerce’, ’show’

mespe commented 7 years ago

This appears to have been a bug with Tesseract. Fixed with Tesseract 4.00.00dev.