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

Crash in ComputeGradient (coutln.cpp) #93

Closed
Aaargh20318 opened this issue Sep 14, 2015 · 1 comment
Closed

Crash in ComputeGradient (coutln.cpp) #93

Aaargh20318 opened this issue Sep 14, 2015 · 1 comment

Comments

@Aaargh20318
Copy link

I'm currently seeing a SIGBUS crash in ComputeGradient on an Android app I'm working on, I can reliably reproduce the crash on a specific phone (Samsung Galaxy S4 Mini, Snapdragon 400), on another device (OnePlus One, Snapdragon 801)

Backtrace (app name removed):

D/CrashAnrDetector( 656): backtrace:
D/CrashAnrDetector( 656): #00 pc 000a746c /data/app-lib/APPNAME/libtess.so
D/CrashAnrDetector( 656): #1 pc 000a8935 /data/app-lib/APPNAME/libtess.so (C_OUTLINE::ComputeEdgeOffsets(int, Pix_)+160)
D/CrashAnrDetector( 656): #2 pc 000b81b1 /data/app-lib/APPNAME/libtess.so
D/CrashAnrDetector( 656): #3 pc 000a3a1d /data/app-lib/APPNAME/libtess.so (BLOBNBOX::ComputeEdgeOffsets(Pix_, Pix_, BLOBNBOX_LIST_)+212)
D/CrashAnrDetector( 656): #4 pc 000a42b7 /data/app-lib/APPNAME/libtess.so (TO_BLOCK::ComputeEdgeOffsets(Pix_, Pix_)+14)
D/CrashAnrDetector( 656): #5 pc 0011f099 /data/app-lib/APPNAME/libtess.so (tesseract::Textord::TextordPage(tesseract::PageSegMode, FCOORD const&, int, int, Pix_, Pix_, Pix_, bool, BLOBNBOX_LIST_, BLOCK_LIST_, TO_BLOCK_LIST_)+72)

I added some debug output to ComputeGradient and it turns out it crashes when y = -2. , after adding a few more lines of debug logging in ComputeEdgeOffsets I see that start.y() is 2 larger than 'height'. If it crashes, it always does so on line 2 of ComputeGradient. SIGBUS would imply an unaligned memory access but as far as I can tell that function only deals with single byte access which shouldn't cause an issue. The -2 y coordinate also seems suspect but I don't know enough about Tesseract and Pix to know if that might be a problem or not.

@zdenop
Copy link
Contributor

zdenop commented Mar 15, 2016

Please see FAQ: If you found a bug - please create an issue: Please make sure you are able to replicate the problem with tesseract executables on Linux or Windows. For other platforms or external/your programs (including tesseract wrappers) please use the tesseract forums.

@zdenop zdenop closed this as completed Mar 15, 2016
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

2 participants