Tesseract OCR 2.01 Debug Assertion Failed! f:\dd\vctools\crt_bld\self_x86\crt\src\isctype.c

530 views
Skip to first unread message

joku

unread,
May 22, 2008, 2:33:06 PM5/22/08
to tesseract-ocr
On some tiffs, I'm getting the following error:

Debug Assertion Failed! f:\dd\vctools\crt_bld\self_x86\crt\src
\isctype.c
Expression:(unsigned)(c + 1) <= 256

I am using "eng" as my language and It's possible that there might be
some junk in the tif that's interpreted as something out of the ASCII
range. Could this be the reason?

Anyone have a fix for this?

jwes

unread,
May 23, 2008, 1:53:12 PM5/23/08
to tesseract-ocr
Thie looks like issue 106. Here is the text:

I managed to build tesseract and dlltest and they seem to work with
one
problem. When i run the debug version. I get an assert on a char
'Ä' (hex
c4) in dawg.cpp on line 149. The message is that the char is !<255.
The
code is:

isalpha (dummy_word [char_index]) &&

If I change it to

isalpha ((unsigned char)dummy_word [char_index]) &&

it works without problem. The problem seems to be that isalpha takes
an int
but the STRING class has signed chars so values > 0x7f are sign
extended. I
don't know if this patch is correct or hides some other problem

Joku Music

unread,
May 23, 2008, 2:03:19 PM5/23/08
to tesser...@googlegroups.com
Yeah, it only happens when I run on a debug build. The assertion isn't present in the release build, so I don't get that error on releases, but now I get garbled text on the ocr output. Maybe the assertion was trying to tell me something :P
It doesn't happen on the test images that come with tesseract, but it does happen on all of my images. I'm gonna check on what the difference between the images are and I'll post back...
 
Thanks for the reply.

nguyenq

unread,
May 23, 2008, 5:30:44 PM5/23/08
to tesseract-ocr
Reply all
Reply to author
Forward
0 new messages