GNU bug report logs - #75199
30.0.93; Emacs crashes when completing with corfu

Previous Next

Package: emacs;

Reported by: Zhengyi Fu <i <at> fuzy.me>

Date: Mon, 30 Dec 2024 13:04:02 UTC

Severity: normal

Found in version 30.0.93

Full log


Message #38 received at 75199 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Mendler <mail <at> daniel-mendler.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: i <at> fuzy.me, luangruo <at> yahoo.com, 75199 <at> debbugs.gnu.org
Subject: Re: bug#75199: 30.0.93; Emacs crashes when completing with corfu
Date: Mon, 30 Dec 2024 20:47:11 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Daniel Mendler <mail <at> daniel-mendler.de>
>> Cc: i <at> fuzy.me,  luangruo <at> yahoo.com,  75199 <at> debbugs.gnu.org
>> Date: Mon, 30 Dec 2024 19:43:34 +0100
>> 
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>> 
>> >> From: Daniel Mendler <mail <at> daniel-mendler.de>
>> >> Cc: Eli Zaretskii <eliz <at> gnu.org>,  luangruo <at> yahoo.com,  75199 <at> debbugs.gnu.org
>> >> Date: Mon, 30 Dec 2024 19:00:45 +0100
>> >> 
>> >> Zhengyi Fu <i <at> fuzy.me> writes:
>> >> 
>> >> > On 2024-12-30 23:24, Eli Zaretskii wrote:
>> >> >
>> >> >> Earlier you wrote:
>> >> >> 
>> >> >>> The error is probably caused by the width value of 0 passed to
>> >> >>> XCreatePixmapFromBitmapData().
>> >> >>> It seems gui_intersect_rectangles() returns true even if the resulted
>> >> >>> rectangle is empty.  Is that correct behavior?
>> >> >> Can you tell how this happens?  Is corfu doing something special with
>> >> >> the fringes?
>> >> >
>> >> > I noticed the following calls in corfu--popup-show before the error:
>> >> >
>> >> > * define-fringe-bitmap(corfu--bar [-241] 1 8 (top periodic))
>> >> > * define-fringe-bitmap(corfu--nil [])
>> >> 
>> >> I've adjusted the second call to the following, also for compatibility
>> >> with older Emacs versions.
>> >> 
>> >> (define-fringe-bitmap 'corfu--nil [0] 1 1)
>> >
>> > Doesn't
>> >
>> >   (define-fringe-bitmap 'corfu--nil [0])
>> >
>> > work as well?  If it doesn't, I guess the doc string is inaccurate?
>> 
>> Yes. If I understand [info:elisp#Customizing Bitmaps] correctly, in this
>> case the HEIGHT would be 1, but the WIDTH would be 8. This is slightly
>> different from the above, but it should work just as well given that the
>> bitmap is all zero. The corfu--nil bitmap is just a placeholder for the
>> empty fringe.
>
> OK, thanks.  So we can conclude that this is a bug in Corfu, and in
> addition install on master a check for arguments of
> define-fringe-bitmap, for even more waterproof fix?

Yes. From my perspective it is sufficient to check the expected argument
value ranges. Ideally these ranges are also documented in the
docstring/manual.

Daniel




This bug report was last modified 149 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.