From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#56561: 29.0.50; Infloop in try_window Date: Fri, 15 Jul 2022 21:54:24 +0800 Message-ID: <87lesumqgf.fsf@yahoo.com> References: <874jzjwmhn.fsf@md5i.com> <83v8rzsdd1.fsf@gnu.org> <878rovxqjo.fsf@md5i.com> <83sfn2sy19.fsf@gnu.org> <83lesusl4w.fsf@gnu.org> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28519"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: mwd@md5i.com, 56561@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 15 15:55:21 2022 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 1oCLmo-00077r-8K for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Jul 2022 15:55:18 +0200 Original-Received: from localhost ([::1]:45018 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oCLmm-0006lN-On for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Jul 2022 09:55:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55442) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oCLma-0006l6-Ju for bug-gnu-emacs@gnu.org; Fri, 15 Jul 2022 09:55:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42141) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oCLmY-0001wK-EP for bug-gnu-emacs@gnu.org; Fri, 15 Jul 2022 09:55:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oCLmY-0001jL-82 for bug-gnu-emacs@gnu.org; Fri, 15 Jul 2022 09:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Jul 2022 13:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56561 X-GNU-PR-Package: emacs Original-Received: via spool by 56561-submit@debbugs.gnu.org id=B56561.16578932846613 (code B ref 56561); Fri, 15 Jul 2022 13:55:02 +0000 Original-Received: (at 56561) by debbugs.gnu.org; 15 Jul 2022 13:54:44 +0000 Original-Received: from localhost ([127.0.0.1]:39899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oCLmG-0001ia-1j for submit@debbugs.gnu.org; Fri, 15 Jul 2022 09:54:44 -0400 Original-Received: from sonic307-56.consmr.mail.ne1.yahoo.com ([66.163.190.31]:37009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oCLmE-0001iJ-02 for 56561@debbugs.gnu.org; Fri, 15 Jul 2022 09:54:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657893276; bh=E81QqiFvJACXxL0NXHSNdcakzRmP9zj97zxXAqWuBho=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=RlgjcxoXlHv+KbP1Ldaqx9joDyi6OXa/1Y+DqP5FtH5lYmOpIIL77ioeaJjYvNQbFc/b2PXNUce5E8n5nkL3phuBk5+9tE8j1SoOzlozbmkdPh/ece8pqp/nsi2Hy60hLCmTYKxCWMTFpKHCrcsceFHQXgxryjdH7LLps1HFIxAE3tt0r1r1nM9fOKhPPV8jPEHi00Ldtgpayt9rBtrdTdRxKhgfUNA9CKJ/XgZ70bOzekIjK4ZPiz/URaNBzmIG56w2dcSbXttouLZ5ELxr+1QaWc3S2jotDTOiea+ZyrtD9I1BaWosOVSqNWiWCDcmXuhwThp7TrDV8rclOAlo0w== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657893276; bh=6Kcaq8eN9Wa4A3hFyd3L84DinGocS2jC71jEgI3R7o9=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=U6pf9wfHIKBGSR4E7ZdDBL5WuJ3wn1tWZbTcwixmpIHArQvenO45pwLIJuLxv+cPYNQ1ZcPXJuRbGINZ1DiQP9r7kHFyrUmmlmNMYI+ZVYYDL81OfB4QOK/mImCCbnadWB6cf8dOMFpu2hKCqQGNqmCbIT8fc69D1Fcup5fFcQIkAQpK56GoizLuFU62nBN9+29DVrho9hWsJEyw8Gfi29LytvkdPg6ttFErj600UlZnGm7EWUW14WlhIWKsID1h6ahJ2eqSTCtACh/MBhlOaDbDIEods4HWUfKjkgKoJDKwwIn4VbivfVdINZZX01TAU53X4J1WPJKI+3zFFzEzOQ== X-YMail-OSG: zecWkSsVM1k4UZ_BC2d.4t2mlHkhiz5Yy94yO2qVOGrYSGLyh2QFd._6HjVoMYh hIKRWcsW5qgEARE0PPfv4aZ5A_V7iRx_vWrR6QlVHHcAdBC.Ew7oMNv8HjjPHHG6v05j.9VpBI18 VsP6GdQg63yrz_Xb6xbj48KgtjwdE_iABoJVLXS2E.YyflSxqWLQg7AjYrj37Goii7ppaKD2O.mq 5jxp10lPPETEqqdOwceoAb7I_Sx7azbAxDwjIMU4_rwNKD5OvImy.5A98QjfuuuusB5Yc1hhsZ_V G5bzbQFd0S1eSi8R1_C1yufZgq8TgxcfLtooOlkyBBfPCIt6UwU0EuGn.jfdsOGYrK5YdKeJ1Gvn vOmRBU9ISwFsV0wOAEC3nFthJFoLSg1Hu9PulWqX5Ui2CpHvlsOndvR1kxVLKxdvkcSuXQuw7RvN QdCcEftimokOKHi7kgU6WJL40v2yoitzCYL_gJAFkYsW1QouCIFuSg_.rAqkDwQeX85Xiqa2xPqB TRTq58xCDTRmq6F0GuVsh4O8vpp6nRQmAYVGZiEfrFWfkYEgjohPmJD111suYFjuxrvvHYhv57tG jREBkckNdiINQCvwqp2G9VeNH3v86EnDEiKj2P57kWuG7YYPUR1YRqLOYrXrtosTgZvBa0ywajJt s.kow3YcIXm3YXIvSW96EBkOlugPBNBvx7q.noYdH4S33Whdy7.ynXjDVjI41sdYrg.FQNyIEn0B _Z7m_8g40o0dZ6z9lE.LvHKBnRYcm.s605bwMsbikC7OIEFH9r3EArZMLmKZ5z8qBEXxS8_evxMV 8asEh_sigFF709JKJJePW76UuUDbq6SeVlAlL0.Z84 X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Fri, 15 Jul 2022 13:54:36 +0000 Original-Received: by hermes--canary-production-sg3-67975bbd4b-wpvcf (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 8190c8d2ac3cb1443d0954d50284a9a8; Fri, 15 Jul 2022 13:54:31 +0000 (UTC) In-Reply-To: <83lesusl4w.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 15 Jul 2022 13:52:47 +0300") X-Mailer: WebService/1.1.20407 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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" Xref: news.gmane.io gmane.emacs.bugs:237100 Archived-At: Eli Zaretskii writes: >> Cc: 56561@debbugs.gnu.org >> Date: Fri, 15 Jul 2022 09:14:10 +0300 >> From: Eli Zaretskii >> >> Hmm... so the short tooltip text somehow causes us to exceed the >> number of glyph rows of the matrix? Please tell what the commands >> below show: >> >> (gdb) pgrowx it->w->desired_matrix->rows >> (gdb) pgrowx it->w->desired_matrix->rows+1 >> (gdb) pgrowx it->w->desired_matrix->rows+2 >> (gdb) pgrowx it->w->desired_matrix->rows+3 >> ... >> (gdb) pgrowx it->w->desired_matrix->rows+34 >> >> That is, I want to see the entire contents of the glyph rows. >> >> Also >> >> (gdb) p it->last_visible_x >> (gdb) p it->last_visible_y > > Actually, I think I see the reason. I installed a fix, but I cannot > find a way of triggering the problem, so I cannot be 110% sure this is > fixed. I guess time will tell. BTW, I have a question about the fix: redisplay cannot run when a tooltip is displayed as popup menu help-text, so adjust_glyph_matrix and the subsequent try_window call that is required to generate the display contents will not be called in time, leading to a blank tooltip. The call could previously never fail, since the tooltip code specifies TRY_WINDOW_IGNORE_FONTS_CHANGE. Would it be appropriate to call adjust_frame_glyphs and try_window again if this call to try_window in Fx_show_tip fails? specpdl_ref count_1 = SPECPDL_INDEX (); old_buffer = current_buffer; set_buffer_internal_1 (XBUFFER (w->contents)); bset_truncate_lines (current_buffer, Qnil); specbind (Qinhibit_read_only, Qt); specbind (Qinhibit_modification_hooks, Qt); specbind (Qinhibit_point_motion_hooks, Qt); Ferase_buffer (); Finsert (1, &string); clear_glyph_matrix (w->desired_matrix); clear_glyph_matrix (w->current_matrix); SET_TEXT_POS (pos, BEGV, BEGV_BYTE); ->try_window (window, pos, TRY_WINDOW_IGNORE_FONTS_CHANGE); /* Calculate size of tooltip window. */ size = Fwindow_text_pixel_size (window, Qnil, Qnil, Qnil, make_fixnum (w->pixel_height), Qnil, Qnil); Thanks.