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 18:44:24 +0200 Message-ID: <20191013164424.4vyxdnm6ievyvjyf@Ergus> References: <20191012222305.jpjinkd5y2lz6xiv@Ergus> <83mue5kmfx.fsf@gnu.org> <20191013154052.yzluijtwvf2ppvks@Ergus> <83a7a4ljet.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="125264"; 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 18:44:54 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 1iJgzG-000WQx-AP for ged-emacs-devel@m.gmane.org; Sun, 13 Oct 2019 18:44:54 +0200 Original-Received: from localhost ([::1]:41042 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJgzE-0006fn-Pf for ged-emacs-devel@m.gmane.org; Sun, 13 Oct 2019 12:44:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44756) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJgz6-0006fe-UN for emacs-devel@gnu.org; Sun, 13 Oct 2019 12:44:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJgz4-0002Xr-Nc for emacs-devel@gnu.org; Sun, 13 Oct 2019 12:44:44 -0400 Original-Received: from sonic313-20.consmr.mail.ir2.yahoo.com ([77.238.179.187]:33832) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iJgz4-0002Wo-FP for emacs-devel@gnu.org; Sun, 13 Oct 2019 12:44:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1570985080; bh=f6qh2+Xl+Xt5+sDM4SVCVzp2z37M1BpeJiK+/UyKJ2U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=b8xpMuReHzigDn6UGVb50lHgKAvvyt/19duxETd6gVaP9EKrvIdwOXLvxWLDW6pi0FXEuE+Ukyo+/CilFSyVgxG91EiwE86AavvR1i73ImOcTBRUQYSEd5E6cCgfHczUdD9tiVQiaZ9nNqC926uA3ejuLTP2h3VHTUtgv332nQEg26mY+iKLyEVDljLyQy7XzOybsBjcwdC1xzJANvmZjRaKvxcID4V9Yhob5sy/E9CRbsC2l4ZhBFBxh9yMZTvypGzHKCOHDUIsVQ1MYHI5WA/FZcoc8zrpKR5kWVeEijZrD+j05YI+iVQR79PMv5+86I/qxzUFNHUOUgGgamEHLQ== X-YMail-OSG: ijWyDUIVM1nT7zxPuZTMvGhKjnPRBxVL_dNP5ULKXaOIwYndw90FhckCBz67xwg 1PhRCxzctsJwAlv5b1BwTuNSWB6r4jcDzui7JJDHnIRc_Ni7Am4oL5P2_Rh4JauDXlCrg8HKD.nU NUoUBKEepnomlpaGQNtwLpuVk8hTutwYrL1pVZYsZv.Qf9Rfds9kta1ETfkgcXr1lloec_byFi_s wtYUVe6Tsfff3_PbIEFeN62WY.EhzfcZLqDqsL7RFXOZ.w9chw5FjHd6N80Md6JVLBjGnxYaMZPc uNUR8vlbcS72IGSC5x7.DbvNN6LIwiDlMxaMgWOeKhoRXhy_THEUl_B9bue8iWbInvavTwy2O1Uu YvrJ4vYpupcXsUoPw_e6IO_h_1bp1GFNR4rcolY4C2p6cimyAamIlu.mOF.8WNGOliumEaro7mJJ tnJQOtmaVon.F_7bPKt2J8jWZ7Jf.ElOyafYe_zM2gL52OJBrfi3eK0OzfSrewBz.cMoFiSpFtuh QFnRg..LdcreUsBQnDh2tvSO0ninWkcmiZsfxwEmLap_WUsRLyA3YvE0HTbqExULYx5xrZUzCOKY h8XmglUNmGIZWtZfmFUcb_Sv.ruQpjO36fhs5L4Y52vMci1dN99XHOmDohV_NNBSAOhfr571dC1z kqUP6EWJAKh.q0f8qfd0keLcLQOMipsa8zJDFUFfDSQ3hkKqruBgfgKobt63SYGnttygSzc.gob3 Nk7V8LomNGTiaVpcEPUCAi69IpDmxHsO9tJMU0evl8PHszRGhoP9rt01yQk9B3fExzNHPJLjvY3j zHmJoV.Q4kSGsZVJ7oORHg5cYTphgh.tEQKwLp05XO Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ir2.yahoo.com with HTTP; Sun, 13 Oct 2019 16:44:40 +0000 Original-Received: by smtp421.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID b2196c95b2bcbcb622761a378e6c83f7; Sun, 13 Oct 2019 16:44:37 +0000 (UTC) Content-Disposition: inline In-Reply-To: <83a7a4ljet.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 77.238.179.187 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:240971 Archived-At: On Sun, Oct 13, 2019 at 07:06:18PM +0300, Eli Zaretskii wrote: >> Date: Sun, 13 Oct 2019 17:40:52 +0200 >> From: Ergus >> Cc: rudalics@gmx.at, emacs-devel@gnu.org >> >> #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. > >The WINDOWP test has nothing to do with GUI vs TTY, it tests whether >w->contents is a window or a buffer. > >> What I can't understand is how the code can be in #1 that should always >> filtered by the WINDOWP condition in tui right? > >No, see above. > >This function is a simple depth-first tree traversal of the window >tree, starting from the root window of a frame. Each leaf of the >window tree has a buffer in its w->contents pointer, while >intermediate nodes of the tree have windows in that pointer. > >> 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. > >If it goes to the other branch, it should descend the tree via the >w->next pointer, and eventually get to a leaf node. > >Could it be that redisplay_window_0, or some function it calls, >signals an error, which is caught by internal_condition_case_1? What >happens if you put a breakpoint in signal_or_quit, does it get called >from redisplay_window or some other function called by >redisplay_windows? Yes, actually: #0 0x00005597732a0380 in signal_or_quit (error_symbol=0x2cd0, data=0x559775ee2633, keyboard_quit=false) at ../../src/eval.c:1586 #1 0x000055977314c308 in Fsignal (error_symbol=, error_symbol@entry=0x2cd0, data=) at ../../src/eval.c:1568 #2 0x000055977314c4c9 in xsignal (data=, error_symbol=0x2cd0) at ../../src/lisp.h:4139 #3 0x000055977314c4c9 in xsignal2 (error_symbol=error_symbol@entry=0x2cd0, arg1=, arg2=) at ../../src/eval.c:1713 #4 0x000055977314b76e in args_out_of_range (a1=, a2=) at ../../src/lisp.h:1032 #5 0x000055977314e97b in validate_interval_range (object=0x559775cee0d5, begin=0x7fff35ec34b8, end=0x7fff35ec34b8, force=) at ../../src/textprop.c:158 #6 0x00005597732f4050 in Ftext_properties_at (position=, object=) at ../../src/textprop.c:572 #7 0x00005597732f40bc in Fget_text_property (position=, prop=0x5d30, object=) at ../../src/textprop.c:592 #8 0x00005597731f8eec in face_at_buffer_position (w=0x5597758e7620, pos=0, endptr=endptr@entry=0x7fff35ec3650, limit=100, mouse=mouse@entry=false, base_face_id=1, attr_filter=LFACE_EXTEND_INDEX) at ../../src/xfaces.c:6090 #9 0x000055977316ab25 in face_at_pos (it=0x7fff35ec3710, attr_filter=LFACE_EXTEND_INDEX) at ../../src/xdisp.c:4167 #10 0x000055977317083d in extend_face_to_end_of_line (it=0x7fff35ec3710) at ../../src/xdisp.c:21584 #11 0x0000559773185891 in display_mode_line (w=w@entry=0x5597758e7620, face_id=, format=0x7efd5d2d9ed3) at ../../src/xdisp.c:24990 #12 0x0000559773185afe in display_mode_lines (w=w@entry=0x5597758e7620) at ../../src/lisp.h:730 #13 0x000055977319ebbc in redisplay_window (window=0x5597758e7625, just_this_one_p=) at ../../src/xdisp.c:18803 #14 0x00005597731a327b in redisplay_window_0 (window=window@entry=0x5597758e7625) at ../../src/xdisp.c:16146 #15 0x000055977329f014 in internal_condition_case_1 (bfun=bfun@entry=0x5597731a3250 , arg=arg@entry=0x5597758e7625, handlers=, hfun=hfun@entry=0x559773165800 ) at ../../src/eval.c:1379 #16 0x000055977316ec98 in redisplay_windows (window=0x5597758e7625) at ../../src/xdisp.c:16126 #17 0x000055977316ec6d in redisplay_windows (window=0x5597758e7415) at ../../src/xdisp.c:16120 #18 0x000055977318f35d in redisplay_internal () at ../../src/xdisp.c:15596 #19 0x0000559773233f3f in read_char (commandflag=1, map=0x559775ee36d3, prev_event=0x0, used_mouse_menu=0x7fff35ec8cbb, end_time=0x0) at ../../src/keyboard.c:2473 #20 0x000055977323678a 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 #21 0x0000559773237e2c in command_loop_1 () at ../../src/lisp.h:1032 #22 0x000055977329ef87 in internal_condition_case (bfun=bfun@entry=0x559773237c30 , handlers=handlers@entry=0x90, hfun=hfun@entry=0x55977322edc0 ) at ../../src/eval.c:1355 #23 0x0000559773229b94 in command_loop_2 (ignore=ignore@entry=0x0) at ../../src/lisp.h:1032 #24 0x000055977329eee1 in internal_catch (tag=tag@entry=0xd4a0, func=func@entry=0x559773229b70 , arg=arg@entry=0x0) at ../../src/eval.c:1116 #25 0x0000559773229b3b in command_loop () at ../../src/lisp.h:1032 #26 0x000055977322e9d6 in recursive_edit_1 () at ../../src/keyboard.c:714 #27 0x000055977322ed02 in Frecursive_edit () at ../../src/keyboard.c:786 #28 0x0000559773150957 in main (argc=18, argv=) at #../../src/emacs.c:2055 This makes more sense now.