From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#28346: 24.5; Emacs hangs when terminal becomes smaller than set margin Date: Mon, 04 Sep 2017 18:32:19 +0300 Message-ID: <83efrm32f0.fsf@gnu.org> References: <0cffd11a-a66d-c872-76e8-af4aaf21c9ca@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1504539212 1964 195.159.176.226 (4 Sep 2017 15:33:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 4 Sep 2017 15:33:32 +0000 (UTC) Cc: 28346@debbugs.gnu.org To: yorwba Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 04 17:33:18 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dotND-00089t-3Y for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Sep 2017 17:33:15 +0200 Original-Received: from localhost ([::1]:54461 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dotNK-0001Gg-3g for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Sep 2017 11:33:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dotN9-0001EQ-O4 for bug-gnu-emacs@gnu.org; Mon, 04 Sep 2017 11:33:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dotMz-0002I7-Vp for bug-gnu-emacs@gnu.org; Mon, 04 Sep 2017 11:33:11 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40384) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dotMz-0002Hj-TR for bug-gnu-emacs@gnu.org; Mon, 04 Sep 2017 11:33:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dotMz-0005qb-Lp for bug-gnu-emacs@gnu.org; Mon, 04 Sep 2017 11:33:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Sep 2017 15:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28346 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28346-submit@debbugs.gnu.org id=B28346.150453915322441 (code B ref 28346); Mon, 04 Sep 2017 15:33:01 +0000 Original-Received: (at 28346) by debbugs.gnu.org; 4 Sep 2017 15:32:33 +0000 Original-Received: from localhost ([127.0.0.1]:49065 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dotMX-0005pt-2B for submit@debbugs.gnu.org; Mon, 04 Sep 2017 11:32:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dotMV-0005pg-Vq for 28346@debbugs.gnu.org; Mon, 04 Sep 2017 11:32:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dotMM-0001j5-2l for 28346@debbugs.gnu.org; Mon, 04 Sep 2017 11:32:26 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dotML-0001iz-VL; Mon, 04 Sep 2017 11:32:22 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2863 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dotML-0000fb-C3; Mon, 04 Sep 2017 11:32:21 -0400 In-reply-to: <0cffd11a-a66d-c872-76e8-af4aaf21c9ca@gmail.com> (message from yorwba on Mon, 4 Sep 2017 17:49:25 +0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:136581 Archived-At: > From: yorwba > Date: Mon, 4 Sep 2017 17:49:25 +0800 > > This bug only appears when Emacs is run in a terminal emulator that > allows changing the window size. > > Steps to reproduce: > > 1. Run `emacs -nw -Q` in a small terminal window > 2. Evaluate (setq width (window-width (get-buffer-window (current-buffer)))) > The value is 74 in my case. > 3. Enlarge the terminal window (I go fullscreen with 150 columns). > 4. Evaluate (set-window-margins (get-buffer-window (current-buffer)) 0 width) > 5. Resize the terminal emulator window back to the original size (or smaller). > 6. The terminal goes blank and no longer reacts to input. > > Attaching gdb and using finish to end all terminating functions, I found that > it gets stuck in move_it_vertically_backwards (in xdisp.c). It keeps taking > the goto move_further_back without actually moving further back. > > I believe that this is caused by incorrectly adjusting the margins when the > total available width changes. Thanks, but please also show the C backtrace from the place where Emacs hangs, it's an important part of the problem.