jpl and segmentation fault
I'm writing some code in prolog using jpl and unpredictably it gives me segmentation fault, so I write the following test code to understand if there is a fault in program or there is a problem with jpl.
prova :-
jpl_new('test',[],W),
jpl_call(W,hello,[],_).
p(0):-writeln('end').
p(N):- format('p(~p)~n',[N]),prova,N1 is N-1, p(N1).
the java code is the following
public class test {
public void hello(){
System.out.println("hello world");
}
}
the problem it's the same :
it prints hello world a random number times then give me segmentation fault :(
?-p(500).
p(500)
hello world
....
p(361)
hello world
p(360)
ERROR: jni_func/3: Caught signal 11 (segv)
?- p(500).
p(500)
ERROR: jni_func/3: Caught signal 11 (segv)
?-
please, please help me