Subject: Re: CGI with SWI-Prolog

From: Jan Wielemaker <[email-masked]>
Date: Thu, 6 Apr 2000 11:45:14 +0200

> 
> > > [potential disadvantage of the JPL approach: the Java VM shares
> > > memory with the JPL library, the Prolog VM and any foreign code
> > > loaded by it, and is thus vulnerable to corruption; i.e. commercial
> > > or corporate Web servers may reasonably refuse to host servlets
> > > which load Java "native methods"]
> 
> I'm using the JPL approach to call prolog from a normal java GUI. Prolog
> keeps crashing giving a warning ' out of stack space while not in prolog'
> Is there anything i can do to stop this happenning? 

Write a bug-report that can be reproduced.  The message can more or less
mean anything.  If Prolog is operating properly it normally means it is
really out of stack, but if it happens right at the start it generally
means `something is really wrong'. Without knowing exactly what you
are doing it is impossibly to give a hint.

Please note that Prolog crashing on a pure Prolog program is always a
Prolog bug (sometimes in the list of known bugs though). Prolog used
through the foreign interface can easily crash if you violate the
constraints, for example by using term-references that are no longer
valid, not closing queries, etc. I don't know about JPL, but the native
C interface does very few checks. Most misuse will simply lead to a
crash.

	Regards --- Jan