unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#12360: 24.2.50; Crash in set_buffer_internal_1
@ 2012-09-05 17:03 Werner LEMBERG
  2012-09-05 17:41 ` Eli Zaretskii
  2012-09-06  7:19 ` martin rudalics
  0 siblings, 2 replies; 9+ messages in thread
From: Werner LEMBERG @ 2012-09-05 17:03 UTC (permalink / raw)
  To: 12360


[rev 109796 + windowp.diff from

 http://debbugs.gnu.org/cgi/bugreport.cgi?msg=14;filename=windowp.diff;att=1;bug=12310]


The crash happened after composing an email with mew, then trying to
send it with C-c C-c.


    Werner


======================================================================


Program received signal SIGSEGV, Segmentation fault.
set_buffer_internal_1 (b=0x846958d) at buffer.c:2154
2154        bset_undo_list (b, BVAR (b->base_buffer, undo_list));

(gdb) p b
$1 = (struct buffer *) 0x846958d

(gdb) p b->base_buffer
$2 = (struct buffer *) 0x98000000

(gdb) p *b->base_buffer
Cannot access memory at address 0x98000000

(gdb) p undo_list
No symbol "undo_list" in current context.

(gdb) bt full
#0  set_buffer_internal_1 (b=0x846958d) at buffer.c:2154
        old_buf = 0x8480af8
        tail = <optimized out>
#1  0x08147c06 in command_loop_1 () at keyboard.c:1438
        cmd = <optimized out>
        keybuf = {12, -1073747977, 159382230, 40, -1073746568, 134626714, 141443984, 138843538, 
    -1073747977, -1073747977, 159382230, 40, -1073746568, 135518707, 159382230, 138843562, -1073747977, 
    140927362, -1073747977, 40, 40, 135518989, 159382230, -1073747977, -1073746568, 135978019, 140497734, 
    4625810, -1207960904, 0}
        i = <optimized out>
        prev_modiff = 0
        prev_buffer = 0x0
#2  0x081aa67d in internal_condition_case (bfun=0x8147b30 <command_loop_1>, handlers=138877346, hfun=
    0x813da40 <cmd_error>) at eval.c:1322
        val = <optimized out>
        c = {
          tag = 138843538, 
          val = 138843538, 
          next = 0xbfffe968, 
          gcpro = 0x0, 
          jmp = {{
              __jmpbuf = {0, 142791432, 142791448, -1073746568, 1781480335, -1598877472}, 
              __mask_was_saved = 0, 
              __saved_mask = {
                __val = {134553001, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3062816632, 3065862960, 0, 0, 0, 0, 
    4294967295, 3221219536, 3221219824, 135609939, 2, 3087003588, 3087005952, 1, 0, 3086922907, 3087006392, 
    3058843712, 1, 1, 0, 1}
              }
            }}, 
          backlist = 0x0, 
          handlerlist = 0x0, 
          lisp_eval_depth = 0, 
          pdlcount = 2, 
          poll_suppress_count = 1, 
          interrupt_input_blocked = 0, 
          byte_stack = 0x0
        }
        h = {
          handler = 138877346, 
          var = 138843538, 
          chosen_clause = 138843562, 
          tag = 0xbfffe844, 
          next = 0x0
        }
#3  0x0813c375 in command_loop_2 (ignore=138843538) at keyboard.c:1204
        val = 138843538
#4  0x081aa599 in internal_catch (tag=138875290, func=0x813c350 <command_loop_2>, arg=138843538)
    at eval.c:1079
        c = {
          tag = 138875290, 
          val = 138843538, 
          next = 0x0, 
          gcpro = 0x0, 
          jmp = {{
              __jmpbuf = {0, 142791432, 142791448, -1073746568, 1781398415, -1598716192}, 
              __mask_was_saved = 0, 
              __saved_mask = {
                __val = {0, 177, 23, 3063290583, 140685641, 140685640, 136248496, 142668888, 136562658, 14, 
    58, 142668888, 14, 136562658, 3221219912, 0, 0, 0, 3221219912, 400, 3221221571, 136562658, 138967378, 
    138967376, 138843538, 3221220728, 135976258, 138967378, 138843538, 138843538, 1, 0}
              }
            }}, 
          backlist = 0x0, 
          handlerlist = 0x0, 
          lisp_eval_depth = 0, 
          pdlcount = 2, 
          poll_suppress_count = 1, 
          interrupt_input_blocked = 0, 
          byte_stack = 0x0
        }
