From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Mendler via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#75199: 30.0.93; Emacs crashes when completing with corfu Date: Mon, 30 Dec 2024 20:47:11 +0100 Message-ID: <87ldvx7y2o.fsf@daniel-mendler.de> References: <87cyh9qq64.fsf@fuzy.me> <86ttalnsj4.fsf@gnu.org> <87r05pmctv.fsf@fuzy.me> <86ldvxnqgv.fsf@gnu.org> <8ac665654425902f3deb81481ac0242c@fuzy.me> <87a5cdcape.fsf@daniel-mendler.de> <86bjwtnhyh.fsf@gnu.org> <877c7hc8q1.fsf@daniel-mendler.de> <867c7hnfoq.fsf@gnu.org> Reply-To: Daniel Mendler Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36319"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: i@fuzy.me, luangruo@yahoo.com, 75199@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 30 20:48:30 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tSLkc-0009A9-8i for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 30 Dec 2024 20:48:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tSLkM-0002VM-2F; Mon, 30 Dec 2024 14:48:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tSLkF-0002Ul-RR for bug-gnu-emacs@gnu.org; Mon, 30 Dec 2024 14:48:08 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tSLk9-0004PU-OC for bug-gnu-emacs@gnu.org; Mon, 30 Dec 2024 14:48:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=aUpbUU+ZQ8yK/sNP+K0j1lAfDwAjkQiV71+Bh7oiofo=; b=t3098E6OgMSIXE1qILXzBeIvBzELLsSsOQT+WTiCj3nRj5xKnCfzMsFgh4++sqBo+BxaOKKcuSZOwjou9f6MsU4ipxccqqaFcRYMwEUSvlMYkxLDmtd8RDXgw3AKaxTLjj4B8Vn/TVdM7RQLPB5+XKW6jMnMf/l7pPoDDU6dLGuvalqTzYGfeCoMC7uHr7Vd9M0U8lV6wmUtRxIDJy1HDrqGx13OQIwE14kvQ+VTfZjx+Zf+xM4Xqx7FU73+6GvwA/Rsk3ukeCIFuo7kbrztYw43koHrALFNmY0taS4U3GyppJbF5fXScctoOX9FAAGuoWeZFNNPEbOKcYffIPRqPw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tSLk9-0003nB-J7 for bug-gnu-emacs@gnu.org; Mon, 30 Dec 2024 14:48:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Mendler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Dec 2024 19:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75199 X-GNU-PR-Package: emacs Original-Received: via spool by 75199-submit@debbugs.gnu.org id=B75199.173558804214516 (code B ref 75199); Mon, 30 Dec 2024 19:48:01 +0000 Original-Received: (at 75199) by debbugs.gnu.org; 30 Dec 2024 19:47:22 +0000 Original-Received: from localhost ([127.0.0.1]:60078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tSLjV-0003m3-GP for submit@debbugs.gnu.org; Mon, 30 Dec 2024 14:47:21 -0500 Original-Received: from server.qxqx.de ([49.12.34.165]:60691 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tSLjT-0003lg-Fn for 75199@debbugs.gnu.org; Mon, 30 Dec 2024 14:47:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=aUpbUU+ZQ8yK/sNP+K0j1lAfDwAjkQiV71+Bh7oiofo=; b=VJtLgr+7/eMso+Dohyvb88fEVN RENqIszzWBMxPbwqWIPSoBqgRPL/Jk62L5qSVFb7TyTDmzVFVFkZnA+IFnwCyCeQCIxFLiqNwdLYF 1b/wmryYaPukS7I/ddQOeqWI/aKeLtFcKWdI9dmdQXjT45iOmzyjLvYrPbyIi2ljgMLM=; In-Reply-To: <867c7hnfoq.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 30 Dec 2024 21:17:41 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298025 Archived-At: Eli Zaretskii writes: >> From: Daniel Mendler >> Cc: i@fuzy.me, luangruo@yahoo.com, 75199@debbugs.gnu.org >> Date: Mon, 30 Dec 2024 19:43:34 +0100 >> >> Eli Zaretskii writes: >> >> >> From: Daniel Mendler >> >> Cc: Eli Zaretskii , luangruo@yahoo.com, 75199@debbugs.gnu.org >> >> Date: Mon, 30 Dec 2024 19:00:45 +0100 >> >> >> >> Zhengyi Fu 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