From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#44180: 28.0.50; Emacs frames won't redisplay unless resized Date: Tue, 27 Oct 2020 12:48:52 -0700 Message-ID: <87ft5z1mcb.fsf@ericabrahamsen.net> References: <87wnzgkdsj.fsf@ericabrahamsen.net> <83k0vgiyub.fsf@gnu.org> <87k0vgkbgq.fsf@ericabrahamsen.net> <83eeloivgc.fsf@gnu.org> <87lffw1wjv.fsf@ericabrahamsen.net> <7f32498b-1293-f1ee-5636-8ddd5bbff6c1@gmx.at> <87h7qjpeam.fsf@ericabrahamsen.net> <831rhmgx6x.fsf@gnu.org> <874kmipa5r.fsf@ericabrahamsen.net> <9ee49070-b0be-a775-18a2-3c9ee587210b@gmx.at> <87tuugn4ty.fsf@ericabrahamsen.net> <87sg9z1qup.fsf@ericabrahamsen.net> <83eeljecd5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6871"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 44180@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 27 20:50:51 2020 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 1kXUzZ-0001f3-0m for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Oct 2020 20:50:49 +0100 Original-Received: from localhost ([::1]:52730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXUzY-00084X-34 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Oct 2020 15:50:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52984) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXUyo-0007Mn-Lu for bug-gnu-emacs@gnu.org; Tue, 27 Oct 2020 15:50:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34410) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kXUyo-0007dE-4C for bug-gnu-emacs@gnu.org; Tue, 27 Oct 2020 15:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kXUyo-0005wl-2s for bug-gnu-emacs@gnu.org; Tue, 27 Oct 2020 15:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Oct 2020 19:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44180 X-GNU-PR-Package: emacs Original-Received: via spool by 44180-submit@debbugs.gnu.org id=B44180.160382814222745 (code B ref 44180); Tue, 27 Oct 2020 19:50:02 +0000 Original-Received: (at 44180) by debbugs.gnu.org; 27 Oct 2020 19:49:02 +0000 Original-Received: from localhost ([127.0.0.1]:45951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXUxp-0005uf-G9 for submit@debbugs.gnu.org; Tue, 27 Oct 2020 15:49:02 -0400 Original-Received: from ericabrahamsen.net ([52.70.2.18]:33062 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXUxn-0005uS-Ak for 44180@debbugs.gnu.org; Tue, 27 Oct 2020 15:48:59 -0400 Original-Received: from localhost (75-172-112-137.tukw.qwest.net [75.172.112.137]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 1D8CFFAA5A; Tue, 27 Oct 2020 19:48:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1603828133; bh=i8nQ173hjwzLQaHjQtMzFk9FvZS1ZrHVKiLm0AzOtYE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=hS6IJr8vaWyawb1cmyGJFJFm23KChO35vj9peTKeItZFvaHM3FAgmwC9ZnmNS17Dz 3TKSjAEKoU8rZlNTtFPluu1/S06W4TkY2Ua82xNgDm7zoJdLlRQB6TtKjYWRjJYVyH v2Jku0mWdcqDSBKJarIbmvtjOPTrIG97/sWpmgmY= In-Reply-To: <83eeljecd5.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 27 Oct 2020 20:45:58 +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" Xref: news.gmane.io gmane.emacs.bugs:191777 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Eric Abrahamsen >> Cc: Eli Zaretskii , 44180@debbugs.gnu.org >> Date: Tue, 27 Oct 2020 11:11:26 -0700 >> >> I think I'm going to need more help here, though. I have built master >> with optimizations off, I start GDB in a controlling emacs, set a >> breakpoint at xdisp.c:34381 at the beginning of expose_frame, and then >> "run -Q". >> >> That pops up a new frame, and we hit the breakpoint. > > That's the initial frame, isn't it? If so, this is not the frame we > want, we want a frame that was obscured and then gets the focus. > > To save yourself from a lot of unwanted breakpoint hits, I suggest > this paradigm: > > $ gdb ./emacs > (gdb) break Frecenter > (gdb) r -Q > > Inside Emacs: > > M-x blink-cursor-mode RET > M-x global-eldoc-mode RET > > Now create one or more other frames and make them obscured > ("iconified"). Now type C-l -- this will hit the breakpoint in > Frecenter, and GDB will kick in. Then set a breakpoint in > expose_frame and type "continue". Finally, switch to a frame that was > obscured: does the breakpoint in expose_frame break, and if so, is > Emacs told to expose the correct frame, the one that was obscured and > is going to become visible? If it's the correct frame, show the > backtrace. > > Then do all this again, but after reverting the change which causes > the problem. By comparing the backtraces and the behavior, we might > begin to understand how this change causes the problem in your case. Okay, hope this is helpful. I start in a workspace with only the terminal, do the gdb dance, and when I run "r -Q" the first frame appears, in stacked mode, taking up the whole screen. I create a second frame: now i3 has a vertical stack of three windows: terminal, emacs1 and emacs2 -- emacs2 is focused. I shut off blink cursor and global eldoc, note the frame addresses, then move focus "wrap-around" style down and back around to the terminal, so the emacs1 window (which is the "stuck" one in master) never receives focus (that might not be important). Back in the terminal I pause execution, set the expose_frame breakpoint, turn on logging, and continue. Then move focus down to emacs1, back up to the terminal, see the breakpoint has triggered, get a backtrace, and confirm that the frame in question is indeed emacs1. I did that exact routine in both master and a "revert" branch, with the commit reverted. Fingers crossed! --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=master.txt #0 expose_frame (f=0x555556317630, x=0, y=1042, w=1900, h=10) at xdisp.c:34381 #1 0x00005555556f2711 in handle_one_xevent (dpyinfo=0x5555560a2fe0, event=0x7fffffffd420, finish=0x555555e1f6fc , hold_quit=0x7fffffffd730) at xterm.c:8243 #2 0x00005555556f13dd in event_handler_gdk (gxev=0x7fffffffd420, ev=0x555555fecde0, data=0x0) at xterm.c:7768 #3 0x00007ffff75c654f in () at /usr/lib/libgdk-3.so.0 #4 0x00007ffff75ca10b in () at /usr/lib/libgdk-3.so.0 #5 0x00007ffff756e15b in gdk_display_get_event () at /usr/lib/libgdk-3.so.0 #6 0x00007ffff75c9e44 in () at /usr/lib/libgdk-3.so.0 #7 0x00007ffff6f8d914 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0 #8 0x00007ffff6fe17d1 in () at /usr/lib/libglib-2.0.so.0 #9 0x00007ffff6f8c121 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0 #10 0x00007ffff781d597 in gtk_main_iteration () at /usr/lib/libgtk-3.so.0 #11 0x00005555556f5491 in XTread_socket (terminal=0x555555f94d38, hold_quit=0x7fffffffd730) at xterm.c:9395 #12 0x000055555574f92d in gobble_input () at keyboard.c:6890 #13 0x000055555574ff5b in handle_async_input () at keyboard.c:7127 #14 0x000055555574ff7a in process_pending_signals () at keyboard.c:7141 #15 0x0000555555890bab in wait_reading_process_output (time_limit=30, nsecs=0, read_kbd=-1, do_display=true, wait_for_cell=XIL(0), wait_proc=0x0, just_wait_proc=0) at process.c:5248 #16 0x00005555555a857f in sit_for (timeout=make_fixnum(30), reading=true, display_option=1) at dispnew.c:6056 #17 0x0000555555744631 in read_char (commandflag=1, map=XIL(0x555555f8dbb3), prev_event=XIL(0), used_mouse_menu=0x7fffffffdf5d, end_time=0x0) at keyboard.c:2742 #18 0x0000555555757125 in read_key_sequence (keybuf=0x7fffffffe140, prompt=XIL(0), dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:9552 #19 0x000055555573fd76 in command_loop_1 () at keyboard.c:1354 #20 0x000055555581db25 in internal_condition_case (bfun=0x55555573f8dc , handlers=XIL(0x90), hfun=0x55555573eed0 ) at eval.c:1359 #21 0x000055555573f4c5 in command_loop_2 (ignore=XIL(0)) at keyboard.c:1095 #22 0x000055555581cf79 in internal_catch (tag=XIL(0xd710), func=0x55555573f498 , arg=XIL(0)) at eval.c:1120 #23 0x000055555573f464 in command_loop () at keyboard.c:1074 #24 0x000055555573e9b9 in recursive_edit_1 () at keyboard.c:718 #25 0x000055555573ebb0 in Frecursive_edit () at keyboard.c:790 #26 0x000055555573a984 in main (argc=2, argv=0x7fffffffe5c8) at emacs.c:2047 Continuing. Thread 1 "emacs" hit Breakpoint 3, expose_frame (f=0x555556317630, x=0, y=1052, w=1916, h=12) at xdisp.c:34381 34381 { Continuing. Thread 1 "emacs" received signal SIGTSTP, Stopped (user). 0x00007ffff5af2c96 in pselect () from /usr/lib/libc.so.6 #0 0x00007ffff5af2c96 in pselect () at /usr/lib/libc.so.6 #1 0x00005555558d3322 in really_call_select (arg=0x7fffffffd170) at thread.c:592 #2 0x00005555557e1ff5 in flush_stack_call_func1 (func=0x5555558d325b , arg=0x7fffffffd170) at alloc.c:5066 #3 0x00005555558d2620 in flush_stack_call_func (func=0x5555558d325b , arg=0x7fffffffd170) at lisp.h:3791 #4 0x00005555558d341f in thread_select (func=0x7ffff5af2bd0 , max_fds=7, rfds=0x7fffffffd280, wfds=0x7fffffffd300, efds=0x0, timeout=0x7fffffffd8d0, sigmask=0x0) at thread.c:624 #5 0x0000555555909f8a in xg_select (fds_lim=7, rfds=0x7fffffffd940, wfds=0x7fffffffd9c0, efds=0x0, timeout=0x7fffffffd8d0, sigmask=0x0) at xgselect.c:131 #6 0x0000555555891bdc in wait_reading_process_output (time_limit=30, nsecs=0, read_kbd=-1, do_display=true, wait_for_cell=XIL(0), wait_proc=0x0, just_wait_proc=0) at process.c:5604 #7 0x00005555555a857f in sit_for (timeout=make_fixnum(30), reading=true, display_option=1) at dispnew.c:6056 #8 0x0000555555744631 in read_char (commandflag=1, map=XIL(0x555555f8dbb3), prev_event=XIL(0), used_mouse_menu=0x7fffffffdf5d, end_time=0x0) at keyboard.c:2742 #9 0x0000555555757125 in read_key_sequence (keybuf=0x7fffffffe140, prompt=XIL(0), dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:9552 #10 0x000055555573fd76 in command_loop_1 () at keyboard.c:1354 #11 0x000055555581db25 in internal_condition_case (bfun=0x55555573f8dc , handlers=XIL(0x90), hfun=0x55555573eed0 ) at eval.c:1359 #12 0x000055555573f4c5 in command_loop_2 (ignore=XIL(0)) at keyboard.c:1095 #13 0x000055555581cf79 in internal_catch (tag=XIL(0xd710), func=0x55555573f498 , arg=XIL(0)) at eval.c:1120 #14 0x000055555573f464 in command_loop () at keyboard.c:1074 #15 0x000055555573e9b9 in recursive_edit_1 () at keyboard.c:718 #16 0x000055555573ebb0 in Frecursive_edit () at keyboard.c:790 #17 0x000055555573a984 in main (argc=2, argv=0x7fffffffe5c8) at emacs.c:2047 Continuing. [Thread 0x7ffff1132640 (LWP 49694) exited] [Thread 0x7ffff2cf3fc0 (LWP 49690) exited] [Inferior 1 (process 49690) exited normally] --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=revert.txt #0 0x00007ffff5af2c96 in pselect () at /usr/lib/libc.so.6 #1 0x000055555576b78c in really_call_select (arg=0x7fffffffcf70) at thread.c:592 #2 0x000055555576c56f in flush_stack_call_func (arg=0x7fffffffcf70, func=0x55555576b720 ) at lisp.h:3791 #3 thread_select (func=, max_fds=max_fds@entry=7, rfds=rfds@entry=0x7fffffffd070, wfds=wfds@entry=0x7fffffffd0f0, efds=efds@entry=0x0, timeout=timeout@entry=0x7fffffffd6a0, sigmask=0x0) at thread.c:624 #4 0x0000555555788ffb in xg_select (fds_lim=7, rfds=rfds@entry=0x7fffffffd7b0, wfds=wfds@entry=0x7fffffffd830, efds=efds@entry=0x0, timeout=timeout@entry=0x7fffffffd6a0, sigmask=sigmask@entry=0x0) at xgselect.c:131 #5 0x0000555555749dcd in wait_reading_process_output (time_limit=time_limit@entry=30, nsecs=nsecs@entry=0, read_kbd=read_kbd@entry=-1, do_display=do_display@entry=true, wait_for_cell=wait_for_cell@entry=XIL(0), wait_proc=wait_proc@entry=0x0, just_wait_proc=0) at process.c:5604 #6 0x00005555555ab1ff in sit_for (timeout=timeout@entry=make_fixnum(30), reading=reading@entry=true, display_option=display_option@entry=1) at lisp.h:1007 #7 0x000055555569431f in read_char (commandflag=1, map=XIL(0x55555613fad3), prev_event=XIL(0), used_mouse_menu=0x7fffffffe04b, end_time=0x0) at lisp.h:1122 #8 0x0000555555694d44 in read_key_sequence (keybuf=, prompt=XIL(0), dont_downcase_last=, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=) at keyboard.c:9552 #9 0x00005555556966cc in command_loop_1 () at lisp.h:1007 #10 0x0000555555703167 in internal_condition_case (bfun=bfun@entry=0x5555556964e0 , handlers=handlers@entry=XIL(0x90), hfun=hfun@entry=0x55555568cc10 ) at eval.c:1359 #11 0x0000555555687194 in command_loop_2 (ignore=ignore@entry=XIL(0)) at lisp.h:1007 #12 0x00005555557030c1 in internal_catch (tag=tag@entry=XIL(0xd710), func=func@entry=0x555555687170 , arg=arg@entry=XIL(0)) at eval.c:1120 #13 0x000055555568713b in command_loop () at lisp.h:1007 #14 0x000055555568c826 in recursive_edit_1 () at keyboard.c:718 #15 0x000055555568cb52 in Frecursive_edit () at keyboard.c:790 #16 0x00005555555a0fcc in main (argc=2, argv=) at emacs.c:2047 Continuing. Thread 1 "emacs" hit Breakpoint 3, expose_frame (f=0x55555604ae20, x=0, y=1042, w=1916, h=22) at xdisp.c:34381 34381 { #0 expose_frame (f=0x55555604ae20, x=0, y=1042, w=1916, h=22) at xdisp.c:34381 #1 0x0000555555661b40 in handle_one_xevent (dpyinfo=, event=0x7fffffffd270, finish=0x555555b68ab0 , hold_quit=) at xterm.c:8243 #2 0x0000555555663078 in event_handler_gdk (gxev=0x7fffffffd270, ev=, data=) at xterm.c:7767 #3 0x00007ffff75c654f in () at /usr/lib/libgdk-3.so.0 #4 0x00007ffff75ca10b in () at /usr/lib/libgdk-3.so.0 #5 0x00007ffff756e15b in gdk_display_get_event () at /usr/lib/libgdk-3.so.0 #6 0x00007ffff75c9e44 in () at /usr/lib/libgdk-3.so.0 #7 0x00007ffff6f8d914 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0 #8 0x00007ffff6fe17d1 in () at /usr/lib/libglib-2.0.so.0 #9 0x00007ffff6f8c121 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0 #10 0x00007ffff781d597 in gtk_main_iteration () at /usr/lib/libgtk-3.so.0 #11 0x0000555555655df3 in XTread_socket (terminal=, hold_quit=0x7fffffffd530) at xterm.c:9394 #12 0x000055555568e552 in gobble_input () at keyboard.c:6890 #13 0x000055555568eb35 in handle_async_input () at keyboard.c:7127 #14 process_pending_signals () at keyboard.c:7141 #15 0x0000555555749e1d in wait_reading_process_output (time_limit=time_limit@entry=30, nsecs=nsecs@entry=0, read_kbd=read_kbd@entry=-1, do_display=do_display@entry=true, wait_for_cell=wait_for_cell@entry=XIL(0), wait_proc=wait_proc@entry=0x0, just_wait_proc=0) at process.c:5248 #16 0x00005555555ab1ff in sit_for (timeout=timeout@entry=make_fixnum(30), reading=reading@entry=true, display_option=display_option@entry=1) at lisp.h:1007 #17 0x000055555569431f in read_char (commandflag=1, map=XIL(0x555555c60ed3), prev_event=XIL(0), used_mouse_menu=0x7fffffffe04b, end_time=0x0) at lisp.h:1122 #18 0x0000555555694d44 in read_key_sequence (keybuf=, prompt=XIL(0), dont_downcase_last=, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=) at keyboard.c:9552 #19 0x00005555556966cc in command_loop_1 () at lisp.h:1007 #20 0x0000555555703167 in internal_condition_case (bfun=bfun@entry=0x5555556964e0 , handlers=handlers@entry=XIL(0x90), hfun=hfun@entry=0x55555568cc10 ) at eval.c:1359 #21 0x0000555555687194 in command_loop_2 (ignore=ignore@entry=XIL(0)) at lisp.h:1007 #22 0x00005555557030c1 in internal_catch (tag=tag@entry=XIL(0xd710), func=func@entry=0x555555687170 , arg=arg@entry=XIL(0)) at eval.c:1120 #23 0x000055555568713b in command_loop () at lisp.h:1007 #24 0x000055555568c826 in recursive_edit_1 () at keyboard.c:718 #25 0x000055555568cb52 in Frecursive_edit () at keyboard.c:790 #26 0x00005555555a0fcc in main (argc=2, argv=) at emacs.c:2047 Currently logging to "gdb.txt". Logs will be appended to the log file. Output will be logged and displayed. Debug output will be logged and displayed. Continuing. [Thread 0x7ffff1133640 (LWP 49752) exited] [Thread 0x7ffff2cf3fc0 (LWP 49748) exited] [Inferior 1 (process 49748) exited normally] --=-=-=--