unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Keith David Bershatsky <esq@lawlist.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Debugging printing to stderr prior glyph row values ....
Date: Fri, 24 May 2019 07:56:25 -0700	[thread overview]
Message-ID: <m236l3aokm.wl%esq@lawlist.com> (raw)

Thank you, Eli, for teaching me how to debug this particular issue and also how to avoid crashes of this nature in the future.  I was unaware that an enabled_p (true) row could have zero glyphs.  Now that I know this is possible, I can programmatically deal with it.

Inasmuch as rows following a row with _only_ ZV contain an ends_at_zv_p flag that is also true, and because there may be no guarantee that the preceding row in the matrix can be relied upon to ascertain whether it ends at ZV, I believe a new flag would be helpful (at least in this particular context) -- i.e., beyond_zv_p versus ends_at_zv_p.  That way, only one row in the entire matrix will have a flag that indicates an at-ZV versus a post-ZV situation.  I'll spend some time on Saturday digging around xdisp.c ...

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

> Date: [05-23-2019 23:45:44] <24 May 2019 09:45:44 +0300>
> From: Eli Zaretskii <eliz@gnu.org>
> To: Keith David Bershatsky <esq@lawlist.com>
> CC: emacs-devel@gnu.org
> Subject: Re: Debugging printing to stderr prior glyph row values ....
> 
> > Date:  Thu, 23 May 2019 17:03:36 -0700
> > From:  Keith David Bershatsky <esq@lawlist.com>
> > Cc:  emacs-devel@gnu.org
> >
> > I got it to crash ... again.  "pgrowx previous_row" from gdb prints nothing and returns to a new gdb command prompt.
> 
> This means the previous glyph row had its 'used' member equal to zero.
> 
> > [CAVEAT:  I wanted a crash, so I did not insert a test for the 'used' member being greater than zero.]
> 
> And it shows:
> 
> > (gdb) print *previous_row
> > $3 = {
> >   glyphs = {0x11a800000, 0x11a800000, 0x11a803520, 0x11a803520},
> >   used = {0, 0, 0, 0},
> 
> See? all of the 'used' members are zero.  IOW, there are no glyphs in
> that row.



             reply	other threads:[~2019-05-24 14:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-24 14:56 Keith David Bershatsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-05-24  0:03 Debugging printing to stderr prior glyph row values Keith David Bershatsky
2019-05-24  6:45 ` Eli Zaretskii
2019-05-23 22:01 Keith David Bershatsky
2019-05-23 17:23 Keith David Bershatsky
2019-05-23 18:38 ` Eli Zaretskii
2019-05-23  4:14 Keith David Bershatsky
2019-05-23 14:43 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m236l3aokm.wl%esq@lawlist.com \
    --to=esq@lawlist.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).