GNU bug report logs - #35273
"Marker does not point anywhere" when reading next article

Previous Next

Packages: emacs, gnus;

Reported by: Leah Neukirchen <leah <at> vuxu.org>

Date: Sun, 14 Apr 2019 15:59:01 UTC

Severity: normal

Tags: fixed, patch

Found in version 5.13

Fixed in version 26.3

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Noam Postavsky <npostavs <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: contovob <at> tcd.ie, 35273 <at> debbugs.gnu.org, leah <at> vuxu.org
Subject: bug#35273: "Marker does not point anywhere" when reading next article
Date: Sat, 27 Apr 2019 15:28:01 -0400
[Message part 1 (text/plain, inline)]
tags 35273 + patch
quit

Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Noam Postavsky <npostavs <at> gmail.com>
>> I managed to reproduce (wasn't too hard actually).  All the overlay
>> deletion seems to come from gnus.  I got hits from erase-buffer (called
>> by gnus), gnus-kill-all-overlays, and gnus-cite-delete-overlays.
>
> OK, thanks.  Then I think it would be better to test the overlay for
> being dead in xdisp.c, before we call mouse_face_overlay_overlaps.
> Also, a faster test would be to check that the marker's buffer is a
> NULL pointer, doing that doesn't require a call marker-position.
> WDYT?

Sure, that works.  Should I push to emacs-26?

[0001-Check-if-mouse_face_overlay-was-deleted-Bug-35273.patch (text/x-diff, inline)]
From 912e336d107cd1bb840cc921b4893bfc0d6cfa98 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs <at> gmail.com>
Date: Sat, 27 Apr 2019 15:22:11 -0400
Subject: [PATCH] Check if mouse_face_overlay was deleted (Bug#35273)

* src/xdisp.c (note_mouse_highlight): Check if the mouse_face_overlay
actually points to a buffer, before calling
mouse_face_overlay_overlaps on it.
---
 src/xdisp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index 0c3754a338..aa6e1bd2df 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -31526,7 +31526,9 @@ note_mouse_highlight (struct frame *f, int x, int y)
 	     is currently hidden to avoid Bug#30519.  */
 	  || (!hlinfo->mouse_face_hidden
 	      && OVERLAYP (hlinfo->mouse_face_overlay)
-	      && mouse_face_overlay_overlaps (hlinfo->mouse_face_overlay)))
+	      /* It's possible the overlay was deleted (Bug#35273).  */
+              && XMARKER (OVERLAY_START (hlinfo->mouse_face_overlay))->buffer
+              && mouse_face_overlay_overlaps (hlinfo->mouse_face_overlay)))
 	{
 	  /* Find the highest priority overlay with a mouse-face.  */
 	  Lisp_Object overlay = Qnil;
-- 
2.11.0


This bug report was last modified 6 years and 23 days ago.

Previous Next


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