[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
more software rot
This function ran six months ago. I am clueless as to why it is breaking now,
under 8.1. It allocated a window, drew a blob into the window, and then drew
the outline to the blob using the same list of points and the same function
calls, except with :FILLED NIL. Now the blob gets drawn, but the software
explodes on the second call. Looks like some weird flavors are getting called,
maybe having to do with running on a MacIvory instead of a 3620?
Code fragment:
(setq my-window
(tv:make-window
'dw:dynamic-window
:edges-from :mouse ;INTERACTIVELY SPECIFY WHERE IT GOES.
:expose-p T :save-bits T
:deexposed-typeout-action :PERMIT ;:NORMAL :EXPOSE :error :notify
;Use this magic to get rid of the scrolling elevator-bars.
:margin-components
`((dw:margin-borders) ;Margin components trashes the label.
(dw:margin-label :margin :bottom
:string ,name
:character-style (nil :bold nil)))))
(let ((STREAM my-window))
;Draw Blob.
(graphics:drawing-path (STREAM :filled T :gray-level *face-grey*)
(graphics:draw-cubic-spline my-pointlist ;POINTLIST MUST INCLUDE THE START AT THE END.
:start-relaxation :cyclic ;:relaxed :anti-cyclic :clamped
:stream STREAM
:number-of-samples 20 ;Graininess of curve, NOT the number of points.
))
(format T "Blob drawn. ABOUT TO CRASH.")
;Draw Outline.
(graphics:drawing-path (STREAM :filled NIL )
(graphics:draw-cubic-spline my-pointlist ;POINTLIST MUST INCLUDE THE START AT THE END.
:start-relaxation :cyclic ;:relaxed :anti-cyclic :clamped
:stream STREAM
:number-of-samples 20 ;Graininess of curve, NOT the number of points.
))
(format T "Blob outline drawn. NEVER REACHES HERE.")
;...
)
Error:
Error: The generic function MTB::UPDATE-GRAPHICS-STATE was applied to the arguments #<ARRAY BIT 799x1152 indirect 1161723176>, 5, #<ARRAY
(UNSIGNED-BYTE 8) 18 simple 20131346415>, #<ARRAY (UNSIGNED-BYTE 8) 6 simple 20131275150>, (1 1 1133 786), #<MTB::MAC-RPC-MAIN-CONSOL
E 1161574740>.
The first argument was not of the correct type.
The function is implemented by the flavor MTB::MAC-RPC-DRAWABLE.
(:INTERNAL (DEFUN-IN-FLAVOR MTB::MAC-RPC-SCREEN-N-POINT-GRAPHICS-CALL MTB::MAC-RPC-SCREEN) 0 TV:PREPARE-SHEET)
Arg 0 (SYS:SELF-MAPPING-TABLE): #<Map to flavor MTB::MAC-RPC-SCREEN 20001714733>
Rest Arg (SELF): #<LOCATIVE 36600371732>