Subject: [SWIPL] Trapped signal 11 (general protection fault), aborting ...help please!!!

From: starred <[email-masked]>
Date: Thu, 25 Oct 2001 13:13:19 +0200

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