GNU bug report logs - #891
23.0.60; Emacs aborts after buffer-swap-text

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Thu, 4 Sep 2008 22:40:05 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 891 in the body.
You can then email your comments to 891 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#891; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stephen Berman <stephen.berman <at> gmx.net>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.60; Emacs aborts after buffer-swap-text
Date: Fri, 05 Sep 2008 00:33:41 +0200
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the emacs-pretest-bug <at> gnu.org mailing list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

1. emacs -Q
2. Load the library tabbar.el, available from
http://emhacks.cvs.sourceforge.net/emhacks/emhacks/tabbar.el?revision=1.69&view=markup
3. M-x tabbar-mode
4. M-: (buffer-swap-text (get-buffer "*Messages*"))
5. C-c C-right (tabbar-forward)
   ==> Emacs aborts

The full backtrace is below.  According to the Lisp backtrace, the abort
occurs during or after switch-to-buffer.  Yet typing C-x b after step 4
above does not make Emacs abort.  Moreover, when I directly call any of
the tabbar.el functions listed in the backtrace and step through them
with edebug, this also fails to make Emacs abort.  Yet the above recipe
is reliably reproducible.  

(Since the abort occurs in unshow_buffer, my guess, based on a comment
at line 8314 of xdisp.c, is that switch-to-buffer needs to have
something like the code in with_echo_area_buffer that changes w->pointm.
I guess this would go after the call to Fset_buffer in switch-to-buffer,
but I don't know how to write the code.)

(gdb) r -Q -fn "Dejavu Sans Mono-10"
`/Users/steve/lib/emacs-cvs-gtk/src/emacs' has changed; re-reading symbols.
Breakpoint 1 at 0x8116c06: file /home/steve/cvsroot/emacs/src/emacs.c, line 417.
Breakpoint 2 at 0x8130f89: file /Users/steve/cvsroot/emacs/src/sysdep.c, line 1135.
Starting program: /Users/steve/lib/emacs-cvs-gtk/src/emacs -Q -fn "Dejavu Sans Mono-10"

Breakpoint 1, abort () at /home/steve/cvsroot/emacs/src/emacs.c:417
417       kill (getpid (), SIGABRT);
(gdb) bt full
#0  abort () at /home/steve/cvsroot/emacs/src/emacs.c:417
No locals.
#1  0x08096ebb in unshow_buffer (w=0x8c5a3b0)
    at /home/steve/cvsroot/emacs/src/window.c:1392
        buf = 139270356
#2  0x0809a158 in Fset_window_buffer (window=147170228, buffer=141881804,
    keep_margins=137857225) at /home/steve/cvsroot/emacs/src/window.c:3497
        tem = <value optimized out>
        w = (struct window *) 0x8c5a3b0
#3  0x08139c9b in switch_to_buffer_1 (buffer=141881804, norecord=137857225)
    at /home/steve/cvsroot/emacs/src/buffer.c:1766
        buf = 141881804
#4  0x081802c1 in Feval (form=147885501)
    at /Users/steve/cvsroot/emacs/src/eval.c:2378
        numargs = <value optimized out>
        argvals = {141881804, 137857225, 0, 148096029, -1080555584,
  -1080555720, -1080555776, 2}
        args_left = 137857225
        i = 2
        fun = <value optimized out>
        val = <value optimized out>
        original_fun = 138019601
        original_args = 147885469
        funcar = <value optimized out>
        backtrace = {
  next = 0xbf9807c0,
  function = 0xbf980748,
  args = 0xbf980710,
  nargs = 1,
  evalargs = 1 '\001',
  debug_on_exit = 0 '\0'
}
#5  0x0818056f in Fprogn (args=137857273)
    at /Users/steve/cvsroot/emacs/src/eval.c:449
        val = 137857225
#6  0x08180383 in Feval (form=147886349)
    at /Users/steve/cvsroot/emacs/src/eval.c:2322
        numargs = 137857273
        argvals = {148096829, 148320841, -1080555480, 135790656, -1080555456,
  -1080555576, -1080555680, 2}
        args_left = 147885965
---Type <return> to continue, or q <return> to quit---
        i = <value optimized out>
        fun = <value optimized out>
        val = <value optimized out>
        original_fun = 137996201
        original_args = 147885965
        funcar = <value optimized out>
        backtrace = {
  next = 0xbf9808a0,
  function = 0xbf9807d8,
  args = 0xbf9807d4,
  nargs = -1,
  evalargs = 0 '\0',
  debug_on_exit = 0 '\0'
}
#7  0x0818056f in Fprogn (args=137857273)
    at /Users/steve/cvsroot/emacs/src/eval.c:449
        val = 137857225
#8  0x08182a8f in Flet (args=147886389)
    at /Users/steve/cvsroot/emacs/src/eval.c:1089
        tem = 141881804
        elt = <value optimized out>
        varlist = <value optimized out>
#9  0x08180383 in Feval (form=147887125)
    at /Users/steve/cvsroot/emacs/src/eval.c:2322
        numargs = 137857273
        argvals = {208, 148290853, -1080555424, -1080555312, 148246920, 13,
  142318232, 5}
        args_left = 147886389
        i = <value optimized out>
        fun = <value optimized out>
        val = <value optimized out>
        original_fun = 137998577
        original_args = 147886389
        funcar = <value optimized out>
        backtrace = {
  next = 0xbf980968,
  function = 0xbf9808b8,
  args = 0xbf9808b4,
  nargs = -1,
  evalargs = 0 '\0',
  debug_on_exit = 0 '\0'
---Type <return> to continue, or q <return> to quit---
}
#10 0x0818056f in Fprogn (args=137857273)
    at /Users/steve/cvsroot/emacs/src/eval.c:449
        val = 137857225
#11 0x08180804 in funcall_lambda (fun=147884632, nargs=2,
    arg_vector=0xbf9809b4) at /Users/steve/cvsroot/emacs/src/eval.c:3224
        val = <value optimized out>
        syms_left = 137857225
        next = <value optimized out>
        i = 2
        optional = 0
        rest = 0
#12 0x08180b3f in Ffuncall (nargs=3, args=0xbf9809b0)
    at /Users/steve/cvsroot/emacs/src/eval.c:3101
        fun = 147884637
        original_fun = 142818729
        funcar = <value optimized out>
        numargs = 2
        val = <value optimized out>
        backtrace = {
  next = 0xbf980a00,
  function = 0xbf9809b0,
  args = 0xbf9809b4,
  nargs = 2,
  evalargs = 0 '\0',
  debug_on_exit = 0 '\0'
}
        internal_args = (Lisp_Object *) 0xbf9809b4
        i = <value optimized out>
#13 0x08180370 in Feval (form=148243701)
    at /Users/steve/cvsroot/emacs/src/eval.c:2348
        numargs = <value optimized out>
        argvals = {224, 148096029, 15, 136329824, 136329832, 14, 142318232,
  148135861}
        args_left = 137857225
        i = <value optimized out>
        fun = <value optimized out>
        val = <value optimized out>
        original_fun = 137998889
        original_args = 148243709
        funcar = <value optimized out>
---Type <return> to continue, or q <return> to quit---
        backtrace = {
  next = 0xbf980a90,
  function = 0xbf980a18,
  args = 0xbf9809b0,
  nargs = 3,
  evalargs = 1 '\001',
  debug_on_exit = 0 '\0'
}
#14 0x0818056f in Fprogn (args=137857273)
    at /Users/steve/cvsroot/emacs/src/eval.c:449
        val = 137857225
#15 0x08180383 in Feval (form=148290925)
    at /Users/steve/cvsroot/emacs/src/eval.c:2322
        numargs = 137857273
        argvals = {136329944, 148135861, 137998601, 148134112, 137499040, 0,
  -1080554944, 136329923}
        args_left = 148290933
        i = <value optimized out>
        fun = <value optimized out>
        val = <value optimized out>
        original_fun = 137996225
        original_args = 148290933
        funcar = <value optimized out>
        backtrace = {
  next = 0xbf980b10,
  function = 0xbf980aa8,
  args = 0xbf980aa4,
  nargs = -1,
  evalargs = 0 '\0',
  debug_on_exit = 0 '\0'
}
#16 0x08180383 in Feval (form=148290901)
    at /Users/steve/cvsroot/emacs/src/eval.c:2322
        numargs = 137857273
        argvals = {136329756, 142824729, 148243701, 148243757, 148243693,
  148096445, 138010225, 148096480}
        args_left = 148290909
        i = <value optimized out>
        fun = <value optimized out>
        val = <value optimized out>
        original_fun = 137996177
---Type <return> to continue, or q <return> to quit---
        original_args = 148290909
        funcar = <value optimized out>
        backtrace = {
  next = 0xbf980b90,
  function = 0xbf980b28,
  args = 0xbf980b24,
  nargs = -1,
  evalargs = 0 '\0',
  debug_on_exit = 0 '\0'
}
#17 0x08180130 in Feval (form=148243685)
    at /Users/steve/cvsroot/emacs/src/eval.c:2433
        numargs = <value optimized out>
        argvals = {137857225, 137969097, 5, 148300117, 148300269, 138229905,
  -1080554488, 135790656}
        args_left = <value optimized out>
        i = <value optimized out>
        fun = <value optimized out>
        val = <value optimized out>
        original_fun = 138020321
        original_args = 148243693
        funcar = <value optimized out>
        backtrace = {
  next = 0xbf980cb0,
  function = 0xbf980ba8,
  args = 0xbf980ba4,
  nargs = -1,
  evalargs = 1 '\001',
  debug_on_exit = 0 '\0'
}
#18 0x0818056f in Fprogn (args=137857273)
    at /Users/steve/cvsroot/emacs/src/eval.c:449
        val = 137857225
#19 0x08180804 in funcall_lambda (fun=148243888, nargs=2,
    arg_vector=0xbf980c20) at /Users/steve/cvsroot/emacs/src/eval.c:3224
        val = <value optimized out>
        syms_left = 137857225
        next = <value optimized out>
        i = 2
        optional = 1
        rest = 0
---Type <return> to continue, or q <return> to quit---
#20 0x08180920 in apply_lambda (fun=148243893, args=148300445, eval_flag=1)
    at /Users/steve/cvsroot/emacs/src/eval.c:3155
        args_left = 137857225
        arg_vector = (Lisp_Object *) 0x83788c9
        i = 2
        tem = 137857225
#21 0x0817ffd4 in Feval (form=148300437)
    at /Users/steve/cvsroot/emacs/src/eval.c:2435
        fun = 137857225
        val = <value optimized out>
        original_fun = 142868745
        original_args = 148300445
        funcar = 137857273
        backtrace = {
  next = 0xbf980d40,
  function = 0xbf980cc8,
  args = 0xbf980c20,
  nargs = 2,
  evalargs = 0 '\0',
  debug_on_exit = 0 '\0'
}
#22 0x0818056f in Fprogn (args=137857273)
    at /Users/steve/cvsroot/emacs/src/eval.c:449
        val = 137857225
#23 0x08180383 in Feval (form=148291021)
    at /Users/steve/cvsroot/emacs/src/eval.c:2322
        numargs = 137857273
        argvals = {139575457, 148291101, -1080554072, 135790656, -1080554048,
  -1080554168, 136329752, 2}
        args_left = 148291029
        i = <value optimized out>
        fun = <value optimized out>
        val = <value optimized out>
        original_fun = 137996225
        original_args = 148291029
        funcar = <value optimized out>
        backtrace = {
  next = 0xbf980dc0,
  function = 0xbf980d58,
  args = 0xbf980d54,
  nargs = -1,
---Type <return> to continue, or q <return> to quit---
  evalargs = 0 '\0',
  debug_on_exit = 0 '\0'
}
#24 0x08180383 in Feval (form=148290997)
    at /Users/steve/cvsroot/emacs/src/eval.c:2322
        numargs = 137857273
        argvals = {148300437, 136329756, -1080554024, 135799515, 148301381,
  -1080554032, -1080553992, 135792928}
        args_left = 148291005
        i = <value optimized out>
        fun = <value optimized out>
        val = <value optimized out>
        original_fun = 137996177
        original_args = 148291005
        funcar = <value optimized out>
        backtrace = {
  next = 0xbf980e40,
  function = 0xbf980dd8,
  args = 0xbf980dd4,
  nargs = -1,
  evalargs = 0 '\0',
  debug_on_exit = 0 '\0'
}
#25 0x08180130 in Feval (form=148301373)
    at /Users/steve/cvsroot/emacs/src/eval.c:2433
        numargs = <value optimized out>
        argvals = {137897993, 137900042, 3, 139270352, -1080553884, 2,
  137857249, 137897992}
        args_left = <value optimized out>
        i = <value optimized out>
        fun = <value optimized out>
        val = <value optimized out>
        original_fun = 138020321
        original_args = 148301381
        funcar = <value optimized out>
        backtrace = {
  next = 0xbf980f00,
  function = 0xbf980e58,
  args = 0xbf980e54,
  nargs = -1,
  evalargs = 1 '\001',
---Type <return> to continue, or q <return> to quit---
  debug_on_exit = 0 '\0'
}
#26 0x0818056f in Fprogn (args=137857273)
    at /Users/steve/cvsroot/emacs/src/eval.c:449
        val = 137857225
#27 0x08182c25 in FletX (args=148301365)
    at /Users/steve/cvsroot/emacs/src/eval.c:1033
        varlist = 137857225
        val = 137857225
        elt = 137969097
#28 0x08180383 in Feval (form=148301085)
    at /Users/steve/cvsroot/emacs/src/eval.c:2322
        numargs = 137857273
        argvals = {137012732, 4, 142318232, 4, 0, 0, 0, -1080553696}
        args_left = 148301365
        i = <value optimized out>
        fun = <value optimized out>
        val = <value optimized out>
        original_fun = 137998601
        original_args = 148301365
        funcar = <value optimized out>
        backtrace = {
  next = 0xbf981010,
  function = 0xbf980f18,
  args = 0xbf980f14,
  nargs = -1,
  evalargs = 0 '\0',
  debug_on_exit = 0 '\0'
}
#29 0x0818056f in Fprogn (args=137857273)
    at /Users/steve/cvsroot/emacs/src/eval.c:449
        val = 137857225
#30 0x08180804 in funcall_lambda (fun=148300480, nargs=0,
    arg_vector=0xbf980f90) at /Users/steve/cvsroot/emacs/src/eval.c:3224
        val = <value optimized out>
        syms_left = 137857225
        next = <value optimized out>
        i = 0
        optional = 1
        rest = 0
#31 0x08180920 in apply_lambda (fun=148300485, args=137857225, eval_flag=1)
---Type <return> to continue, or q <return> to quit---
    at /Users/steve/cvsroot/emacs/src/eval.c:3155
        args_left = 0
        arg_vector = (Lisp_Object *) 0x83788c9
        i = 0
        tem = 137857225
#32 0x0817ffd4 in Feval (form=148300653)
    at /Users/steve/cvsroot/emacs/src/eval.c:2435
        fun = 137857225
        val = <value optimized out>
        original_fun = 142869129
        original_args = 137857225
        funcar = 137857273
        backtrace = {
  next = 0xbf9810d8,
  function = 0xbf981028,
  args = 0xbf980f90,
  nargs = 0,
  evalargs = 0 '\0',
  debug_on_exit = 0 '\0'
}
#33 0x0818056f in Fprogn (args=137857273)
    at /Users/steve/cvsroot/emacs/src/eval.c:449
        val = 137857225
#34 0x08180804 in funcall_lambda (fun=148300664, nargs=0,
    arg_vector=0xbf981114) at /Users/steve/cvsroot/emacs/src/eval.c:3224
        val = <value optimized out>
        syms_left = 137857225
        next = <value optimized out>
        i = 0
        optional = 0
        rest = 138140528
#35 0x08180b3f in Ffuncall (nargs=1, args=0xbf981110)
    at /Users/steve/cvsroot/emacs/src/eval.c:3101
        fun = 148300669
        original_fun = 142869249
        funcar = <value optimized out>
        numargs = 0
        val = <value optimized out>
        backtrace = {
  next = 0xbf981278,
  function = 0xbf981110,
---Type <return> to continue, or q <return> to quit---
  args = 0xbf981114,
  nargs = 0,
  evalargs = 0 '\0',
  debug_on_exit = 0 '\0'
}
        internal_args = (Lisp_Object *) 0xbf981114
        i = <value optimized out>
#36 0x081824c9 in apply1 (fn=142869249, arg=137857225)
    at /Users/steve/cvsroot/emacs/src/eval.c:2785
        ret_ungc_val = 139270352
#37 0x0817cbb4 in Fcall_interactively (function=142869249,
    record_flag=137857225, keys=137895660)
    at /Users/steve/cvsroot/emacs/src/callint.c:389
        values = 0
        input = <value optimized out>
        args = <value optimized out>
        visargs = <value optimized out>
        specs = 137857225
        filter_specs = <value optimized out>
        teml = <value optimized out>
        up_event = <value optimized out>
        enable = 137857225
        next_event = <value optimized out>
        prefix_arg = 137857225
        string = <value optimized out>
        tem = <value optimized out>
        varies = <value optimized out>
        i = <value optimized out>
        j = <value optimized out>
        foo = <value optimized out>
        prompt1 = '\0' <repeats 41 times>, " ", '\0' <repeats 57 times>
        arg_from_tty = <value optimized out>
        key_count = 2
        record_then_fail = <value optimized out>
        save_this_command = 142869249
        save_last_command = 143064897
        save_this_original_command = 142869249
        save_real_this_command = 142869249
#38 0x08180d89 in Ffuncall (nargs=4, args=0xbf9812b0)
    at /Users/steve/cvsroot/emacs/src/eval.c:3050
        fun = <value optimized out>
---Type <return> to continue, or q <return> to quit---
        original_fun = <value optimized out>
        funcar = <value optimized out>
        numargs = 3
        val = <value optimized out>
        backtrace = {
  next = 0x0,
  function = 0xbf9812b0,
  args = 0xbf9812b4,
  nargs = 3,
  evalargs = 0 '\0',
  debug_on_exit = 0 '\0'
}
        internal_args = (Lisp_Object *) 0xbf9812b4
        i = <value optimized out>
#39 0x08180ed9 in call3 (fn=138021481, arg1=142869249, arg2=137857225,
    arg3=137857225) at /Users/steve/cvsroot/emacs/src/eval.c:2874
        ret_ungc_val = 139270352
#40 0x08127d6e in command_loop_1 ()
    at /home/steve/cvsroot/emacs/src/keyboard.c:1879
        cmd = <value optimized out>
        lose = <value optimized out>
        nonundocount = 0
        keybuf = {24, 143064993, 135408094, 141287205, 137857273, -1080552662,
  137857225, -1080552624, 137857225, -1080552600, 135408352, 141287205,
  -1080552662, 0, -1219210608, -1220685348, 0, 0, -1208525780, 0, -1080552632,
  -1080552784, 0, -1220673536, 137857225, 143204425, 0, 138380480, 138380464,
  -1080552600}
        i = <value optimized out>
        prev_modiff = 5
        prev_buffer = (struct buffer *) 0x84d18d0
        already_adjusted = 0
#41 0x0817f670 in internal_condition_case (bfun=0x8127a10 <command_loop_1>,
    handlers=137900465, hfun=0x8122a30 <cmd_error>)
    at /Users/steve/cvsroot/emacs/src/eval.c:1511
        val = <value optimized out>
        c = {
  tag = 137857225,
  val = 137857225,
  next = 0xbf981490,
  gcpro = 0x0,
  jmp = {{
---Type <return> to continue, or q <return> to quit---
      __jmpbuf = {0, 138380480, 138380464, -1080552360, -919785769,
        -689459784},
      __mask_was_saved = 0,
      __saved_mask = {
        __val = {1, 3075522548, 1617, 3075522548, 147162920, 147162920,
          3214414464, 3214414872, 3214414928, 3086452336, 134545314,
          2822930839, 0, 0, 3075473410, 3086398473, 134544643, 3214414864,
          3214415152, 4294967295, 3214415000, 135464899, 3214415152,
          3214414864, 128, 3074312832, 3075756688, 0, 4294967295, 3086450676,
          3086452336, 134523856}
      }
    }},
  backlist = 0x0,
  handlerlist = 0x0,
  lisp_eval_depth = 0,
  pdlcount = 2,
  poll_suppress_count = 1,
  interrupt_input_blocked = 0,
  byte_stack = 0x0
}
        h = {
  handler = 137900465,
  var = 137857225,
  chosen_clause = 137857273,
  tag = 0xbf98137c,
  next = 0x0
}
#42 0x08121f83 in command_loop_2 ()
    at /home/steve/cvsroot/emacs/src/keyboard.c:1338
        val = 139270352
#43 0x0817f74a in internal_catch (tag=137896441,
    func=0x8121f60 <command_loop_2>, arg=137857225)
    at /Users/steve/cvsroot/emacs/src/eval.c:1247
        c = {
  tag = 137896441,
  val = 137857225,
  next = 0x0,
  gcpro = 0x0,
  jmp = {{
      __jmpbuf = {0, 138380480, 138380464, -1080552104, -920465705,
        -689588808},
---Type <return> to continue, or q <return> to quit---
      __mask_was_saved = 0,
      __saved_mask = {
        __val = {0 <repeats 12 times>, 3074707950, 0, 0, 0, 0, 0, 0, 0,
          138096610, 138096040, 138096608, 3214415176, 135730245, 138096041,
          138096610, 137857225, 137883080, 0, 0, 137857249}
      }
    }},
  backlist = 0x0,
  handlerlist = 0x0,
  lisp_eval_depth = 0,
  pdlcount = 2,
  poll_suppress_count = 1,
  interrupt_input_blocked = 0,
  byte_stack = 0x0
}
#44 0x08122897 in command_loop ()
    at /home/steve/cvsroot/emacs/src/keyboard.c:1317
No locals.
#45 0x08122bfb in recursive_edit_1 ()
    at /home/steve/cvsroot/emacs/src/keyboard.c:942
        val = <value optimized out>
#46 0x08122d31 in Frecursive_edit ()
    at /home/steve/cvsroot/emacs/src/keyboard.c:1004
        buffer = 137857225
#47 0x081179dc in main (argc=4, argv=0xbf981964)
    at /home/steve/cvsroot/emacs/src/emacs.c:1693
        displayname = 0x0
        count_before = <value optimized out>
        dummy = -1080551208
        stack_bottom_variable = 8 '\b'
        do_initial_setlocale = 1
        skip_args = 0
        rlim = {
  rlim_cur = 8388608,
  rlim_max = 18446744073709551615
}
        no_loadup = 0
        junk = 0x0

Lisp Backtrace:
"switch-to-buffer" (0xbf980710)
---Type <return> to continue, or q <return> to quit---
"cond" (0xbf9807d4)
"let" (0xbf9808b4)
"tabbar-buffer-select-tab" (0xbf9809b4)
"funcall" (0xbf9809b0)
"progn" (0xbf980aa4)
"if" (0xbf980b24)
"when" (0xbf980ba4)
"tabbar-click-on-tab" (0xbf980c20)
"progn" (0xbf980d54)
"if" (0xbf980dd4)
"when" (0xbf980e54)
"let*" (0xbf980f14)
"tabbar-cycle" (0xbf980f90)
"tabbar-forward" (0xbf981114)
"call-interactively" (0xbf9812b4)


If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/local/share/emacs/23.0.60/etc/DEBUG for instructions.

In GNU Emacs 23.0.60.2 (i686-pc-linux-gnu, GTK+ Version 2.12.0) of 2008-09-04 on escher
Windowing system distributor `The X.Org Foundation', version 11.0.70200000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=local
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  eldoc-mode: t
  shell-dirtrack-mode: t
  show-paren-mode: t
  recentf-mode: t
  diff-auto-refine-mode: t
  tabbar-mwheel-mode: t
  tabbar-mode: t
  display-time-mode: t
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  temp-buffer-resize-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
y M-x g u <return> y <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> J j y M-g <return> 
2 0 <return> SPC n n SPC n <select-window> <help-echo> 
<select-window> <help-echo> SPC n u SPC SPC q M-x c 
v s <tab> e x <tab> <return> <M-backspace> <M-backspace> 
<M-backspace> <M-backspace> <M-backspace> c v <tab> 
e m <tab> / <backspace> <return> <down> <up> <up> <down> 
<down> <down> <down> <down> e C-h e C-c j <return> 
M-u q M-x s h e <tab> <return> c d SPC . . <return> 
. . / . . / l i b <tab> <M-backspace> c v <tab> e m 
<tab> / C-x d SPC <backspace> ~ / c v <tab> e <tab> 
<return> s <down> <down> <return> <next> <next> <prior> 
<prior> <f11> <return> <down> <return> <next> <prior> 
C-x k <return> <f11> <return> C-c j p <return> c o 
n <tab> u <tab> <return> C-c j i <return> C-x b <return> 
m a k e <return> C-r e r r o C-g C-r w a r n C-w C-r 
C-r C-r C-g <down-mouse-1> <mouse-1> C-x d <return> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> i <help-echo> <down-mouse-1> <mouse-1> 
g g d x y e s <return> <help-echo> C-x C-f ~ / C-g 
M-x e d <return> s i <tab> t a b b <tab> <return> <S-left> 
<down-mouse-1> <mouse-1> M-x r e p o <tab> r <tab> 
<return>

Recent messages:
Partially completed
Completing file name...
Partially completed
Ido mode enabled [2 times]
Quit [2 times]
Mark set
1 of 1 deletions
1 deletion done
Quit
Making completion list...




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#891; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Jason Rumney <jasonr <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #10 received at 891 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Jason Rumney <jasonr <at> gnu.org>
To: Stephen Berman <stephen.berman <at> gmx.net>, 891 <at> debbugs.gnu.org
Subject: Re: bug#891: 23.0.60; Emacs aborts after buffer-swap-text
Date: Fri, 05 Sep 2008 07:06:57 +0800
merge 891 716
reassign 716 emacs
reassign 805 emacs
thanks

Stephen Berman wrote:
> 1. emacs -Q
> 2. Load the library tabbar.el, available from
> http://emhacks.cvs.sourceforge.net/emhacks/emhacks/tabbar.el?revision=1.69&view=markup
> 3. M-x tabbar-mode
> 4. M-: (buffer-swap-text (get-buffer "*Messages*"))
> 5. C-c C-right (tabbar-forward)
>    ==> Emacs aborts
>   

This seems to be the same bug as has been happening with tar-mode on 
Windows since tar-mode was changed to use buffer-swap-text. So the 
underlying bug is not platform specific after all. Do you also get 
crashes when opening tar files in Emacs?

> The full backtrace is below.  According to the Lisp backtrace, the abort
> occurs during or after switch-to-buffer.  Yet typing C-x b after step 4
> above does not make Emacs abort.  Moreover, when I directly call any of
> the tabbar.el functions listed in the backtrace and step through them
> with edebug, this also fails to make Emacs abort.  Yet the above recipe
> is reliably reproducible.  
>
> (Since the abort occurs in unshow_buffer, my guess, based on a comment
> at line 8314 of xdisp.c, is that switch-to-buffer needs to have
> something like the code in with_echo_area_buffer that changes w->pointm.
> I guess this would go after the call to Fset_buffer in switch-to-buffer,
> but I don't know how to write the code.)
>   

Can this be done in Fbuffer_swap_text, rather than expecting other code 
to clean up after the fact? Some of the crashes I've seen while 
debugging this have not involved switch-to-buffer, so there are probably 
many other locations where this clean up code needs to go if it can't be 
done in Fbuffer_swap_text for some reason.





Merged 716 805 891. Request was from Jason Rumney <jasonr <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Fri, 05 Sep 2008 00:35:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#891; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #17 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: 891 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
Subject: Re: bug#891: 23.0.60; Emacs aborts after buffer-swap-text
Date: Thu, 04 Sep 2008 23:52:45 -0400
> 1. emacs -Q
> 2. Load the library tabbar.el, available from
> http://emhacks.cvs.sourceforge.net/emhacks/emhacks/tabbar.el?revision=1.69&view=markup
> 3. M-x tabbar-mode
> 4. M-: (buffer-swap-text (get-buffer "*Messages*"))
> 5. C-c C-right (tabbar-forward)
>    ==> Emacs aborts

> The full backtrace is below.  According to the Lisp backtrace, the abort
> occurs during or after switch-to-buffer.  Yet typing C-x b after step 4
> above does not make Emacs abort.  Moreover, when I directly call any of
> the tabbar.el functions listed in the backtrace and step through them
> with edebug, this also fails to make Emacs abort.  Yet the above recipe
> is reliably reproducible.  

> (Since the abort occurs in unshow_buffer, my guess, based on a comment
> at line 8314 of xdisp.c, is that switch-to-buffer needs to have
> something like the code in with_echo_area_buffer that changes w->pointm.
> I guess this would go after the call to Fset_buffer in switch-to-buffer,
> but I don't know how to write the code.)

Does the patch below fix the crash you see?


        Stefan


=== modified file 'src/buffer.c'
--- src/buffer.c	2008-08-29 15:11:08 +0000
+++ src/buffer.c	2008-09-05 03:51:15 +0000
@@ -2250,6 +2250,27 @@
       if (m->buffer == current_buffer)
 	m->buffer = other_buffer;
   }
+  /* Some of the C code expects that w->buffer == w->pointm->buffer.
+     So since we just swapped the markers between the two buffers, we need
+     to undo the effect of this swap for window markers.  */
+  {
+    Lisp_Object w = Fselected_window (), ws = Qnil;
+    Lisp_Object buf1, buf2;
+    XSETBUFFER (buf1, current_buffer); XSETBUFFER (buf2, other_buffer);
+
+    while (NILP (Fmemq (w, ws)))
+      {
+	ws = Fcons (w, ws);
+	if ((EQ (XWINDOW (w)->buffer, buf1)
+	     || EQ (XWINDOW (w)->buffer, buf2))
+	    && MARKERP (XWINDOW (w)->pointm))
+	  Fset_marker (XWINDOW (w)->pointm,
+		       make_number (BUF_BEGV (XBUFFER (XWINDOW (w)->buffer))),
+		       XWINDOW (w)->buffer);
+	w = Fnext_window (w, Qt, Qt);
+      }
+  }
+
   if (current_buffer->text->intervals)
     (eassert (EQ (current_buffer->text->intervals->up.obj, buffer)),
      XSETBUFFER (current_buffer->text->intervals->up.obj, current_buffer));





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#891; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#891; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stephen Berman <stephen.berman <at> gmx.net>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #27 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 891 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
Subject: Re: bug#891: 23.0.60; Emacs aborts after buffer-swap-text
Date: Fri, 05 Sep 2008 10:32:07 +0200
On Thu, 04 Sep 2008 23:52:45 -0400 Stefan Monnier <monnier <at> iro.umontreal.ca> wrote:

>> 1. emacs -Q
>> 2. Load the library tabbar.el, available from
>> http://emhacks.cvs.sourceforge.net/emhacks/emhacks/tabbar.el?revision=1.69&view=markup
>> 3. M-x tabbar-mode
>> 4. M-: (buffer-swap-text (get-buffer "*Messages*"))
>> 5. C-c C-right (tabbar-forward)
>>    ==> Emacs aborts
>
>> The full backtrace is below.  According to the Lisp backtrace, the abort
>> occurs during or after switch-to-buffer.  Yet typing C-x b after step 4
>> above does not make Emacs abort.  Moreover, when I directly call any of
>> the tabbar.el functions listed in the backtrace and step through them
>> with edebug, this also fails to make Emacs abort.  Yet the above recipe
>> is reliably reproducible.  
>
>> (Since the abort occurs in unshow_buffer, my guess, based on a comment
>> at line 8314 of xdisp.c, is that switch-to-buffer needs to have
>> something like the code in with_echo_area_buffer that changes w->pointm.
>> I guess this would go after the call to Fset_buffer in switch-to-buffer,
>> but I don't know how to write the code.)
>
> Does the patch below fix the crash you see?

Yes; thanks!

Steve Berman




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#891; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stephen Berman <stephen.berman <at> gmx.net>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#891; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stephen Berman <stephen.berman <at> gmx.net>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #37 received at 891 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Jason Rumney <jasonr <at> gnu.org>
Cc: 891 <at> debbugs.gnu.org
Subject: Re: bug#891: 23.0.60; Emacs aborts after buffer-swap-text
Date: Fri, 05 Sep 2008 10:32:21 +0200
On Fri, 05 Sep 2008 07:06:57 +0800 Jason Rumney <jasonr <at> gnu.org> wrote:

> merge 891 716
> reassign 716 emacs
> reassign 805 emacs
> thanks
>
> Stephen Berman wrote:
>> 1. emacs -Q
>> 2. Load the library tabbar.el, available from
>> http://emhacks.cvs.sourceforge.net/emhacks/emhacks/tabbar.el?revision=1.69&view=markup
>> 3. M-x tabbar-mode
>> 4. M-: (buffer-swap-text (get-buffer "*Messages*"))
>> 5. C-c C-right (tabbar-forward)
>>    ==> Emacs aborts
>>   
>
> This seems to be the same bug as has been happening with tar-mode on Windows
> since tar-mode was changed to use buffer-swap-text. So the underlying bug is
> not platform specific after all. Do you also get crashes when opening tar
> files in Emacs?

No, opening a .tar, .tar.gz, or .tgz file works fine here (before
applying Stefan's patch).  I also could not reproduce the crash with
your recipe in the 716 thread.  So I guess there are still some platform
specific issues.

Steve Berman




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#891; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Jason Rumney <jasonr <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #42 received at 891 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Jason Rumney <jasonr <at> gnu.org>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: 891 <at> debbugs.gnu.org
Subject: Re: bug#891: 23.0.60; Emacs aborts after buffer-swap-text
Date: Fri, 05 Sep 2008 17:57:24 +0800
unmerge 891
thanks

Stephen Berman wrote:
> On Fri, 05 Sep 2008 07:06:57 +0800 Jason Rumney <jasonr <at> gnu.org> wrote:
>   
>> Stephen Berman wrote:
>>     
>>> 1. emacs -Q
>>> 2. Load the library tabbar.el, available from
>>> http://emhacks.cvs.sourceforge.net/emhacks/emhacks/tabbar.el?revision=1.69&view=markup
>>> 3. M-x tabbar-mode
>>> 4. M-: (buffer-swap-text (get-buffer "*Messages*"))
>>> 5. C-c C-right (tabbar-forward)
>>>    ==> Emacs aborts
>>>   
>>>       
>> This seems to be the same bug as has been happening with tar-mode on Windows
>> since tar-mode was changed to use buffer-swap-text. So the underlying bug is
>> not platform specific after all. Do you also get crashes when opening tar
>> files in Emacs?
>>     
>
> No, opening a .tar, .tar.gz, or .tgz file works fine here (before
> applying Stefan's patch).  I also could not reproduce the crash with
> your recipe in the 716 thread.  So I guess there are still some platform
> specific issues.
>   

Stefan's patch does not help with the tar-mode crashes, so I guess this 
is a different bug after all.





Disconnected #891 from all other report(s). Request was from Jason Rumney <jasonr <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Fri, 05 Sep 2008 10:05:12 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to Stephen Berman <stephen.berman <at> gmx.net> Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> emacsbugs.donarmstrong.com. (Fri, 19 Sep 2008 01:40:08 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <don <at> donarmstrong.com> to internal_control <at> emacsbugs.donarmstrong.com. (Fri, 17 Oct 2008 14:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 249 days ago.

Previous Next


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