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

Text2image SIGSEGV on Linux #399

Closed
Shreeshrii opened this issue Aug 29, 2016 · 6 comments
Closed

Text2image SIGSEGV on Linux #399

Shreeshrii opened this issue Aug 29, 2016 · 6 comments

Comments

@Shreeshrii
Copy link
Collaborator

Shreeshrii commented Aug 29, 2016

@Shreeshrii @stweil : please create separate issue for command that crash on linux, so we can track it.

That command also crashes with SIGSEGV on Linux. This is a bug which needs a fix.

text2image --fonts_dir= --text ./langdata/san.training_text --outputbase san.exp-1 --ptsize=32 --strip_unrenderable_words --fontconfig_refresh_config_file=false --leading=32 --char_spacing=0.0 --exposure=-1 --find_fonts --min_coverage=.9 --degrade_image=1 --underline_start_prob=.05 --underline_continuation_prob=.01

Ref: Issue 396

@zdenop
Copy link
Contributor

zdenop commented Aug 29, 2016

It does not crash on openSUSE linux:

text2image_log.txt

@stweil
Copy link
Contributor

stweil commented Aug 29, 2016

I noticed that the crash is a "feature", caused by an assertion if langdata/san.training_text does not exist. Tesseract forces a SIGSEGV for assertions to improve debug information.

IMHO missing data is a typical user error which should be reported, but not throw an assertion. So replacing the assertion by a conditional tprintf(...); exit(1); in training/fileio.cpp might be the correct solution. If you agree, I'll send a pull request.

@amitdo
Copy link
Collaborator

amitdo commented Aug 29, 2016

@stweil, right!
See #345, #349

@zdenop
Copy link
Contributor

zdenop commented Aug 29, 2016

@stweil OK

@Shreeshrii
Copy link
Collaborator Author

FYI, in my testing on Windows 10, the crash was unrelated to 'langdata/san.training_text does not exist' since the file was very much there.

I will test further after new windows binary is made available with all these new patches.

Thanks for looking into this.

@stweil
Copy link
Contributor

stweil commented Aug 30, 2016

@amitdo, thanks for the pointers. PR #402 now does something similar for fileio.

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

No branches or pull requests

4 participants