JVM chrash on ListSentenceIterator.next()

Submitted by carlesg on Wed, 08/17/2016 - 11:15
Forums

Hello,

When I process the results of the analysis that Freeling has made, the JVM I run crashes and dies.
The trace says that the error is in the native Freeling library:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x19ea4fd3, pid=10300, tid=9224
#
# JRE version: 6.0_45-b06
# Java VM: Java HotSpot(TM) Client VM (20.45-b01 mixed mode windows-x86 )
# Problematic frame:
# C [libfreeling.dll+0xb4fd3]

The error arise when I run the method 'sIt.next();' for the second time, on a single sentence paragraph. The first one runs ok. It seems like the previous 'sIt.hasNext()' returns true, when it should return false. The test sentence was : 'Dame los recibos de teléfono del último año entre 10 y 90 €'.

I run freeling 4.0 on a java environment on a Windows 7 machine.

My java code looks like:

protected static void processResults(Document doc) {
if (doc != null) {
ListParagraphIterator pIt = new ListParagraphIterator(doc);
while (pIt.hasNext()) {
ListSentenceIterator sIt = new ListSentenceIterator(pIt.next());
while (sIt.hasNext()) { //Per cada frase
Sentence s = sIt.next();
DepTree depNode = s.getDepTree();
// ... Do things ....

}
}
}
}

The dumps contains this stack on the failing thread:

Stack: [0x19b20000,0x19b70000], sp=0x19b6efe0, free space=315k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libfreeling.dll+0xae9f8] freeling::hmm_tagger::is_forbidden+0xdf8
C [libfreeling.dll+0xb0617] freeling::hmm_tagger::is_forbidden+0x2a17
C [libfreeling.dll+0xb4fda] freeling::sentence::clone+0x4a
C [libfreeling.dll+0xb2159] freeling::sentence::sentence+0xf9
C [freeling_javaAPI.dll+0x2c4fe] ListIterator::next+0x1e
C [freeling_javaAPI.dll+0x4607] Java_edu_upc_freeling_freelingJNI_ListSentenceIterator_1next+0x37
j edu.upc.freeling.freelingJNI.ListSentenceIterator_next(JLedu/upc/freeling/ListSentenceIterator;)J+0
j edu.upc.freeling.ListSentenceIterator.next()Ledu/upc/freeling/Sentence;+9

Where the error is? What can I do?