#5  0x0813d58a in command_loop () at keyboard.c:1183
No locals.
#6  recursive_edit_1 () at keyboard.c:804
        count = 1
        val = 0
#7  0x0813d87f in Frecursive_edit () at keyboard.c:868
        count = <optimized out>
        buffer = 138843538
#8  0x080599d0 in main (argc=2, argv=Cannot access memory at address 0xa0b310e4
) at emacs.c:1654
        dummy = 136470960
        stack_bottom_variable = 8 '\b'
        do_initial_setlocale = <optimized out>
        skip_args = 0
        rlim = {
          rlim_cur = 8388608, 
          rlim_max = 18446744073709551615
        }
        no_loadup = 0
        junk = 0x0
        dname_arg = 0x0
        ch_to_dir = 0xb6a873c4 "\300\201\250\266\340\203\250\266\300p\250\266\264p\250\266dp\250\266\003"






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#12360: 24.2.50; Crash in set_buffer_internal_1
  2012-09-05 17:03 bug#12360: 24.2.50; Crash in set_buffer_internal_1 Werner LEMBERG
@ 2012-09-05 17:41 ` Eli Zaretskii
  2012-09-05 17:57   ` Werner LEMBERG
  2012-09-06  7:19 ` martin rudalics
  1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2012-09-05 17:41 UTC (permalink / raw)
  To: Werner LEMBERG; +Cc: 12360

> Date: Wed, 05 Sep 2012 19:03:06 +0200 (CEST)
> From: Werner LEMBERG <wl@gnu.org>
> 
> Program received signal SIGSEGV, Segmentation fault.
> set_buffer_internal_1 (b=0x846958d) at buffer.c:2154
> 2154        bset_undo_list (b, BVAR (b->base_buffer, undo_list));
> 
> (gdb) p b
> $1 = (struct buffer *) 0x846958d
> 
> (gdb) p b->base_buffer
> $2 = (struct buffer *) 0x98000000
> 
> (gdb) p *b->base_buffer
> Cannot access memory at address 0x98000000

Which means the base buffer got GC'ed, I think.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#12360: 24.2.50; Crash in set_buffer_internal_1
  2012-09-05 17:41 ` Eli Zaretskii
@ 2012-09-05 17:57   ` Werner LEMBERG
  2012-09-05 18:16     ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Werner LEMBERG @ 2012-09-05 17:57 UTC (permalink / raw)
  To: eliz; +Cc: 12360


> Which means the base buffer got GC'ed, I think.

Anything else I can do?


    Werner





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#12360: 24.2.50; Crash in set_buffer_internal_1
  2012-09-05 17:57   ` Werner LEMBERG
@ 2012-09-05 18:16     ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2012-09-05 18:16 UTC (permalink / raw)
  To: Werner LEMBERG; +Cc: 12360

> Date: Wed, 05 Sep 2012 19:57:15 +0200 (CEST)
> Cc: 12360@debbugs.gnu.org
> From: Werner LEMBERG <wl@gnu.org>
> 
> 
> > Which means the base buffer got GC'ed, I think.
> 
> Anything else I can do?

What is the name of buffer b?  Like this:

  (gdb) p b->name_
  (gdb) xstring





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#12360: 24.2.50; Crash in set_buffer_internal_1
  2012-09-05 17:03 bug#12360: 24.2.50; Crash in set_buffer_internal_1 Werner LEMBERG
  2012-09-05 17:41 ` Eli Zaretskii
@ 2012-09-06  7:19 ` martin rudalics
  2012-09-06  8:05   ` Werner LEMBERG
  1 sibling, 1 reply; 9+ messages in thread
From: martin rudalics @ 2012-09-06  7:19 UTC (permalink / raw)
  To: Werner LEMBERG; +Cc: 12360

 > [rev 109796 + windowp.diff from

Can you please update to revision 109888 on trunk?  There have been a
few important changes in between.

Thanks, martin





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#12360: 24.2.50; Crash in set_buffer_internal_1
  2012-09-06  7:19 ` martin rudalics
