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

Re: buffer-set-font-spec strange behavior



At  6:37 PM 4/13/94 +0100, Dieter Holz wrote:
>Hi,
>I got a Lisp error in the following code:
>
>;initialitation
>(progn (setf fred (make-instance 'fred-window))
>       (setf buff (fred-buffer fred))
>       (dotimes (i 10000)
>         (dotimes (j 40)
>           (buffer-insert buff #\a))
>         (buffer-insert buff #\newline))
>       (fred-update fred))
>
>
>; it works
>(progn (setf j 0)
>       (dotimes (i 20)
>         (buffer-set-font-spec buff :bold (setf j (+ j 41)) (+ j 10))
>         (buffer-set-font-spec buff :bold (+ j 20) (+ j 30)))
>       (fred-update fred))
>
>
>;here's the bug
>(progn (setf j 0)
>       (dotimes (i 9900)
>         (buffer-set-font-spec buff :bold (setf j (+ j 41)) (+ j 10))
>         (buffer-set-font-spec buff :bold (+ j 20) (+ j 30))))
>
>(fred-update fred)
>
>(set-fred-display-start-mark fred 300000)
>
>
>
>What can I do?

Fred has a bug that it crashes when a buffer has more than
16K font changes. Right now, all you can do is to avoid putting
than many font changes in a buffer. It's likely a word reference
that should be long in the assembly language that implements
Fred's buffer or redisplay code, but I have not looked for it
since I was assuming that it would be fixed by the rewrite of
Fred that I had nearly finished when we paused in our development
on MCL 3.0. When Apple figures out how to continue MCL development,
I assume that this new Fred implementation will see the light of
day. The workaround is to store your text in more than one
Fred buffer.