Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault on blank image #37

Open
whoward opened this issue Apr 25, 2014 · 6 comments
Open

Segfault on blank image #37

whoward opened this issue Apr 25, 2014 · 6 comments

Comments

@whoward
Copy link

whoward commented Apr 25, 2014

Unfortunately it seems we get a segfault when you try to detect lines on a blank image. In our use case its entirely possible for this to happen as we apply a pre-filter to try to filter out only text in a given image.

Here is the commands used:

2.0.0-p451 :001 > require 'tesseract-ocr'
 => true 
2.0.0-p451 :002 > eng = Tesseract::Engine.new {|e| e.language = :eng }
 => #<Tesseract::Engine:0x0000000153f150 @api=#<Tesseract::API:0x0000000153ef98 @internal=#<FFI::AutoPointer address=0x00000001b69e10>>, @initializing=false, @init=#<Proc:0x0000000153f100@(irb):2>, @path=".", @language=:eng, @mode=:DEFAULT, @variables={}, @config=[], @rectangle=[]> 
2.0.0-p451 :003 > eng.image = "test.png"
 => "test.png" 
2.0.0-p451 :004 > eng.lines

And the trace can be found here: https://gist.github.com/whoward/4ad61571d6481a00e725

And finally the image used is here: https://www.dropbox.com/s/3lx60kshyj8qkvi/test.png

I don't have a workaround yet

@moritzh
Copy link

moritzh commented Oct 17, 2014

Hi, have you solved your problem in the meantime? If not, could you re upload the test image? Thank you!

@whoward
Copy link
Author

whoward commented Oct 17, 2014

Hello, we didn't solve the problem and just ended up going with a shell solution but for reference this is the test image:

https://dl.dropboxusercontent.com/u/76484219/test.png

@moritzh
Copy link

moritzh commented Oct 17, 2014

It seems to me (and I've just validated that using your and the other issues' test file) that this is in fact the same problem as described in #16 .

@whoward
Copy link
Author

whoward commented Oct 17, 2014

true, could very well be an upstream issue

@moritzh
Copy link

moritzh commented Oct 17, 2014

I "fixed" (well, not really, just commented some stuff out) it in a fork here, maybe it helps somebody else — our problem is resolved.

Am 17.10.2014 um 20:55 schrieb William Howard notifications@github.com:

true, could very well be an upstream issue


Reply to this email directly or view it on GitHub.

@ybur-yug
Copy link

@moritzh I am having a similar issue. Is your fork still working properly for this? Mine is not off a blank image but the segfault trace is eerily similar. I figured I would post here before opening a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants