[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

system hangs on errors after call to defstruct

  For some unexplained reason, after I try to defined a structure called
'class', the system hangs whenever an error occurs (such as an undefined
symbol or function).  Any idea why?  Here is a script run of what I did.
The 'unbound symbol' errors were done on purpose to see if the
error-detecting software was working:

Machine: SUN SPARCStation/370

>>  Script started on Thu Jul 25 12:55:48 1991
>>  1 sparc1.brc% cat /etc/motd
>>  SunOS Release 4.1.1 (LOGIXOS) #2: Fri Mar 8 10:40:26 EST 1991
>>  2 sparc1.brc% cl4.0
>>  Allegro CL 4.0.1 [Sun4] (2/8/91)
>>  Copyright (C) 1985-1991, Franz Inc., Berkeley, CA, USA
>>  <cl> qwerty
>>  Error: Attempt to take the value of the unbound symbol QWERTY
>>  [1] <cl> :pop
>>  <cl> (defun my-class-printer (r st junk)
>>    (declare (ignore junk))
>>    (format st "<Class ~A>" (class-name r)))
>>  <cl> trial
>>  Error: Attempt to take the value of the unbound symbol TRIAL
>>  [1] <cl> :pop
>>  <cl> (defstruct (class (:print-function my-class-printer))
>>    name facts rules)
>>  CLASS 
>>  <cl> qwerty
>>  ^Z
>>  ^Z
>>  Stopped
>>  3 sparc1.brc% jobs
>>  [1]  + Stopped              cl4.0
>>  4 sparc1.brc% kill %1
>>  5 sparc1.brc% 
>>  [1]    Terminated           cl4.0
>>  5 sparc1.brc% 
>>  script done on Thu Jul 25 12:58:10 1991

  The function and structure definitions were written as part of a larger
system elsewhere which presumably ran.  When I loaded the system for the
first time (the loading creates a new package and puts the system in it),
the lisp hung the first time I made a error.  After much pondering, and
loading parts of the system, I narrowed things down to this 'defstruct'
call.  When commented out, loading of the system causes no problems. But
with it un-commented, the "hang-on-error" problem materializes.  The example
above uses a clean version of AllegroCL and the definitions are done in the
USER package.

Tony Guzzi 			phone: (203) 486-5305
University of Connecticut	e-mail: tony@sparc0.brc.uconn.edu