Re: JPL crashes my entire JVM

Sergio Castro <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
Hello,

Just by chance, are you loading the file with the consult in the main app thread ? I have had problems with jpl in the past when trying to load a file in a different thread. Do you see any output error ?

Sergio
Le Vendredi 28 mars 2014 8h54, Bao <[email protected]> a écrit :
 
Hi All:
>
>
>I am running a Java project using JPL, I've compiled the source to get the libswipl a shared library according to https://code.google.com/p/javanaproche/wiki/HowToJPL
>
>
>and added in the jpl.jar and have the java.library.path point to libswipl but when I was calling 
>
>
>
>if (!Query.hasSolution("consult('"+queryFilePath+"').")) {            
>
>   throw new Exception();        
>
>}        
>
>else {
>
>   Compound query = new Compound( "myPredicate", new Term[]{X,Y,Z});
>
>   Query qu = new Query(query);
>
>   Hashtable[] tables = qu.allSolutions();
>
>}
>
>
>
>
>The jvm crashes, however, I did not know where exactly the error occurs since it did not occur every time so it's very difficult for me to catch it in debugging. Does anybody have any idea?
>
>
>
>
>I am running the project on Ubuntu 12.04 LTS 64 bit.
>
>
>
>
>Thanks a lot.
>-------------- next part --------------
>HTML attachment scrubbed and removed
>_______________________________________________
>SWI-Prolog mailing list
>[email protected]
>https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
>
>
>
-------------- next part --------------
HTML attachment scrubbed and removed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.