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: Thu, 23 May 2019 17:03:36 -0700	[thread overview]
Message-ID: <m2tvdku3af.wl%esq@lawlist.com> (raw)

I got it to crash ... again.  "pgrowx previous_row" from gdb prints nothing and returns to a new gdb command prompt.

[CAVEAT:  I wanted a crash, so I did not insert a test for the 'used' member being greater than zero.]

Program received signal SIGSEGV, Segmentation fault.
0x0000000100045d3b in mc_draw_row (w=0x11b88b838, matrix=0x11b1d3210,
    row=0x105c89200, start=0x105d24e00, x=0, hpos_length=1, vpos=18,
    bottom_vpos=40, active_p=true, cursor_matrix=0x1011319c0, fc_x=770,
    ch_foreground=..., fc_foreground=..., mc_zv=16, mc_zv_byte=16,
    draw_p=false, from_where=SCRIBE_ONE) at xdisp.c:4605
4605	  fprintf (stderr, "\nA.  vpos (%d) | glyph->charpos (%d) | posint (%d) | zv (%d) | zv_byte (%d)\n\


(gdb) pp w->contents

#<buffer *MC-TEST*>


(gdb) pgrowx previous_row


(gdb) pgrowx row

TEXT: 1 glyphs
  0    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=11 a+d=16+4 MB


(gdb) print vpos

$1 = 18


(gdb) print previous_row

$2 = (struct glyph_row *) 0x105c89100


(gdb) print *previous_row
$3 = {
  glyphs = {0x11a800000, 0x11a800000, 0x11a803520, 0x11a803520},
  used = {0, 0, 0, 0},
  hash = 0,
  x = 0,
  y = 344,
  pixel_width = 11,
  ascent = 16,
  height = 20,
  phys_ascent = 0,
  phys_height = 0,
  visible_height = 20,
  extra_line_spacing = 0,
  start = {
    pos = {
      charpos = 16,
      bytepos = 16
    },
    overlay_string_index = -1,
    string_pos = {
      charpos = -1,
      bytepos = -1
    },
    dpvec_index = -1
  },
  end = {
    pos = {
      charpos = 16,
      bytepos = 16
    },
    overlay_string_index = -1,
    string_pos = {
      charpos = -1,
      bytepos = -1
    },
    dpvec_index = -1
  },
  minpos = {
    charpos = 16,
    bytepos = 16
  },
  maxpos = {
    charpos = 16,
    bytepos = 16
  },
  overlay_arrow_bitmap = 0,
  left_user_fringe_bitmap = 0,
  right_user_fringe_bitmap = 0,
  left_fringe_bitmap = 0,
  right_fringe_bitmap = 0,
  left_user_fringe_face_id = 0,
  right_user_fringe_face_id = 0,
  left_fringe_face_id = 0,
  right_fringe_face_id = 0,
  left_fringe_offset = 0,
  right_fringe_offset = 0,
  fringe_bitmap_periodic_p = false,
  redraw_fringe_bitmaps_p = true,
  enabled_p = true,
  truncated_on_left_p = false,
  truncated_on_right_p = false,
  continued_p = false,
  displays_text_p = false,
  ends_at_zv_p = true,
  fill_line_p = false,
  indicate_empty_line_p = false,
  contains_overlapping_glyphs_p = false,
  full_width_p = false,
  mode_line_p = false,
  overlapped_p = false,
  ends_in_middle_of_char_p = false,
  starts_in_middle_of_char_p = false,
  overlapping_p = false,
  mouse_face_p = false,
  ends_in_newline_from_string_p = false,
  exact_window_width_line_p = false,
  cursor_in_fringe_p = false,
  ends_in_ellipsis_p = false,
  indicate_bob_p = false,
  indicate_top_line_p = false,
  indicate_eob_p = false,
  indicate_bottom_line_p = false,
  reversed_p = false,
  continuation_lines_width = 0,
  clip = 0x0
}

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

> Date: [05-23-2019 11:38:25] <23 May 2019 21:38:25 +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 10:23:03 -0700
> > From:  Keith David Bershatsky <esq@lawlist.com>
> > Cc:  emacs-devel@gnu.org
>
> > I will add a test for the `used` row member to ensure that it is positive.  The crashing reported in the initial post only happens somtimes, so I'll need to do some further testing.
>
> Did you look at the problematic row with the GDB command "pgrowx"?
> It's important to understand what kind of glyphs are in that row and
> how many of them do you have there.
>
> * * *



             reply	other threads:[~2019-05-24  0:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-24  0:03 Keith David Bershatsky [this message]
2019-05-24  6:45 ` Debugging printing to stderr prior glyph row values Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2019-05-24 14:56 Keith David Bershatsky
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=m2tvdku3af.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).