segmentation faults, redeux

Gary King <[email protected]> Tue, 20 Jun 2006 15:01:47 -0400
Newsgroups gmane.lisp.allegro
Message-ID <[email protected]>
Hi,

I'm using alisp 8.0:

> International Allegro CL Enterprise Edition
> 8.0 [Mac OS X] (Feb 24, 2006 17:13)
> Copyright (C) 1985-2005, Franz Inc., Oakland, CA, USA.  All Rights  
> Reserved.

and I'm getting segmentation faults that I don't understand. I've  
tried setting

> (declaim (optimize (speed 1) (safety 3) (space 0) (debug 3)))

at the top of several of the lisp files in my project without  
success. I am not calling any foreign functions or doing anything  
that seems "wacky" to me.

I think that the problem occurs in this next bit of code. I call  
process wait to wait for input. Input is received via the creation of  
directories in a known location (I didn't design the protocol, this  
is for the Loebner contest). I exit the wait when either new  
directories are created or after about a quarter of a second. Then I  
"do stuff" with this input and loop around again.

> (loop do
>       (mp:process-wait
>        ">> waiting <<"
>        (lambda ()
>          (setf (values message-in has-input?)
>                (read-communication directory message-in :type :judge))
>          (cond (has-input?
>                 (setf last-input (get-internal-real-time))
>                 (values t))
>                ((> (/ (- (get-internal-real-time) last-tick)
>                       internal-time-units-per-second)
>                    check-for-output-delay)
>                 (values t))
>                (t
>                 (sleep check-for-input-delay)
>                 (values nil)))))
>       ;; do stuff
>
>       )

The back trace tells me that I was in the my function and then there  
was an exception...

> Error: Received signal number 11 (Segmentation violation)
>   [condition type: SYNCHRONOUS-OPERATING-SYSTEM-SIGNAL]
>
> Restart actions (select using :continue):
> 0: Return to Top Level (an "abort" restart).
> 1: Abort entirely from this (lisp) process.
> [1] LOEBNER(7):

thanks,
-- 
Gary Warren King
metabang.com
http://www.metabang.com/
(413) 210 7511
gwking on #lisp (occasionally)