@ 2012-09-06  8:05   ` Werner LEMBERG
  2012-09-06 14:41     ` martin rudalics
  2012-09-26  6:43     ` Werner LEMBERG
  0 siblings, 2 replies; 9+ messages in thread
From: Werner LEMBERG @ 2012-09-06  8:05 UTC (permalink / raw)
  To: rudalics; +Cc: 12360

[-- Attachment #1: Type: Text/Plain, Size: 224 bytes --]


> Can you please update to revision 109888 on trunk?  There have been a
> few important changes in between.

Updating to 109898 right now.  BTW, here's an corrected version of
your patch which applies cleanly.


    Werner

[-- Attachment #2: windowp-109898.diff --]
[-- Type: Text/X-Patch, Size: 17178 bytes --]

diff -aruN emacs.compiled.orig/src/buffer.c emacs.compiled/src/buffer.c
--- emacs.compiled.orig/src/buffer.c	2012-09-06 09:52:34.000000000 +0200
+++ emacs.compiled/src/buffer.c	2012-09-06 09:49:55.000000000 +0200
@@ -1351,7 +1351,7 @@
 A non-nil FLAG means mark the buffer modified.  */)
   (Lisp_Object flag)
 {
-  Lisp_Object fn, buffer, window;
+  Lisp_Object fn, buffer;
 
 #ifdef CLASH_DETECTION
   /* If buffer becoming modified, lock the file.
@@ -1401,8 +1401,7 @@
      buffers without "modifying" buffers, or redisplay should be
      smarter about updating the `*' in mode lines.  --gerd  */
   XSETBUFFER (buffer, current_buffer);
-  window = Fget_buffer_window (buffer, Qt);
-  if (WINDOWP (window))
+  if (!NILP (Fget_buffer_window (buffer, Qt)))
     {
       ++update_mode_lines;
       current_buffer->prevent_redisplay_optimizations_p = 1;
@@ -3179,7 +3178,7 @@
 	      Lisp_Object window;
 
 	      window = Foverlay_get (overlay, Qwindow);
-	      if (WINDOWP (window) && XWINDOW (window) != w)
+	      if (WINDOW_LIVE_P (window) && XWINDOW (window) != w)
 		continue;
 	    }
 
@@ -3321,7 +3320,7 @@
       if (endpos != pos && startpos != pos)
 	continue;
       window = Foverlay_get (overlay, Qwindow);
-      if (WINDOWP (window) && XWINDOW (window) != w)
+      if (WINDOW_LIVE_P (window) && XWINDOW (window) != w)
 	continue;
       if (startpos == pos
 	  && (str = Foverlay_get (overlay, Qbefore_string), STRINGP (str)))
@@ -3349,7 +3348,7 @@
       if (endpos != pos && startpos != pos)
 	continue;
       window = Foverlay_get (overlay, Qwindow);
-      if (WINDOWP (window) && XWINDOW (window) != w)
+      if (WINDOW_LIVE_P (window) && XWINDOW (window) != w)
 	continue;
       if (startpos == pos
 	  && (str = Foverlay_get (overlay, Qbefore_string), STRINGP (str)))
diff -aruN emacs.compiled.orig/src/editfns.c emacs.compiled/src/editfns.c
--- emacs.compiled.orig/src/editfns.c	2012-09-06 09:52:34.000000000 +0200
+++ emacs.compiled/src/editfns.c	2012-09-06 09:49:55.000000000 +0200
@@ -360,7 +360,7 @@
 
   if (NILP (object))
     XSETBUFFER (object, current_buffer);
-  else if (WINDOWP (object))
+  else if (WINDOW_LIVE_P (object))
     object = XWINDOW (object)->buffer;
 
   if (!BUFFERP (object))
diff -aruN emacs.compiled.orig/src/frame.c emacs.compiled/src/frame.c
--- emacs.compiled.orig/src/frame.c	2012-09-06 09:52:34.000000000 +0200
+++ emacs.compiled/src/frame.c	2012-09-06 09:49:55.000000000 +0200
@@ -942,7 +942,7 @@
 		    || FRAME_ICONIFIED_P (XFRAME (f)))
 		  return f;
 	      }
-	    else if (WINDOWP (minibuf))
+	    else if (WINDOW_LIVE_P (minibuf))
 	      {
 		if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf)
 		    || EQ (WINDOW_FRAME (XWINDOW (minibuf)), f)
