EXCEPTION_ACCESS_VIOLATION in JPL
Edward Bamber <[email protected]> Mon, 7 Apr 2014 23:08:56 +0200
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
#A fatal error has been detected by the Java Runtime Environment:## EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d287e54, pid=6792, tid=8108## JRE version: 7.0-b147# Java VM: Java HotSpot(TM) Client VM (21.0-b17 mixed mode, sharing windows-x86 )# Problematic frame:# C [libswipl.dll+0x7e54]## Failed to write core dump. Minidumps are not enabled by default on client versions of Windows## An error report file with more information is saved as:# C:\Users\User\Desktop\Uni\Year 2 Semester 2\GAPT1\GAPT\hs_err_pid6792.log## If you would like to submit a bug report, please visit:# http://bugreport.sun.com/bugreport/crash.jsp# The crash happened outside the Java Virtual Machine in native code.# See problematic frame for where to report the bug.#
Hi, I keep getting this error when trying to run a program using the JPL API (Using JRE 1.7, the latest version of SWI-PL, on a windows platform).
I've checked the statistics of my KB and got this back:
3.510 seconds cpu time for 3,904,891 inferences20,501 atoms, 5,781 functors, 4,776 predicates, 124 modules, 373,000 VM-codes
Limit Allocated In useLocal stack : 134,217,728 30,720 784 BytesGlobal stack : 134,217,728 63,480 2,780 BytesTrail stack : 134,217,728 31,740 1,184 Bytes
35 garbage collections gained 1,032,584 bytes in 0.000 seconds.1 atom garbage collections gained 10,053 atoms in 0.000 seconds.Stack shifts: 2 local, 3 global, 3 trail in -0.000 seconds.1 threads, 0 finished threads used 0.000 seconds.true.
so I doubt that the program would go outside of the stack - I use 1 query to consult the kb, and I use a second one and recycle it to query the kb like so:
public LanguageProcessor(String user) // this constructor initializes the class by giving value to the class variable, and loading the knowledge base { //new queries are created to act as prolog queries inside the JVM by using the following syntax JPL.init(); Query q1 = new Query("consult", new Term [] {new Atom("GAPT.pl")}); System.out.println(q1.query() ?"Hello, " + user + "how may I help you?" : "App could not be loaded"); System.out.println("1"); // where the 1st parameter of the Query/2 constructor is the type of prolog query, and the 2nd parameter is an array of all the terms used }
for(int i = 0; i < npt.size(); i++) { String[] z = npt.get(i).split(" "); input.add(new ArrayList<String>()); for(int j=0;j<z.length;j++) {input.get(i).add(z[j]);} String S = "["; for (int j = 0; j<input.get(i).size();j++) { S+=input.get(i).get(j) + ","; } S+= "]"; Query q2 = new Query("s(_)", new Term [] {new Atom(S), new Atom("[]")}); check.add(q2.query()); }
I also call the JPL.halt() method when I'm done with my KB, I don't close the queries because Eclipse isn't reading any Query.close() methods in the API.
I've tried running one of the test classes provided, and I received the same error.
Attached find the error report.
Thanks for your time.
-------------- next part --------------
HTML attachment scrubbed and removed
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: hs_err_pid6792.log
URL: <https://lists.iai.uni-bonn.de/pipermail/swi-prolog/attachments/20140407/751936b6/attachment.ksh>