From starred@tiscali.it Thu Oct 25 13:11:47 2001
Received: from mailrelay3.inwind.it (mailrelay3.inwind.it [212.141.54.103])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f9PBBgt11802
	for <prolog@swi.psy.uva.nl>; Thu, 25 Oct 2001 13:11:42 +0200 (MET DST)
Received: from tiscali.it (62.98.230.206) by mailrelay3.inwind.it (5.5.029)
        id 3BD67A02000926CF for prolog@swi.psy.uva.nl; Thu, 25 Oct 2001 13:11:33 +0200
X-Mozilla-Status: 0801
Message-ID: <3BD7F3CF.8010004@tiscalinet.it>
Date: Thu, 25 Oct 2001 13:13:19 +0200
From: starred <starred@tiscalinet.it>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1
X-Accept-Language: en-us
MIME-Version: 1.0
To: SWI Prolog Mailing List <prolog@swi.psy.uva.nl>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Subject: [SWIPL] Trapped signal 11 (general protection fault), aborting ...help please!!!

This an error that very often occurs during execution of a communication 
between some agents i've created

  Trapped signal 11 (general protection fault), aborting ...
       [1] '$toplevel'
% Abort: closed stream '$stream'(5158192)
% Abort: closed stream '$stream'(5149938)
% Abort: closed stream '$stream'(5148678)
% Execution Aborted

The problem is that after compiling the files, SWI prolog gives me no 
error or warning, and i cannot understand where the problem is.
Notice that the error occurs very often, but not always...

I'm working on an agent based environment, so every agent is both a 
server and a client.
the serving job is done in this way:


dispatch(_GUI) :-
     new(@dispatch_timer,timer(0.3,message(@prolog,dispatch1))),
     send(@dispatch_timer,start).


dispatch1 :-
 
findall(ReadStream,agents:connection(_ClientId,_Host,ReadStream,_WriteStream),Clients),
     listen_stream(Server),
     wait_for_input([Server|Clients],ReadyList, 0.05),
     (ReadyList \= [])
     ->
     format('ReadyList is: ~w~n',ReadyList),
     process_listen_queue(ReadyList)
     ;
% write(waiting),nl,flush_output,
     true.


process_listen_queue([]).


process_listen_queue([H|T]) :-
     handle_incoming(H),
     format('ok~n~n'),
     process_listen_queue(T).


Bye

Armando Stellato


