CLM-struct access problem
Larry Troxler
lt@westnet.com
Tue, 12 Aug 1997 23:02:35 -0400 (EDT)
Any idea what is going wrong with the following instrument (test.lisp)?
(definstrument test (start dur)
(let ((f (make-array 3)))
(declare (type (array smpflt) f))
(loop for i below 3 do
(setf (aref f i) (make-one-pole 0.9 -0.1)))
(run
(loop for i below 3 do
(setf (smpflt-y1 (aref f i)) 1.0)))))
This gives my a gethash error - here's what happens :
Allegro CL 4.3 [Linux/X86; R1] (12/11/96 1:33)
Copyright (C) 1985-1996, Franz Inc., Berkeley, CA, USA. All Rights
Reserved.
;; Starting socket daemon and emacs-lisp interface...
;; Optimization settings: safety 1, space 1, speed 1, debug 2.
;; For a complete description of all compiler switches given the current
;; optimization settings evaluate (EXPLAIN-COMPILER-SETTINGS).
[changing package from "COMMON-LISP-USER" to "COMMON-MUSIC"]
CM(1): :cl test.lisp
;;; Compiling file test.lisp
; Writing "/p2/usr/local/cm/clm_lnxacl_TEST.c"
; Compiling "/p2/usr/local/cm/clm_lnxacl_TEST.c"
; Creating shared object file "/p2/usr/local/cm/clm_lnxacl_TEST.so"
; Compiling (:INTERNAL (:TOP-LEVEL-FORM "test.lisp" 1) 0)
; Compiling TEST
; Compiling (:INTERNAL TEST 0)
; Compiling (:INTERNAL TEST 1)
; Compiling (FLET TEST CLM::LOAD-IO_C)
; Compiling (FLET TEST CLM::LOAD-REAL-ARRAY_C)
; Compiling (:INTERNAL TEST 2)
; Compiling (:INTERNAL TEST 3)
; Note: Closure (:INTERNAL TEST 2) will be stack allocated.
; Note: Closure (FLET TEST CLM::LOAD-REAL-ARRAY_C) will be stack
allocated.
; Note: Closure (:INTERNAL TEST 0) will be stack allocated.
; Compiling TEST0
;;; Writing fasl file test.fasl
Warning: No IN-PACKAGE form seen in test.lisp. (Allegro Presto will be
ineffective when loading a file having no IN-PACKAGE form.)
;;; Fasl write complete
Warning: While compiling these undefined functions were referenced:
|clm_lnxacl_test2|.
; Fast loading test.fasl
; Foreign loading /p2/usr/local/cm/clm_lnxacl_TEST.so.
0: (MAKE-HASH-TABLE :TEST #<Function EQUAL> :REHASH-THRESHOLD 0.65)
0: returned #<EQUAL hash-table with 0 entries @ #x8aadb52>
CM(2): (stella)
Hang on a second...
Type ? for help.
Stella [Top-Level]: new thread t1
New object position: (<cr>=Top-Level)
Stella [Top-Level]: go t1
Focus: T1
Type: Thread
Status: Normal
Objects: 0
Start: unset
Stella [T1]: (make-instance 'test)
#<(TEST unset unset)>
Stella [T1]: new test 1
Slots and values: rhythm 1 dur 1
New object position: (<cr>=T1)
Stella [T1]: open test.snd
Stream: #<File: "test.snd">
Stella [T1]: mix
Mix objects: (<cr>=T1)
Start time offset:(<cr>=None)
File: test.snd
Channels: 1
Srate: 22050.0
Reverb: None
0.000...
Error: GETHASH: `NIL' is not of the expected type `HASH-TABLE'
[condition type: TYPE-ERROR]
Restart actions (select using :continue):
0: abort current note.
1: Return to Top-Level.
2: Exit Top-Level.
[1] CM(3): :zoom
Evaluation stack:
(ERROR TYPE-ERROR :DATUM ...)
->(GETHASH SMPFLT NIL)
(CLM::ALLOCATE-ANY_C
#<smpflt: a0: 0.9, a1: NIL, a2: NIL, b1: -0.1, b2: NIL, x1: 0.0, x2:
0.0, y1: 0.0, y2: 0.0>
(27 3) ...)
(CLM::ALLOCATE-ANY_C
#(#<smpflt: a0: 0.9, a1: NIL, a2: NIL, b1: -0.1, b2: NIL, x1: 0.0,
x2: 0.0, y1: 0.0, y2: 0.0>
#<smpflt: a0: 0.9, a1: NIL, a2: NIL, b1: -0.1, b2: NIL, x1: 0.0,
x2: 0.0, y1: 0.0, y2: 0.0>
#<smpflt: a0: 0.9, a1: NIL, a2: NIL, b1: -0.1, b2: NIL, x1: 0.0,
x2: 0.0, y1: 0.0, y2: 0.0>)
(27 3) ...)
(TEST :UNKNOWN :UNKNOWN)
((METHOD WRITE-EVENT (CLM-NOTE CLM-SOUND-FILE)) :UNKNOWN :UNKNOWN)
((METHOD WRITE-EVENT (CONTAINER EVENT-STREAM)) #<SCORE: Scratch-Score>
#<File: "test.snd">)
((METHOD WRITE-EVENT :AROUND (MERGE EVENT-STREAM)) #<SCORE:
Scratch-Score>
#<File: "test.snd">)
[... SYS::GSGC-SET-PROTECT ]
(WRITE-EVENT :UNKNOWN :UNKNOWN)
... more older frames ...
[1] CM(4):
-- Larry Troxler -- lt@westnet.com -- Patterson, NY USA --