From jan@swi.psy.uva.nl  Thu Apr  6 11:44:55 2000
Received: from gollem.swi.psy.uva.nl (root@gollem [145.18.152.30])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id LAA01702;
	Thu, 6 Apr 2000 11:44:55 +0200 (MET DST)
Received: (from jan@localhost)
	by gollem.swi.psy.uva.nl (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id LAA07327;
	Thu, 6 Apr 2000 11:45:14 +0200
Date: Thu, 6 Apr 2000 11:45:14 +0200
Message-Id: <200004060945.LAA07327@gollem.swi.psy.uva.nl>
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Subject: Re: CGI with SWI-Prolog
To: Advaith <as372@hermes.cam.ac.uk>, fadushin@syr.edu
In-Reply-To: Advaith's message of Thu, 6 Apr 2000 09:33:05 +0100 (BST)
Phone: +31 - 20 - 525 6121
Cc: Paul Singleton <p.singleton@keele.ac.uk>,
        SWI Prolog <prolog@swi.psy.uva.nl>

> 
> > > [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

