Closed mikepfirrmann closed 11 years ago
I'm fairly sure it's an upstream bug, you should open an issue on their bugtracker.
I verified it's an upstream bug, if I omit it->Orientation(&result.orientation, &result.writing_direction, &result.textline_order, &result.deskew_angle);
it doesn't crash.
A temporary solution is to pass a block instead of returning an array, and then avoid calling orientation on the passed object.
When you don't pass a block it caches all the data in the element because it stays alive only while the iterator is alive too.
When attempting to use the
tesseract-ocr
gem to OCR the attached image, Ruby crashes.Demo script Crash dump
Image:
Using Ubuntu 12.04, with
If I run ImageMagick's
identify -verbose /path/to/image.png
, it reports the Orientation as being "Undefined". Based on the stack dump, I suspect that inability to handle images without defined orientations may be the problem.