* emacs -nw segfaults toggling menu bar mode
@ 2005-04-06 23:28 Thien-Thi Nguyen
2005-04-08 6:31 ` Marcelo Toledo
2005-04-10 1:55 ` Richard Stallman
0 siblings, 2 replies; 5+ messages in thread
From: Thien-Thi Nguyen @ 2005-04-06 23:28 UTC (permalink / raw)
with a 2005-04-06 cvs update, and configured w/ no options,
i built and then started emacs like so:
emacs -nw -q --no-site-file
then i did:
M-x menu-bar-mode
this turned off the menu bar as expected. then i did:
M-x menu-bar-mode
this segfaulted. poking around w/ gdb, i eventually came up w/ the
following patch, which prevents the segfault. could someone review it
(i'm not very familiar w/ this area of emacs) and let me know how to
improve it?
thi
________________________________________________________________
diff -c -r1.343 dispnew.c
*** dispnew.c 17 Mar 2005 23:39:12 -0000 1.343
--- dispnew.c 6 Apr 2005 23:14:17 -0000
***************
*** 3165,3178 ****
int m2_from;
w2 = frame_row_to_window (root, frame_from);
! m2 = w2->current_matrix;
! m2_from = frame_from - m2->matrix_y;
! copy_row_except_pointers (m->rows + window_to,
! m2->rows + m2_from);
!
! /* If frame line is empty, window line is empty, too. */
! if (!retained_p[copy_from[i]])
! m->rows[window_to].enabled_p = 0;
sync_p = 1;
}
else if (from_inside_window_p)
--- 3165,3184 ----
int m2_from;
w2 = frame_row_to_window (root, frame_from);
! /* Apparently, when turning on the menu bar using "emacs
! -nw", `from_frame' does not yield an associated window.
! This check avoids a segfault. */
! if (w2)
! {
! m2 = w2->current_matrix;
! m2_from = frame_from - m2->matrix_y;
! copy_row_except_pointers (m->rows + window_to,
! m2->rows + m2_from);
!
! /* If frame line is empty, window line is empty, too. */
! if (!retained_p[copy_from[i]])
! m->rows[window_to].enabled_p = 0;
! }
sync_p = 1;
}
else if (from_inside_window_p)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: emacs -nw segfaults toggling menu bar mode
2005-04-06 23:28 emacs -nw segfaults toggling menu bar mode Thien-Thi Nguyen
@ 2005-04-08 6:31 ` Marcelo Toledo
2005-04-10 1:55 ` Richard Stallman
1 sibling, 0 replies; 5+ messages in thread
From: Marcelo Toledo @ 2005-04-08 6:31 UTC (permalink / raw)
I couldn't reproduce this.
Thien-Thi Nguyen <ttn@surf.glug.org> writes:
> with a 2005-04-06 cvs update, and configured w/ no options,
> i built and then started emacs like so:
>
> emacs -nw -q --no-site-file
>
> then i did:
>
> M-x menu-bar-mode
>
> this turned off the menu bar as expected. then i did:
>
> M-x menu-bar-mode
>
> this segfaulted. poking around w/ gdb, i eventually came up w/ the
> following patch, which prevents the segfault. could someone review it
> (i'm not very familiar w/ this area of emacs) and let me know how to
> improve it?
--
Marcelo Toledo
marcelo@marcelotoledo.org
http://www.marcelotoledo.org
Mobile: 55 71 9116-1101
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: emacs -nw segfaults toggling menu bar mode
2005-04-06 23:28 emacs -nw segfaults toggling menu bar mode Thien-Thi Nguyen
2005-04-08 6:31 ` Marcelo Toledo
@ 2005-04-10 1:55 ` Richard Stallman
2005-04-10 10:20 ` Thien-Thi Nguyen
2005-04-10 22:14 ` Lute Kamstra
1 sibling, 2 replies; 5+ messages in thread
From: Richard Stallman @ 2005-04-10 1:55 UTC (permalink / raw)
Cc: emacs-devel
Although someone else said he could not reproduce this,
it could be that sometimes W2 is null. Your change can't hurt
anything. So I installed it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: emacs -nw segfaults toggling menu bar mode
2005-04-10 1:55 ` Richard Stallman
@ 2005-04-10 10:20 ` Thien-Thi Nguyen
2005-04-10 22:14 ` Lute Kamstra
1 sibling, 0 replies; 5+ messages in thread
From: Thien-Thi Nguyen @ 2005-04-10 10:20 UTC (permalink / raw)
Cc: emacs-devel
From: Richard Stallman <rms@gnu.org>
Date: Sat, 09 Apr 2005 21:55:23 -0400
Although someone else said he could not reproduce this,
it could be that sometimes W2 is null. Your change can't
hurt anything. So I installed it.
thank you.
i have not investigated further, but anyway append for the
archives some X resources i use, in case they play a part in
the crash.
thi
_________________________________
Emacs*menuBar: off
Emacs*toolBar: 0
Emacs*verticalScrollBars: off
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: emacs -nw segfaults toggling menu bar mode
2005-04-10 1:55 ` Richard Stallman
2005-04-10 10:20 ` Thien-Thi Nguyen
@ 2005-04-10 22:14 ` Lute Kamstra
1 sibling, 0 replies; 5+ messages in thread
From: Lute Kamstra @ 2005-04-10 22:14 UTC (permalink / raw)
Cc: ttn, emacs-devel
Richard Stallman <rms@gnu.org> writes:
> Although someone else said he could not reproduce this,
> it could be that sometimes W2 is null. Your change can't hurt
> anything. So I installed it.
I could reproduce the crash and the patch fixes it for me.
Lute.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-04-10 22:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-06 23:28 emacs -nw segfaults toggling menu bar mode Thien-Thi Nguyen
2005-04-08 6:31 ` Marcelo Toledo
2005-04-10 1:55 ` Richard Stallman
2005-04-10 10:20 ` Thien-Thi Nguyen
2005-04-10 22:14 ` Lute Kamstra
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).