Menu

#17 Segfault when creating ParsedDocument from Java

v4.x
closed
5
2012-09-27
2007-10-28
No

Passing a java-created ParsedDocument object to c++ code (e.g. indexEnvironment.addParsedDocument()) causes the jvm to crash. Reading a ParsedDocument passed from c++ code to java seems to be ok.

I have attached a Java snipplet that reproduces this crash.

The problem seem to be with the swig-declarations in ParsedDocument.i and the way the java ParsedDocument is converted to the c++ ParsedDocument equivalent. I have attached a suggested patch to CVS head that seems to fix this problem.

In addition, the constructor for ParsedDocument.TermExtent is not public. Patch also attached...

Discussion

  • Asgeir Frimannsson

    Java program that reproduces problem + suggested patch

     
  • David Fisher

    David Fisher - 2007-10-29

    Logged In: YES
    user_id=1463830
    Originator: NO

    Thank you for the excellent bug report and patch. CVS has been updated.

     

Log in to post a comment.