[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: infinite loop in define-fringe-bitmap
From: |
SAITO Takuya |
Subject: |
Re: infinite loop in define-fringe-bitmap |
Date: |
Tue, 16 Nov 2004 21:18:42 +0900 (JST) |
From: address@hidden (Kim F. Storm)
Subject: Re: infinite loop in define-fringe-bitmap
Date: Mon, 15 Nov 2004 16:44:47 +0100
> > define-fringe-bitmap causes infinite loop in below example:
> > (define-fringe-bitmap 'test [#b11 #b11] 2)
> >
>
> I cannot reproduce this [I didn't try your exact setup].
>
> Can you start emacs in gdb and show me where it is looping?
looping in the line 1312-1323 of fringe.c:
while (j < fb.height)
{
for (i = 0; i < fill1 && j < fb.height; i++)
b[j++] = 0;
for (i = 0; i < h && j < fb.height; i++)
{
Lisp_Object elt = Faref (bits, make_number (i));
b[j++] = NUMBERP (elt) ? XINT (elt) : 0;
}
for (i = 0; i < fill2 && j < fb.height; i++)
b[j++] = 0;
}
j is not incremented because fill1 = fill2 = 0 and h = -1.
The variable h is set like this:
if (NILP (height))
h = XINT (len);
else
{
if (fb.height > XINT (len))
h = XINT (len);
}
so, h is not set in the case of (define-fringe-bitmap 'test [#b11 #b11] 2)
Is this the cause of infinite loop ?