bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#6621: Emacs crash when trying to report emacs crash


From: Yair F
Subject: bug#6621: Emacs crash when trying to report emacs crash
Date: Thu, 22 Jul 2010 22:55:24 +0300

Eli,
Since Handa-san is appearnly unavailable I tried to investigate the
crash myself.
The problem that I know nothing about emacs' structure.
All I can do is send the debug session. If you  think that you can
instruct me more on how to debug it let me know.
I'll try to get something more meaningful.

br 6138 if it->position.charpos==150
Breakpoint 7 at 0x809ca12: file xdisp.c, line 6138.
(gdb) c
Continuing.

Breakpoint 7, set_iterator_to_next (it=0xbfffdeb4, reseat_p=1) at xdisp.c:6142
(gdb) p it->position.charpos
$7 = 150
(gdb) pit
cur=150[276] pos=150[276] start=128[235] end=151 stop=151 face=15 MB ch='@'
vpos=6 hpos=17 y=102 lvy=646 x=114 vx=0-560 w=8 a+d=13+4=17 max=13+4=17
(gdb) p it->what
$8 = IT_CHARACTER
(gdb) p *it
$9 = {
  window = 144783445,
  w = 0x8a13850,
  f = 0x8a136d0,
  method = GET_FROM_BUFFER,
  stop_charpos = 151,
  prev_stop = 0,
  base_level_stop = 0,
  end_charpos = 151,
  s = 0x0,
  string_nchars = 0,
  region_beg_charpos = -1,
  region_end_charpos = -1,
  redisplay_end_trigger_charpos = 0,
  multibyte_p = 1,
  header_line_p = 0,
  string_from_display_prop_p = 0,
  ellipsis_p = 0,
  avoid_cursor_p = 0,
  dp = 0x0,
  dpvec = 0x0,
  dpend = 0xbfffdf0c,
  dpvec_char_len = 1,
  dpvec_face_id = 16,
  saved_face_id = 15,
  ctl_chars = {376, 256, 0 <repeats 14 times>},
  start = {
    pos = {
      charpos = 128,
      bytepos = 235
    },
    overlay_string_index = -1,
    string_pos = {
      charpos = -1,
      bytepos = -1
    },
    dpvec_index = -1
  },
  current = {
    pos = {
      charpos = 150,
      bytepos = 276
    },
    overlay_string_index = -1,
    string_pos = {
      charpos = -1,
      bytepos = -1
    },
    dpvec_index = -1
  },
  n_overlay_strings = 0,
  overlay_strings = {0 <repeats 16 times>},
  string_overlays = {0 <repeats 16 times>},
  string = 142119346,
  from_overlay = 0,
  stack = {{
      string = 0,
      string_nchars = 0,
      end_charpos = 0,
      stop_charpos = 0,
      prev_stop = 0,
      base_level_stop = 0,
      cmp_it = {
        stop_pos = 0,
        id = 0,
        ch = 0,
        rule_idx = 0,
        lookback = 0,
        nglyphs = 0,
        reversed_p = 0,
        charpos = 0,
        nchars = 0,
        nbytes = 0,
        from = 0,
        to = 0,
        width = 0
      },
      face_id = 0,
      u = {
        image = {
          object = 0,
          slice = {
            x = 0,
            y = 0,
            width = 0,
            height = 0
          },
          image_id = 0
        },
        comp = {
          object = 0
        },
        stretch = {
          object = 0
        }
      },
      position = {
        charpos = 0,
        bytepos = 0
      },
      current = {
        pos = {
          charpos = 0,
          bytepos = 0
        },
        overlay_string_index = 0,
        string_pos = {
          charpos = 0,
          bytepos = 0
        },
        dpvec_index = 0
      },
      from_overlay = 0,
      area = LEFT_MARGIN_AREA,
      method = GET_FROM_BUFFER,
      multibyte_p = 0,
      string_from_display_prop_p = 0,
      display_ellipsis_p = 0,
      avoid_cursor_p = 0,
      line_wrap = TRUNCATE,
      voffset = 0,
      space_width = 0,
      font_height = 0
    }, {
      string = 0,
      string_nchars = 0,
      end_charpos = 0,
      stop_charpos = 0,
      prev_stop = 0,
      base_level_stop = 0,
      cmp_it = {
        stop_pos = 0,
        id = 0,
        ch = 0,
        rule_idx = 0,
        lookback = 0,
        nglyphs = 0,
        reversed_p = 0,
        charpos = 0,
        nchars = 0,
        nbytes = 0,
        from = 0,
        to = 0,
        width = 0
      },
      face_id = 0,
      u = {
        image = {
          object = 0,
          slice = {
            x = 0,
            y = 0,
            width = 0,
            height = 0
          },
          image_id = 0
        },
        comp = {
          object = 0
        },
        stretch = {
          object = 0
        }
      },
      position = {
        charpos = 0,
        bytepos = 0
      },
      current = {
        pos = {
          charpos = 0,
          bytepos = 0
        },
        overlay_string_index = 0,
        string_pos = {
          charpos = 0,
          bytepos = 0
        },
        dpvec_index = 0
      },
      from_overlay = 0,
      area = LEFT_MARGIN_AREA,
      method = GET_FROM_BUFFER,
      multibyte_p = 0,
      string_from_display_prop_p = 0,
      display_ellipsis_p = 0,
      avoid_cursor_p = 0,
      line_wrap = TRUNCATE,
      voffset = 0,
      space_width = 0,
      font_height = 0
    }, {
      string = 0,
      string_nchars = 0,
      end_charpos = 0,
      stop_charpos = 0,
      prev_stop = 0,
      base_level_stop = 0,
      cmp_it = {
        stop_pos = 0,
        id = 0,
        ch = 0,
        rule_idx = 0,
        lookback = 0,
        nglyphs = 0,
        reversed_p = 0,
        charpos = 0,
        nchars = 0,
        nbytes = 0,
        from = 0,
        to = 0,
        width = 0
      },
      face_id = 0,
      u = {
        image = {
          object = 0,
          slice = {
            x = 0,
            y = 0,
            width = 0,
            height = 0
          },
          image_id = 0
        },
        comp = {
          object = 0
        },
        stretch = {
          object = 0
        }
      },
      position = {
        charpos = 0,
        bytepos = 0
      },
      current = {
        pos = {
          charpos = 0,
          bytepos = 0
        },
        overlay_string_index = 0,
        string_pos = {
          charpos = 0,
          bytepos = 0
        },
        dpvec_index = 0
      },
      from_overlay = 0,
      area = LEFT_MARGIN_AREA,
      method = GET_FROM_BUFFER,
      multibyte_p = 0,
      string_from_display_prop_p = 0,
      display_ellipsis_p = 0,
      avoid_cursor_p = 0,
      line_wrap = TRUNCATE,
      voffset = 0,
      space_width = 0,
      font_height = 0
    }, {
      string = 0,
      string_nchars = 0,
      end_charpos = 0,
      stop_charpos = 0,
      prev_stop = 0,
      base_level_stop = 0,
      cmp_it = {
        stop_pos = 0,
        id = 0,
        ch = 0,
        rule_idx = 0,
        lookback = 0,
        nglyphs = 0,
        reversed_p = 0,
        charpos = 0,
        nchars = 0,
        nbytes = 0,
        from = 0,
        to = 0,
        width = 0
      },
      face_id = 0,
      u = {
        image = {
          object = 0,
          slice = {
            x = 0,
            y = 0,
            width = 0,
            height = 0
          },
          image_id = 0
        },
        comp = {
          object = 0
        },
        stretch = {
          object = 0
        }
      },
      position = {
        charpos = 0,
        bytepos = 0
      },
      current = {
        pos = {
          charpos = 0,
          bytepos = 0
        },
        overlay_string_index = 0,
        string_pos = {
          charpos = 0,
          bytepos = 0
        },
        dpvec_index = 0
      },
      from_overlay = 0,
      area = LEFT_MARGIN_AREA,
      method = GET_FROM_BUFFER,
      multibyte_p = 0,
      string_from_display_prop_p = 0,
      display_ellipsis_p = 0,
      avoid_cursor_p = 0,
      line_wrap = TRUNCATE,
      voffset = 0,
      space_width = 0,
      font_height = 0
    }, {
      string = 0,
      string_nchars = 0,
      end_charpos = 0,
      stop_charpos = 0,
      prev_stop = 0,
      base_level_stop = 0,
      cmp_it = {
        stop_pos = 0,
        id = 0,
        ch = 0,
        rule_idx = 0,
        lookback = 0,
        nglyphs = 0,
        reversed_p = 0,
        charpos = 0,
        nchars = 0,
        nbytes = 0,
        from = 0,
        to = 0,
        width = 0
      },
      face_id = 0,
      u = {
        image = {
          object = 0,
          slice = {
            x = 0,
            y = 0,
            width = 0,
            height = 0
          },
          image_id = 0
        },
        comp = {
          object = 0
        },
        stretch = {
          object = 0
        }
      },
      position = {
        charpos = 0,
        bytepos = 0
      },
      current = {
        pos = {
          charpos = 0,
          bytepos = 0
        },
        overlay_string_index = 0,
        string_pos = {
          charpos = 0,
          bytepos = 0
        },
        dpvec_index = 0
      },
      from_overlay = 0,
      area = LEFT_MARGIN_AREA,
      method = GET_FROM_BUFFER,
      multibyte_p = 0,
      string_from_display_prop_p = 0,
      display_ellipsis_p = 0,
      avoid_cursor_p = 0,
      line_wrap = TRUNCATE,
      voffset = 0,
      space_width = 0,
      font_height = 0
    }},
  sp = 0,
  selective = 0,
  what = IT_CHARACTER,
  face_id = 15,
  selective_display_ellipsis_p = 1,
  ctl_arrow_p = 1,
  face_box_p = 0,
  start_of_box_run_p = 0,
  end_of_box_run_p = 0,
  overlay_strings_at_end_processed_p = 0,
  ignore_overlay_strings_at_pos_p = 0,
  glyph_not_available_p = 0,
  starts_in_middle_of_char_p = 0,
  face_before_selective_p = 0,
  constrain_row_ascent_descent_p = 0,
  line_wrap = WINDOW_WRAP,
  base_face_id = 0,
  c = 64,
  len = 1,
  cmp_it = {
    stop_pos = 151,
    id = -1,
    ch = -2,
    rule_idx = 2,
    lookback = 1,
    nglyphs = 2,
    reversed_p = 0,
    charpos = 149,
    nchars = 1,
    nbytes = 2,
    from = 1,
    to = 2,
    width = 0
  },
  char_to_display = 64,
  image_id = 0,
  slice = {
    x = 142119346,
    y = 142119346,
    width = 142119346,
    height = 142119346
  },
  space_width = 142119346,
  voffset = 0,
  tab_width = 8,
  font_height = 142119346,
  object = 149209493,
  position = {
    charpos = 150,
    bytepos = 276
  },
  truncation_pixel_width = 0,
  continuation_pixel_width = 0,
  first_visible_x = 0,
  last_visible_x = 560,
  last_visible_y = 646,
  extra_line_spacing = 0,
  max_extra_line_spacing = 0,
  override_ascent = -1,
  override_descent = 0,
  override_boff = 0,
  glyph_row = 0x8fb8448,
  area = TEXT_AREA,
  nglyphs = 1,
  pixel_width = 8,
  ascent = 13,
  descent = 4,
  max_ascent = 13,
  max_descent = 4,
  phys_ascent = 10,
  phys_descent = 2,
  max_phys_ascent = 13,
  max_phys_descent = 4,
  current_x = 114,
  continuation_lines_width = 0,
  eol_pos = {
    charpos = 0,
    bytepos = 0
  },
  current_y = 102,
  first_vpos = 0,
  vpos = 6,
  hpos = 17,
  left_user_fringe_bitmap = 0,
  right_user_fringe_bitmap = 0,
  left_user_fringe_face_id = 0,
  right_user_fringe_face_id = 0,
  bidi_p = 0,
  bidi_it = {
    bytepos = 0,
    charpos = 0,
    ch = 0,
    ch_len = 0,
    type = UNKNOWN_BT,
    type_after_w1 = UNKNOWN_BT,
    orig_type = UNKNOWN_BT,
    resolved_level = 0,
    invalid_levels = 0,
    invalid_rl_levels = 0,
    prev_was_pdf = 0,
    prev = {
      bytepos = 0,
      charpos = 0,
      type = UNKNOWN_BT,
      type_after_w1 = UNKNOWN_BT,
      orig_type = UNKNOWN_BT
    },
    last_strong = {
      bytepos = 0,
      charpos = 0,
      type = UNKNOWN_BT,
      type_after_w1 = UNKNOWN_BT,
      orig_type = UNKNOWN_BT
    },
    next_for_neutral = {
      bytepos = 0,
      charpos = 0,
      type = UNKNOWN_BT,
      type_after_w1 = UNKNOWN_BT,
      orig_type = UNKNOWN_BT
    },
    prev_for_neutral = {
      bytepos = 0,
      charpos = 0,
      type = UNKNOWN_BT,
      type_after_w1 = UNKNOWN_BT,
      orig_type = UNKNOWN_BT
    },
    next_for_ws = {
      bytepos = 0,
      charpos = 0,
      type = UNKNOWN_BT,
      type_after_w1 = UNKNOWN_BT,
      orig_type = UNKNOWN_BT
    },
    next_en_pos = 0,
    ignore_bn_limit = 0,
    sor = NEUTRAL_DIR,
    scan_dir = 0,
    stack_idx = 0,
    level_stack = {{
        level = 0,
        override = NEUTRAL_DIR
      } <repeats 64 times>},
    first_elt = 0,
    paragraph_dir = NEUTRAL_DIR,
    new_paragraph = 0,
    separator_limit = 0
  },
  paragraph_embedding = NEUTRAL_DIR
}
(gdb) s
(gdb) s

Here we are   else if (it->cmp_it.id >= 0)

(gdb) p it->cmp_it
$10 = {
  stop_pos = 151,
  id = -1,
  ch = -2,
  rule_idx = 2,
  lookback = 1,
  nglyphs = 2,
  reversed_p = 0,
  charpos = 149,
  nchars = 1,
  nbytes = 2,
  from = 1,
  to = 2,
  width = 0
}
(gdb) n

Before
          xassert (it->len != 0);


(gdb) p it->len
$11 = 1

These are the damaging lines:
              IT_BYTEPOS (*it) += it->len;
              IT_CHARPOS (*it) += 1;

(gdb) n
(gdb) n
(gdb) n
(gdb) n
Finally this fails:

          xassert (IT_BYTEPOS (*it) == CHAR_TO_BYTE (IT_CHARPOS (*it)));


Breakpoint 1, abort () at emacs.c:430
(gdb) up
#1  0x0809ce55 in set_iterator_to_next (it=0xbfffdeb4, reseat_p=1) at
xdisp.c:6253
(gdb)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]