GNU bug report logs - #24109
24.5; Long lines in message mode make Emacs irresponsive

Previous Next

Package: emacs;

Reported by: Christophe Troestler <Christophe.Troestler <at> umons.ac.be>

Date: Sat, 30 Jul 2016 01:13:01 UTC

Severity: normal

Found in version 24.5

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #59 received at 24109 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Yuri D'Elia <wavexx <at> thregr.org>
Cc: 24109 <at> debbugs.gnu.org, djcb <at> djcbsoftware.nl,
 Christophe.Troestler <at> umons.ac.be, rudalics <at> gmx.at
Subject: Re: bug#24109: 24.5;
 Long lines in message mode make Emacs irresponsive
Date: Wed, 31 Aug 2016 17:37:55 +0300
> From: Yuri D'Elia <wavexx <at> thregr.org>
> Cc: 24109 <at> debbugs.gnu.org, djcb <at> djcbsoftware.nl, Christophe.Troestler <at> umons.ac.be, rudalics <at> gmx.at
> Date: Wed, 31 Aug 2016 11:15:25 +0200
> 
> > What should NOT happen is that the values of it.current.pos stay
> > constant, or cycle endlessly between the same values.  If you can look
> > at that, please do.
> 
> I set a breakpoint and dumped the value of it->current.pos.
> It seems to cycle every 54 iterations. Attached.

Thanks.  Next, we need to establish whether try_window loops in its
loop indefinitely, or its caller calls it in an infinite loop.

The main loop in try_window is this:

  /* Display all lines of W.  */
  while (it.current_y < it.last_visible_y)
    {
      if (display_line (&it))
	last_text_row = it.glyph_row - 1;
      if (f->fonts_changed && !(flags & TRY_WINDOW_IGNORE_FONTS_CHANGE))
	return 0;
    }

Please see if the loop terminates, by setting a breakpoint on the
'return 0' statement and on the line after the loop.

If it terminates, it means try_window does its job correctly, and we
will need to look in the caller, redisplay_window, for the reasons of
this infloop.

> >> Is there some way to conveniently dump the entire buffer state to a file
> >> so we can debug this by reloading the content without having the mail
> >> client in the way?
> >
> > Not that I know of.
> 
> Then, debugging this will be super-annoying :/

Not necessarily, it could be a very simple problem.

Besides, even if there was such a feature, the full state that affects
the display is huge: it should include, in addition to the text
itself, all the text properties, all the face definitions, all the
overlays -- and some of these are dynamically calculated as part of
redisplay.  Even if you could give me that, I'm not sure I could have
spotted the root cause there.




This bug report was last modified 8 years and 304 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.