@@ -1001,7 +1001,7 @@
 	      if (! FRAME_MINIBUF_ONLY_P (XFRAME (f)))
 		prev = f;
 	    }
-	  else if (WINDOWP (minibuf))
+	  else if (WINDOW_LIVE_P (minibuf))
 	    {
 	      if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf)
 		  || EQ (WINDOW_FRAME (XWINDOW (minibuf)), f)
@@ -2141,7 +2141,7 @@
 	set_term_frame_name (f, val);
     }
 
-  if (EQ (prop, Qminibuffer) && WINDOWP (val))
+  if (EQ (prop, Qminibuffer) && WINDOW_LIVE_P (val))
     {
       if (! MINI_WINDOW_P (XWINDOW (val)))
 	error ("Surrogate minibuffer windows must be minibuffer windows");
diff -aruN emacs.compiled.orig/src/keyboard.c emacs.compiled/src/keyboard.c
--- emacs.compiled.orig/src/keyboard.c	2012-09-06 09:52:34.000000000 +0200
+++ emacs.compiled/src/keyboard.c	2012-09-06 09:49:55.000000000 +0200
@@ -3509,7 +3509,7 @@
   frame = event->frame_or_window;
   if (CONSP (frame))
     frame = XCAR (frame);
-  else if (WINDOWP (frame))
+  else if (WINDOW_LIVE_P (frame))
     frame = WINDOW_FRAME (XWINDOW (frame));
 
   /* There are still some events that don't set this field.
@@ -3726,7 +3726,7 @@
   event.kind = HELP_EVENT;
   event.frame_or_window = frame;
   event.arg = object;
-  event.x = WINDOWP (window) ? window : frame;
+  event.x = WINDOW_LIVE_P (window) ? window : frame;
   event.y = help;
   event.code = pos;
   kbd_buffer_store_event (&event);
@@ -4052,7 +4052,7 @@
 	  clear_event (event);
 
 	  kbd_fetch_ptr = event + 1;
-	  if (!WINDOWP (window))
+	  if (!WINDOW_LIVE_P (window))
 	    window = Qnil;
 	  obj = Fcons (Qhelp_echo,
 		       list5 (frame, help, window, object, position));
@@ -4097,7 +4097,7 @@
 	  frame = event->frame_or_window;
 	  if (CONSP (frame))
 	    frame = XCAR (frame);
-	  else if (WINDOWP (frame))
+	  else if (WINDOW_LIVE_P (frame))
 	    frame = WINDOW_FRAME (XWINDOW (frame));
 
 	  focus = FRAME_FOCUS_FRAME (XFRAME (frame));
@@ -5179,7 +5179,7 @@
     ? window_from_coordinates (f, XINT (x), XINT (y), &part, 0)
     : Qnil;
 
-  if (WINDOWP (window))
+  if (WINDOW_LIVE_P (window))
     {
       /* It's a click in window WINDOW at frame coordinates (X,Y)  */
       struct window *w = XWINDOW (window);
@@ -5608,7 +5608,7 @@
 	  struct frame *f;
 	  int fuzz;
 
-	  if (WINDOWP (event->frame_or_window))
+	  if (WINDOW_LIVE_P (event->frame_or_window))
 	    f = XFRAME (XWINDOW (event->frame_or_window)->frame);
 	  else if (FRAMEP (event->frame_or_window))
 	    f = XFRAME (event->frame_or_window);
@@ -5776,7 +5776,7 @@
 	  int symbol_num;
 	  int is_double;
 
-	  if (WINDOWP (event->frame_or_window))
+	  if (WINDOW_LIVE_P (event->frame_or_window))
 	    fr = XFRAME (XWINDOW (event->frame_or_window)->frame);
 	  else if (FRAMEP (event->frame_or_window))
 	    fr = XFRAME (event->frame_or_window);
@@ -9543,7 +9543,7 @@
 		     read using the keymaps in the buffer clicked on,
 		     not the current buffer.  If we're at the
 		     beginning of a key sequence, switch buffers.  */
-		  if (WINDOWP (window)
+		  if (WINDOW_LIVE_P (window)
 		      && BUFFERP (XWINDOW (window)->buffer)
 		      && XBUFFER (XWINDOW (window)->buffer) != current_buffer)
 		    {
@@ -11235,7 +11235,7 @@
   if (NILP (frame_or_window))
     frame_or_window = selected_window;
 
-  if (WINDOWP (frame_or_window))
+  if (WINDOW_LIVE_P (frame_or_window))
     {
       struct window *w = decode_live_window (frame_or_window);
 
diff -aruN emacs.compiled.orig/src/keymap.c emacs.compiled/src/keymap.c
--- emacs.compiled.orig/src/keymap.c	2012-09-06 09:52:34.000000000 +0200
+++ emacs.compiled/src/keymap.c	2012-09-06 09:49:55.000000000 +0200
@@ -1559,7 +1559,7 @@
 
       window = POSN_WINDOW (position);
 
-      if (WINDOWP (window)
+      if (WINDOW_LIVE_P (window)
 	  && BUFFERP (XWINDOW (window)->buffer)
 	  && XBUFFER (XWINDOW (window)->buffer) != current_buffer)
 	{
diff -aruN emacs.compiled.orig/src/textprop.c emacs.compiled/src/textprop.c
--- emacs.compiled.orig/src/textprop.c	2012-09-06 09:52:34.000000000 +0200
+++ emacs.compiled/src/textprop.c	2012-09-06 09:49:55.000000000 +0200
@@ -584,7 +584,7 @@
   if (NILP (object))
     XSETBUFFER (object, current_buffer);
 
-  if (WINDOWP (object))
+  if (WINDOW_LIVE_P (object))
     {
       w = XWINDOW (object);
       object = w->buffer;
diff -aruN emacs.compiled.orig/src/w32inevt.c emacs.compiled/src/w32inevt.c
--- emacs.compiled.orig/src/w32inevt.c	2012-09-06 09:52:34.000000000 +0200
+++ emacs.compiled/src/w32inevt.c	2012-09-06 09:49:55.000000000 +0200
@@ -650,7 +650,7 @@
 		 selected now, and the last mouse movement event was
 		 not in it.  A minibuffer window will be selected iff
 		 it is active.  */
-	      if (WINDOWP (mouse_window)
+	      if (WINDOW_LIVE_P (mouse_window)
 		  && !EQ (mouse_window, last_mouse_window)
 		  && !EQ (mouse_window, selected_window))
 		{
diff -aruN emacs.compiled.orig/src/w32term.c emacs.compiled/src/w32term.c
--- emacs.compiled.orig/src/w32term.c	2012-09-06 09:52:34.000000000 +0200
+++ emacs.compiled/src/w32term.c	2012-09-06 09:50:51.000000000 +0200
@@ -3927,7 +3927,7 @@
 w32_scroll_bar_handle_click (struct scroll_bar *bar, W32Msg *msg,
 			     struct input_event *emacs_event)
 {
-  if (! WINDOWP (bar->window))
+  if (! WINDOW_LIVE_P (bar->window))
     emacs_abort ();
 
   emacs_event->kind = SCROLL_BAR_CLICK_EVENT;
@@ -4420,7 +4420,7 @@
 		     selected now and last mouse movement event was
 		     not in it.  Minibuffer window will be selected
 		     only when it is active.  */
-		  if (WINDOWP (window)
+		  if (WINDOW_LIVE_P (window)
 		      && !EQ (window, last_window)
 		      && !EQ (window, selected_window)
 		      /* For click-to-focus window managers
diff -aruN emacs.compiled.orig/src/window.c emacs.compiled/src/window.c
--- emacs.compiled.orig/src/window.c	2012-09-06 09:52:34.000000000 +0200
+++ emacs.compiled/src/window.c	2012-09-06 09:49:55.000000000 +0200
@@ -1973,7 +1973,7 @@
 	 useful in connection with bug#12208).
       && XBUFFER (buf) != current_buffer  */
       /* This line helps to fix Horsley's testbug.el bug.  */
-      && !(WINDOWP (BVAR (b, last_selected_window))
+      && !(WINDOW_LIVE_P (BVAR (b, last_selected_window))
 	   && w != XWINDOW (BVAR (b, last_selected_window))
 	   && EQ (buf, XWINDOW (BVAR (b, last_selected_window))->buffer)))
     temp_set_point_both (b,
@@ -1984,7 +1984,7 @@
 					 marker_byte_position (w->pointm),
 					 BUF_ZV_BYTE (b)));
 
-  if (WINDOWP (BVAR (b, last_selected_window))
+  if (WINDOW_LIVE_P (BVAR (b, last_selected_window))
       && w == XWINDOW (BVAR (b, last_selected_window)))
     bset_last_selected_window (b, Qnil);
 }
@@ -2209,7 +2209,7 @@
     candidate_p = 0;
   else if (MINI_WINDOW_P (w)
            && (EQ (minibuf, Qlambda)
-	       || (WINDOWP (minibuf) && !EQ (minibuf, window))))
+	       || (WINDOW_LIVE_P (minibuf) && !EQ (minibuf, window))))
     {
       /* If MINIBUF is `lambda' don't consider any mini-windows.
          If it is a window, consider only that one.  */
@@ -2219,7 +2219,7 @@
     candidate_p = 1;
   else if (NILP (all_frames))
     {
-      eassert (WINDOWP (owindow));
+      eassert (WINDOW_LIVE_P (owindow));
       candidate_p = EQ (w->frame, XWINDOW (owindow)->frame);
     }
   else if (EQ (all_frames, Qvisible))
@@ -2248,7 +2248,7 @@
 	&& (FRAME_TERMINAL (XFRAME (w->frame))
 	    == FRAME_TERMINAL (XFRAME (selected_frame)));
     }
-  else if (WINDOWP (all_frames))
+  else if (WINDOW_LIVE_P (all_frames))
     candidate_p = (EQ (FRAME_MINIBUF_WINDOW (f), all_frames)
 		   || EQ (XWINDOW (all_frames)->frame, w->frame)
 		   || EQ (XWINDOW (all_frames)->frame, FRAME_FOCUS_FRAME (f)));
@@ -2352,7 +2352,7 @@
 	{
 	  if (EQ (XCAR (list), window))
 	    {
-	      if (WINDOWP (candidate))
+	      if (WINDOW_LIVE_P (candidate))
 		break;
 	    }
 	  else if (candidate_window_p (XCAR (list), window, minibuf,
@@ -2360,7 +2360,7 @@
 	    candidate = XCAR (list);
 	}
 
-      if (WINDOWP (candidate))
+      if (WINDOW_LIVE_P (candidate))
 	window = candidate;
     }
 
@@ -2584,7 +2584,7 @@
      or Qt otherwise.  */
 
   /* Pick a window to start with.  */
-  if (WINDOWP (obj))
+  if (WINDOW_LIVE_P (obj))
     window = obj;
   else if (f)
     window = FRAME_SELECTED_WINDOW (f);
@@ -3325,7 +3325,7 @@
       return Qt;
     }
 
-  if (WINDOWP (object))
+  if (WINDOW_LIVE_P (object))
     {
       struct window *w = XWINDOW (object);
       mark_window_display_accurate (object, 0);
@@ -5565,7 +5565,7 @@
 	   the current-selected-window.  So we have to be careful which
 	   point of the current-buffer we copy into old_point.  */
 	if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer)
-	    && WINDOWP (selected_window)
+	    && WINDOW_LIVE_P (selected_window)
 	    && EQ (XWINDOW (selected_window)->buffer, new_current_buffer)
 	    && !EQ (selected_window, data->current_window))
 	  old_point = XMARKER (XWINDOW (data->current_window)->pointm)->charpos;
@@ -6507,7 +6507,7 @@
 		void *user_data)
 {
   /* delete_frame may set FRAME_ROOT_WINDOW (f) to Qnil.  */
-  if (WINDOWP (FRAME_ROOT_WINDOW (f)))
+  if (WINDOW_VALID_P (FRAME_ROOT_WINDOW (f)))
     foreach_window_1 (XWINDOW (FRAME_ROOT_WINDOW (f)), fn, user_data);
 }
 
@@ -6546,7 +6546,7 @@
 freeze_window_start (struct window *w, void *freeze_p)
 {
   if (MINI_WINDOW_P (w)
-      || (WINDOWP (selected_window) /* Can be nil in corner cases.  */
+      || (WINDOW_LIVE_P (selected_window) /* Can be nil in corner cases.  */
          && (w == XWINDOW (selected_window)
              || (MINI_WINDOW_P (XWINDOW (selected_window))
                  && ! NILP (Vminibuf_scroll_window)
diff -aruN emacs.compiled.orig/src/xdisp.c emacs.compiled/src/xdisp.c
--- emacs.compiled.orig/src/xdisp.c	2012-09-06 09:52:34.000000000 +0200
+++ emacs.compiled/src/xdisp.c	2012-09-06 09:49:55.000000000 +0200
@@ -2715,7 +2715,7 @@
 	  /* Or show the region if we are in the mini-buffer and W is
 	     the window the mini-buffer refers to.  */
 	  || (MINI_WINDOW_P (XWINDOW (selected_window))
-	      && WINDOWP (minibuf_selected_window)
+	      && WINDOW_LIVE_P (minibuf_selected_window)
 	      && w == XWINDOW (minibuf_selected_window))))
     {
       ptrdiff_t markpos = marker_position (BVAR (current_buffer, mark));
@@ -10083,7 +10083,7 @@
   Vdeactivate_mark = AREF (vector, 1);
   windows_or_buffers_changed = XFASTINT (AREF (vector, 2));
 
-  if (WINDOWP (AREF (vector, 3)))
+  if (WINDOW_LIVE_P (AREF (vector, 3)))
     {
       struct window *w;
       Lisp_Object buffer, charpos, bytepos;
@@ -10252,7 +10252,7 @@
 resize_echo_area_exactly (void)
 {
   if (BUFFERP (echo_area_buffer[0])
-      && WINDOWP (echo_area_window))
+      && WINDOW_LIVE_P (echo_area_window))
     {
       struct window *w = XWINDOW (echo_area_window);
       int resized_p;
@@ -13067,7 +13067,8 @@
 
   /* do_pending_window_change could change the selected_window due to
      frame resizing which makes the selected window too small.  */
-  if (WINDOWP (selected_window) && (w = XWINDOW (selected_window)) != sw)
+  if (WINDOW_LIVE_P (selected_window)
+      && (w = XWINDOW (selected_window)) != sw)
     {
       sw = w;
       reconsider_clip_changes (w, current_buffer);
@@ -13346,7 +13347,7 @@
 	    {
 	      do_pending_window_change (1);
 	      /* If selected_window changed, redisplay again.  */
-	      if (WINDOWP (selected_window)
+	      if (WINDOW_LIVE_P (selected_window)
 		  && (w = XWINDOW (selected_window)) != sw)
 		goto retry;
 
@@ -13657,7 +13658,8 @@
   /* If we just did a pending size change, or have additional
      visible frames, or selected_window changed, redisplay again.  */
   if ((windows_or_buffers_changed && !pending)
-      || (WINDOWP (selected_window) && (w = XWINDOW (selected_window)) != sw))
+      || (WINDOW_LIVE_P (selected_window)
+	  && (w = XWINDOW (selected_window)) != sw))
     goto retry;
 
   /* Clear the face and image caches.
@@ -26361,7 +26363,7 @@
   Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame));
 
   /* Quickly resolve the easy cases.  */
-  if (!(WINDOWP (hlinfo->mouse_face_window)
+  if (!(WINDOW_LIVE_P (hlinfo->mouse_face_window)
 	&& XWINDOW (hlinfo->mouse_face_window) == w))
     return 0;
   if (vpos < hlinfo->mouse_face_beg_row
@@ -27663,7 +27665,7 @@
     clear_mouse_face (hlinfo);
 
   /* Not on a window -> return.  */
-  if (!WINDOWP (window))
+  if (!WINDOW_LIVE_P (window))
     return;
 
   /* Reset help_echo_string. It will get recomputed below.  */
diff -aruN emacs.compiled.orig/src/xfaces.c emacs.compiled/src/xfaces.c
--- emacs.compiled.orig/src/xfaces.c	2012-09-06 09:52:34.000000000 +0200
+++ emacs.compiled/src/xfaces.c	2012-09-06 09:49:55.000000000 +0200
@@ -4309,7 +4309,7 @@
 	 matrices as invalid because they will reference faces freed
 	 above.  This function is also called when a frame is
 	 destroyed.  In this case, the root window of F is nil.  */
-      if (WINDOWP (f->root_window))
+      if (WINDOW_VALID_P (f->root_window))
 	{
 	  clear_current_matrices (f);
 	  ++windows_or_buffers_changed;
diff -aruN emacs.compiled.orig/src/xterm.c emacs.compiled/src/xterm.c
--- emacs.compiled.orig/src/xterm.c	2012-09-06 09:52:34.000000000 +0200
+++ emacs.compiled/src/xterm.c	2012-09-06 09:51:30.000000000 +0200
@@ -4228,7 +4228,7 @@
 
   if (scroll_bar_p
       && strcmp (action_name, end_action) == 0
-      && WINDOWP (window_being_scrolled))
+      && WINDOW_LIVE_P (window_being_scrolled))
     {
       struct window *w;
 
@@ -4505,7 +4505,7 @@
 {
   struct scroll_bar *bar = (struct scroll_bar *) user_data;
   bar->dragging = Qnil;
-  if (WINDOWP (window_being_scrolled))
+  if (WINDOW_LIVE_P (window_being_scrolled))
     {
       x_send_scroll_bar_event (window_being_scrolled,
                                scroll_bar_end_scroll, 0, 0);
@@ -5550,7 +5550,7 @@
 static void
 x_scroll_bar_handle_click (struct scroll_bar *bar, XEvent *event, struct input_event *emacs_event)
 {
-  if (! WINDOWP (bar->window))
+  if (! WINDOW_LIVE_P (bar->window))
     emacs_abort ();
 
   emacs_event->kind = SCROLL_BAR_CLICK_EVENT;
@@ -6775,7 +6775,7 @@
                 /* Window will be selected only when it is not selected now and
                    last mouse movement event was not in it.  Minibuffer window
                    will be selected only when it is active.  */
-                if (WINDOWP (window)
+                if (WINDOW_LIVE_P (window)
                     && !EQ (window, last_window)
 		    && !EQ (window, selected_window)
 		    /* For click-to-focus window managers

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#12360: 24.2.50; Crash in set_buffer_internal_1
  2012-09-06  8:05   ` Werner LEMBERG
@ 2012-09-06 14:41     ` martin rudalics
  2012-09-26  6:43     ` Werner LEMBERG
  1 sibling, 0 replies; 9+ messages in thread
From: martin rudalics @ 2012-09-06 14:41 UTC (permalink / raw)
  To: Werner LEMBERG; +Cc: 12360

 > Updating to 109898 right now.  BTW, here's an corrected version of
 > your patch which applies cleanly.

Thanks.  Emacs is currently completely broken for me.  I'll try the
patch as soon as it's working again.

martin





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#12360: 24.2.50; Crash in set_buffer_internal_1
  2012-09-06  8:05   ` Werner LEMBERG
  2012-09-06 14:41     ` martin rudalics
@ 2012-09-26  6:43     ` Werner LEMBERG
  2012-09-26 11:01       ` martin rudalics
  1 sibling, 1 reply; 9+ messages in thread
From: Werner LEMBERG @ 2012-09-26  6:43 UTC (permalink / raw)
  To: rudalics; +Cc: 12360


> Updating to 109898 right now.  BTW, here's an corrected version of
> your patch which applies cleanly.

I'm now running an Emacs compiled from a freshly checked out bzr on
Sept. 6th, and it seems to be stable again.  I suggest to close this
bug.


    Werner





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#12360: 24.2.50; Crash in set_buffer_internal_1
  2012-09-26  6:43     ` Werner LEMBERG
@ 2012-09-26 11:01       ` martin rudalics
  0 siblings, 0 replies; 9+ messages in thread
From: martin rudalics @ 2012-09-26 11:01 UTC (permalink / raw)
  To: Werner LEMBERG; +Cc: 12360

> I'm now running an Emacs compiled from a freshly checked out bzr on
> Sept. 6th, and it seems to be stable again.

Fine.

>  I suggest to close this
> bug.

Please do so.

Thanks, martin






^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-09-26 11:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-05 17:03 bug#12360: 24.2.50; Crash in set_buffer_internal_1 Werner LEMBERG
2012-09-05 17:41 ` Eli Zaretskii
2012-09-05 17:57   ` Werner LEMBERG
2012-09-05 18:16     ` Eli Zaretskii
2012-09-06  7:19 ` martin rudalics
2012-09-06  8:05   ` Werner LEMBERG
2012-09-06 14:41     ` martin rudalics
2012-09-26  6:43     ` Werner LEMBERG
2012-09-26 11:01       ` martin rudalics

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).