[Bug: 21.5-b26] XEmacs crashes with menu-accelerator-enabled followed by Shift-spacebar
james at xemacs.org
Sat Apr 22 16:31:57 EDT 2006
"Stephen J. Turnbull" <stephen at xemacs.org> wrote:
>>>>>> "Doug" == Doug Kramer <doog at google.com> writes:
> Doug> If I modify init.el to contain only one statement to enable
> Doug> the menu accelerator keyboard shortcuts to work, after
> Doug> XEmacs comes up, if I press Shift-spacebar, XEmacs instantly
> Doug> quits with this error message:
> Fatal error: assertion failed, file menubar-x.c, line 1218, RECORD_TYPEP (obj, lrecord_type_console)
> *Please* try *hard* to obtain a C stack backtrace; without it, we are unlikely
> to be able to analyze the problem. Locate the core file produced as a result
> of this crash (often called `core' or `core.<process-id>', and located in
> the directory in which you started XEmacs or your home directory).
> If you didn't get a core file, then try running XEmacs under the
> debugger and eliciting the crash.
> I will try to replicate myself, but if nobody here manages to do so,
> we'll need your help to get the essential information.
> You can possibly avoid the crash by configuring with --with-xim=no.
I can reproduce. The assertion fails because the supposed console
object it got was nil (Qnil in C). Here is a backtrace:
#0 0x007c9402 in __kernel_vsyscall ()
#1 0x0083c159 in raise () from /lib/libc.so.6
#2 0x0083d6e3 in abort () from /lib/libc.so.6
#3 0x081072c1 in really_abort ()
#4 0x0810920e in assert_failed (
line=31407, expr=0x6 <Address 0x6 out of bounds>)
#5 0x0836270f in command_builder_find_menu_accelerator
#6 0x0812eb6e in command_builder_find_leaf_no_jit_binding (
builder=0xb09ff20, allow_misc_user_events_p=1, did_munge=0xbfd5b548)
#7 0x0812ecc2 in command_builder_find_leaf_no_jit_binding (
builder=0xac80160, allow_misc_user_events_p=1, did_munge=0xbfd5b548)
#8 0x0812ed9b in command_builder_find_leaf_and_update_global_state (
#9 0x0812f726 in lookup_command_event (command_builder=0xac80160,
#10 0x081316a7 in Fdispatch_event (event=184856424)
#11 0x080c3fd1 in Fcommand_loop_1 ()
#12 0x080c4025 in command_loop_1 (unused_dummy=Could not find the frame
base for "command_loop_1".
#13 0x08111fdd in condition_case_1 (handlers=175471544,
bfun=0x80c3fe5 <command_loop_1>, barg=175474704,
hfun=0x80c41e4 <cmd_error>, harg=175474704)
#14 0x080c41ad in command_loop_2 (unused_dummy=175474704)
#15 0x08110532 in internal_catch (tag=175221616,
func=0x80c415f <command_loop_2>, arg=175474704, threw=0x0,
#16 0x080c441b in initial_command_loop (load_me=175474704)
#17 0x0810af28 in xemacs_21_5_b26_i686_pc_linux (argc=1,
#18 0x0810afe9 in main (argc=Cannot access memory at address 0x7aaf
The problem appears to stem from some code in
command_builder_find_leaf_no_jit_binding() in event-stream.c. The
parameter builder points to a valid console device. On line 3393,
builder is passed to the copy_command_builder() function and the result
is assigned to local variable neubauten. The trouble appears to be that
copy_command_builder() doesn't actually copy everything. In particular,
it does not copy the Lisp object referring to the console device.
Hence, neubauten has nil in that slot. The partial copy is then passed
in a recursive call to command_builder_find_leaf_no_jit_binding(), and
on down the stack we go until we try access the console device.
I don't understand this code at all, so I don't know if making
copy_command_builder copy whatever got left out is sufficient or not.
Jerry James, Assistant Professor james at xemacs.org
Computer Science Department http://www.cs.usu.edu/~jerry/
Utah State University
More information about the XEmacs-Beta