I'm currently using Tess4j together with Akka, and when two actors (threads) happens to be doing OCR in parallel, a crash on the C++ TessAPI kills the JVM.
This is the error that shows up on my mac os bash
java(878,0x123cf6000) malloc: *** error for object 0x7fc83ad14860: pointer being freed was not allocated
There's a full core dump of the error, if that's useful, let me know and I'll happily provide it.
If I knew a little bit more of C++ I could help solving this issue, but I'm afraid I'm too rusty to be any help..
I've run it in an linux machine, wondering if it may be a problem with my mac os compilation. I've got this fragment of core dump:
A fatal error has been detected by the Java Runtime Environment:
SIGSEGV (0xb) at pc=0x00007feec010fba2, pid=20129, tid=140663476242176
JRE version: OpenJDK Runtime Environment (7.0_51) (build 1.7.0_51-b00)
Java VM: OpenJDK 64-Bit Server VM (24.45-b08 mixed mode linux-amd64 compressed oops)
C [libtesseract.so+0x1d3ba2] tesseract::Classify::ClassAndConfigIDToFontOrShapeID(int, int) const+0x12
If there's any information I can provide to help, feel free to ask.
Can you try the Tesseract1 API? A developer had success with it for multi-threaded app.
Awesome! It worked :)
Thanks for the quick reply.
By the way, is there way to catch these API errors before they crash the JVM?
If the exceptions originate in the native code, I imagine you would have to find a way to catch and handle them from within the native code. If an exception is allowed to propagate to the Java layer, it will crash the JVM.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.