-
Notifications
You must be signed in to change notification settings - Fork 740
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
tesseract 4.0.0-1.4.4 crashes on Mac OS #694
Comments
Send a patch as a pull request and I'll merge it! Thanks |
I've included the Please give it a try with the snapshots: http://bytedeco.org/builds/ |
Thank you a lot! I'll try it tonight and report results. |
Workaround included in version 1.5. Thanks for reporting! |
Hello Samuel, I'm sorry for buzzing you again regarding this issue but today I've got another Tesseract crash:
Prepending Maven/Gradle invocation with This time I switched to Leptonica 1.78.0, Javacpp 1.5 and Tesseract 4.0.0-1.5 including all required API changes. Any ideas what's wrong? |
Did you call |
Not explicitly. Where is it supposed to be called from? In the user code during initialization? |
Yes, just like in C/C++.
|
This bug is fixed in Tesseract 4.1 and later releases, so calling |
@stweil Tested with Tesseract 4.1.1 and Javacpp-presets 1.5.6. Thanks for reporting the fix! Moreover, I'm glad to see this bug finally fixed after about 10 years of "Won't fix" status! |
Hello Samuel,
the Audiveris project uses Javacpp since 2012 to access Tesseract.
Today I decided to switch to the recent Tesseract version that end up in the following JVM crash:
After searching for a while in the Tesseract issue tracker, I learned that this issue is probably caused by a wrong locale. So I've tried to run our software as follows:
LC_ALL=C ./gradlew run
It turned out to actually work.
I also tried the basic example here - it crashes as well when being invoked without LC_ALL=C.
That all reminds me of that "Illegal min or max specification" issue back to 2014. In those days we were repeatedly told that setting the right locale is user's responsibility, the Tesseract project doesn't maintain 3rd party Java wrappers and so on...
This issue has been finally fixed in SVN r1064 (now tesseract-ocr/tesseract@3a5f699) by replacing
fscanf
with the custom, locale-insensitivetfscanf
.This fix has been kept across 3.x releases but the introduction of the locale-sensitive
sscanf
in tesseract-ocr/tesseract@1cc5111 makes all 4.x releases to suffer from the same issue as 2014 again, at least from the Java's POV!It looks like our project has currently two inconvenient options:
I could file an issue on the Tesseract issue tracker but my bet is that I'll merely get an answer similar to this one: tesseract-ocr/tesseract#1010 (comment)
Do you suddenly have any idea what can be done on the Javacpp side to mitigate the problem?
Thanks a ton in advance!
P.S.: I'm running on Mac OS 11.13 (german) and JDK 1.8.0 202u...
The text was updated successfully, but these errors were encountered: