GNU bug report logs - #16975
24.3.50; redisplay--update-region-highlight: (wrong-type-argument number-or-marker-p nil)

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sun, 9 Mar 2014 18:43:01 UTC

Severity: normal

Tags: moreinfo

Found in version 24.3.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 16975 in the body.
You can then email your comments to 16975 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-gnu-emacs <at> gnu.org:
bug#16975; Package emacs. (Sun, 09 Mar 2014 18:43:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 09 Mar 2014 18:43:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; redisplay--update-region-highlight: (wrong-type-argument
 number-or-marker-p nil)
Date: Sun, 9 Mar 2014 11:41:42 -0700 (PDT)
In a new session, with my setup, I did C-h v post-command-hook.  That
showed this as the value:

(global-font-lock-mode-check-buffers 1on1-change-cursor-on-input-method
1on1-change-cursor-on-overwrite/read-only 1on1-fit-minibuffer-frame)

Then I did this:

M-: (remove-hook 'post-command-hook '1on1-change-cursor-on-input-method)

And I got this backtrace:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  redisplay--update-region-highlight(#<window 10 on *Help*>)
  mapc(redisplay--update-region-highlight (#<window 10 on *Help*> #<window 8 on drews-lisp-20>))
  #[...
  funcall(#[...
  redisplay--update-region-highlights(t)
  apply(redisplay--update-region-highlights t)
  #[...
  redisplay_internal\ \(C\ function\)()

However, trying to reproduce that in another new session, I was unable
to repro it.  HTH - if not, feel free to close the bug.



In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2014-03-04 on ODIEONE
Bzr revision: 116662 kbrown <at> cornell.edu-20140304190249-6s13s5bwn3un3hfe
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/binary --enable-checking=yes,glyphs
 'CFLAGS=-O0 -g3' 'CPPFLAGS=-DGC_MCHECK=1 -Ic:/Devel/emacs/include'
 LDFLAGS=-Lc:/Devel/emacs/lib'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16975; Package emacs. (Mon, 10 Mar 2014 02:57:01 GMT) Full text and rfc822 format available.

Message #8 received at 16975 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 16975 <at> debbugs.gnu.org
Subject: Re: bug#16975: 24.3.50;
 redisplay--update-region-highlight: (wrong-type-argument
 number-or-marker-p nil)
Date: Sun, 09 Mar 2014 22:56:46 -0400
I've seen the above bug as well (tho don't have a recipe for it yet
either).  Not sure exactly where it's coming from, but I have a few
potential culprits lined up.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16975; Package emacs. (Tue, 11 Mar 2014 17:13:02 GMT) Full text and rfc822 format available.

Message #11 received at 16975 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 16975 <at> debbugs.gnu.org
Subject: Re: bug#16975: 24.3.50;
 redisplay--update-region-highlight: (wrong-type-argument
 number-or-marker-p nil)
Date: Tue, 11 Mar 2014 13:12:17 -0400
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>   redisplay--update-region-highlight(#<window 10 on *Help*>)

I installed the patch below, which fixes problems that can cause
the above.  Of course, those problems may come from elsewhere as well,
so please try it out and tell me if you still bump into the problem with
this patch applied.


        Stefan


--- lisp/simple.el	2014-03-06 04:11:08 +0000
+++ lisp/simple.el	2014-03-11 16:56:06 +0000
@@ -4415,14 +4415,18 @@
 store it in a Lisp variable.  Example:
 
    (let ((beg (point))) (forward-line 1) (delete-region beg (point)))."
-
-  (set-marker (mark-marker) pos (current-buffer))
   (if pos
-      (activate-mark 'no-tmm)
+      (progn
+        (set-marker (mark-marker) pos (current-buffer))
+        (activate-mark 'no-tmm))
     ;; Normally we never clear mark-active except in Transient Mark mode.
     ;; But when we actually clear out the mark value too, we must
     ;; clear mark-active in any mode.
-    (deactivate-mark t)))
+    (deactivate-mark t)
+    ;; `deactivate-mark' sometimes leaves mark-active non-nil, but
+    ;; it should never be nil if the mark is nil.
+    (setq mark-active nil)
+    (set-marker (mark-marker) nil)))
 
 (defcustom use-empty-active-region nil
   "Whether \"region-aware\" commands should act on empty regions.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16975; Package emacs. (Tue, 11 Mar 2014 17:25:01 GMT) Full text and rfc822 format available.

Message #14 received at 16975 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 16975 <at> debbugs.gnu.org
Subject: RE: bug#16975: 24.3.50; redisplay--update-region-highlight:
 (wrong-type-argument number-or-marker-p nil)
Date: Tue, 11 Mar 2014 10:24:40 -0700 (PDT)
> I installed the patch below, which fixes problems that can cause
> the above.  Of course, those problems may come from elsewhere as well,
> so please try it out and tell me if you still bump into the problem with
> this patch applied.

Thanks for working on this.  I have seen this only once.  I doubt that
I will see it again, with or without your patch.  IOW, if I don't see
it again we will not know whether that might have been the case even
without your patch.

I suggest that you just apply your patch to the product now, if it
seems reasonable to you.  Someone can file a new bug report if it
turns out that the patch either does not solve this problem or
introduces new problems.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16975; Package emacs. (Wed, 12 Mar 2014 14:16:01 GMT) Full text and rfc822 format available.

Message #17 received at 16975 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 16975 <at> debbugs.gnu.org
Subject: Re: bug#16975: 24.3.50;
 redisplay--update-region-highlight: (wrong-type-argument
 number-or-marker-p nil)
Date: Wed, 12 Mar 2014 10:15:22 -0400
> I suggest that you just apply your patch to the product now, if it

As mentioned in the message you quote: "I installed the patch below".

> seems reasonable to you.  Someone can file a new bug report if it
> turns out that the patch either does not solve this problem or
> introduces new problems.

I'm just asking you to use the patch until you "update your Emacs".
So that if you see the error again, we'll know it's still out there.


        Stefan




bug closed, send any further explanations to 16975 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 26 Dec 2015 14:00:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 24 Jan 2016 12:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 143 days ago.

Previous Next


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