From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: Question about display engine Date: Sun, 13 Oct 2019 17:40:52 +0200 Message-ID: <20191013154052.yzluijtwvf2ppvks@Ergus> References: <20191012222305.jpjinkd5y2lz6xiv@Ergus> <83mue5kmfx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="139048"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: NeoMutt/20180716 Cc: rudalics@gmx.at, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 13 17:42:08 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iJg0V-000a24-72 for ged-emacs-devel@m.gmane.org; Sun, 13 Oct 2019 17:42:07 +0200 Original-Received: from localhost ([::1]:40374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJg0T-00040p-Cm for ged-emacs-devel@m.gmane.org; Sun, 13 Oct 2019 11:42:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38299) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJfzi-0003yb-AS for emacs-devel@gnu.org; Sun, 13 Oct 2019 11:41:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJfzd-0005e5-DZ for emacs-devel@gnu.org; Sun, 13 Oct 2019 11:41:15 -0400 Original-Received: from sonic307-54.consmr.mail.ir2.yahoo.com ([87.248.110.31]:41128) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iJfzc-0005dT-O0 for emacs-devel@gnu.org; Sun, 13 Oct 2019 11:41:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1570981270; bh=sMzgHhBE/N0SMbKrxCe0oJcTiGF/PODGjst7n/jaDX4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=seFekjyq74Ayz/THmUPDflyymMa5yt4cPkcvImUob/qotqgV5F1Y7Hb0u/j2T5aKcYaIUCD1C3/TdbdGjuUezqnIvrAcfsuPA9DLdwd1OdZdICw8F+htb0U1fggoaAPs4kwajAiDBFdAdyZxlNDYEMyaHrFiY5NcCzyfLPlLAeg3i8+ed+LH6bUL1MzIlrV55Ips6hGz+vfyT1MhSy4HeZ3KSAptYOMPSBMyvJemt/NkhF5zF6JititWERPP1GEkTwaqfsfF+8QJHcRpJFwQ4f+UG2c+71QHWDtiGxwH/y1tjqxITa4KoT32Wk7GDht2IsBgXnVtHQMUppgNg8Y0Mg== X-YMail-OSG: _PoDHSQVM1nybsIRwHvb01O_bxNTrt9ChxcLuOlmJIIKavFFyDWjLbH.kj_rgWo BpxncFAtTmFEX_tw3LFqYynHbW6a8iGxpSZYuPKqUdPUEYFNjFc2F_wzQyYTIK3CQk9oKleLuYgg 2DgFmnlTboT9qibFYbvgAsihteT3CDtGdtDHn71lnxGh5apFseWR_JxZLjhQn8f0FhgoPgsU9tZ5 gfSy_xPzmkvlOENc9IY9uWTJpz72nQjoQzNwvmQzuCJgO_MvZQfBCVjONa_YSd105vdNqc26QRqL ILcM9Jq.MhPBIgP6uEA_BPG9sB4N2_YTKUdfgHv5iX1wT4HNyd4DAoVPs3cocNA2idpUrgzSyUJo uN9irsPQxeZ9a21AvzXANNnKew8KfWfQBcaKjh1U3uAbtMTwtMbkkRnTBwjEF2MK_IF_hnDFH6jo j8ZnJ3w8xKdqgJwb_OIAn458qkIdJ4tzCbZmXhyvz8biSel4tT88UMJKs1IHoUADI.rKJq4fcHr_ PEqe8clZsxx8vU3snp9kZ5jiDB7kE88ODd9tqf01mw7XoLWRjJROYzA89eWCdkpY.xlCeMm8Q0u7 0y_3l_uymBPzBX5KiChBShUJROCrLGX9zylakiJ7q71NmGjIpKwj0rnwpL_vMJ1jJUPJUhLxXalb rDzOBPq0dcSCvHpAyGzNfc3ImEPkTA9Rq3fiSFvAUeF8uHRJvBtYfGG0fpSEEngYDCOo9fPjb5MW qOSZfiZkekJN15hEBdwXRGmAhBtmXOgpfbcJF9V_Xpz6kNWjQpFR9c3iIQFh.8NWc4wv_peGkxf4 fQ8NLkD.Spr7wwEZ4I8U9N_53AWBdCa.Lr8sw9VfcG Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ir2.yahoo.com with HTTP; Sun, 13 Oct 2019 15:41:10 +0000 Original-Received: by smtp416.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID d5dd0251aff0b180a1d3220a86fdf1fa; Sun, 13 Oct 2019 15:41:05 +0000 (UTC) Content-Disposition: inline In-Reply-To: <83mue5kmfx.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 87.248.110.31 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:240966 Archived-At: Hi Eli: On Sun, Oct 13, 2019 at 12:46:10PM +0300, Eli Zaretskii wrote: >> Date: Sun, 13 Oct 2019 00:23:05 +0200 >> From: Ergus >> >> >I don't understand why would we want to add a call to handle_face_prop >> >there. >> > >> >> The call there is to emulate the part in our branch that produced the >> issue. And isolate the source of the problem, independently of all the >> other changes. >> >> Remember we modified handle_face_prop to be called here with the extra >> parameter to filter. > >But handle_face_prop modifies some members of its IT argument, whereas >the function called from extend_face_to_end_of_line (face_at_pos) >should not do that, it should just return the face ID to use. > >I now see that face_at_pos modifies it->start_of_box_run_p and >it->face_box_p. This is wrong, you should do that outside of >face_at_pos, in handle_face_prop itself. Maybe this is the reason for >the infloop? If extend_face_to_end_of_line needs to manipulate these >members (does it?), it needs to save and restore the old values. > Fixed now, but that's not the solution for the issue. >> >Can you tell where it loops? That is, describe the sequence of calls >> >and the return values for a single iteration through the loop? >> >> It is a very long loop it jumps here and there in the code it is very >> difficult to explain. But basically it stays going and coming in >> display_line for ever. > >You don't have to explain it, just show me one iteration through the >loop as you step through the code in GDB. > In GDB I have this bt: #0 0x000055cb1453ac98 in redisplay_windows (window=0x55cb15e3bfb5) at ../../src/xdisp.c:16126 #1 0x000055cb1453ac6d in redisplay_windows (window=0x55cb163ffc55) at ../../src/xdisp.c:16120 #2 0x000055cb1455b35d in redisplay_internal () at ../../src/xdisp.c:15596 #3 0x000055cb145fff3f in read_char (commandflag=1, map=0x55cb16838f93, prev_event=0x0, used_mouse_menu=0x7ffc1a89f4eb, end_time=0x0) at ../../src/keyboard.c:2473 #4 0x000055cb1460278a in read_key_sequence (keybuf=, prompt=0x0, dont_downcase_last=, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=) at ../../src/keyboard.c:9527 #5 0x000055cb14603e2c in command_loop_1 () at ../../src/lisp.h:1032 #6 0x000055cb1466af87 in internal_condition_case (bfun=bfun@entry=0x55cb14603c30 , handlers=handlers@entry=0x90, hfun=hfun@entry=0x55cb145fadc0 ) at ../../src/eval.c:1355 #7 0x000055cb145f5b94 in command_loop_2 (ignore=ignore@entry=0x0) at ../../src/lisp.h:1032 #8 0x000055cb1466aee1 in internal_catch (tag=tag@entry=0xd4a0, func=func@entry=0x55cb145f5b70 , arg=arg@entry=0x0) at ../../src/eval.c:1116 #9 0x000055cb145f5b3b in command_loop () at ../../src/lisp.h:1032 #10 0x000055cb145fa9d6 in recursive_edit_1 () at ../../src/keyboard.c:714 #11 0x000055cb145fad02 in Frecursive_edit () at ../../src/keyboard.c:786 #12 0x000055cb1451c957 in main (argc=18, argv=) at ../../src/emacs.c:2055 After some other tests I just did; I found that: #0 seems to be the root of the loop. redisplay_windows never ends (inf loop) and I can't understand why. But at least this explains why in gui it works but not in tui, because there is the WINDOWP test. What I can't understand is how the code can be in #1 that should always filtered by the WINDOWP condition in tui right? In any case the inf loop is there, but the recursions levels does not grow... so after the first time it enters in #1, it goes in the other branch if the if. On the other hand I don't understand how is this related with the call of face_at_pos in the extend_face_to_end_of_line. Any idea? >> Maybe you look at it and you find the issue in 5 seconds, but there >> is still too much I ignore to get it. > >Unlikely. And it is not wise to lose all the information you have >already collected about this problem, it could help me quite a lot. >At the very least please show a backtrace from inside the infloop, and >tell whether we are iterating over a buffer or a string, and if the >latter, what kind of string is that (overlay string, display string?). > >> Magit is available in melpa. Installing and using it is trivial. > >I don't need to install it, I just need to load it. > Then the command I send before should be enough. >> Maybe Martin have something to say about this? > >You didn't CC Martin on this message. My bad