Issue on multithreaded app

Paulo
2014-03-30
2014-04-01
  • Paulo

    Paulo - 2014-03-30

    Hello,

    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..

    Thanks

     
  • Paulo

    Paulo - 2014-03-30

    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)
    Problematic frame:
    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.

     
    Last edit: Paulo 2014-03-30
  • Paulo

    Paulo - 2014-03-31

    Awesome! It worked :)

    Thanks for the quick reply.

    By the way, is there way to catch these API errors before they crash the JVM?

    Thanks

     
  • Quan Nguyen

    Quan Nguyen - 2014-04-01

    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.

     
    Last edit: Quan Nguyen 2014-04-01

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks