unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: charles@aurox.ch (Charles A. Roelli)
To: Drew Adams <drew.adams@oracle.com>
Cc: 17893@debbugs.gnu.org, monnier@iro.umontreal.ca
Subject: bug#17893: 24.4.50; (error "Marker does not point anywhere")
Date: Sun, 12 Nov 2017 11:41:27 +0100	[thread overview]
Message-ID: <m2k1yvpync.fsf@aurox.ch> (raw)
In-Reply-To: <04af8576-c419-4d35-9c6e-7170828ac949@default> (message from Drew Adams on Tue, 15 Jul 2014 09:19:34 -0700 (PDT))

> Date: Tue, 15 Jul 2014 09:19:34 -0700 (PDT)
> From: Drew Adams <drew.adams@oracle.com>
> 
> > That's probably the pop-mark that's in mouse-drag-track.  It has
> > a `push-mark' before, so naively it seems like the mark should be set.
> > 
> > > I was in Info at the time.
> > 
> > I think we need more data to figure out why the mark isn't set and hence
> > what to do about it.  A reproducible test case would obviously be best,
> > but otherwise maybe some indication of what kind of mouse gesture you
> > did, or what kind of customizations you might have that could interact
> > with that code and could unset the mark (maybe from
> > a pre/post-command-hook?).
> 
> Happened again.  Here's a bit more info.  I did M-n in Info
> and got the backtrace:
> 
> Debugger entered--Lisp error: (error "Marker does not point anywhere")
>   pop-mark()
>   #[0 "\303\x11\300\x12\304 \210\305 \207" [t track-mouse auto-hscroll-mode nil deactivate-mark pop-mark] 1 "\n\n(fn)"]()
>   #[0 "\301\204\b...
>   funcall(#[0 "\301\204\b...
>   clear-transient-map()
> 
> [Really wish you would fix bug #6991.  Each report of a
> backtrace requires manual editing.  Users should be able to
> just copy & paste.]
> 
> And this is the tail end of C-h l, showing that I really didn't do much after M-n:
> 
> <switch-frame> <down-mouse-1>
> <mouse-1> <help-echo> <down-mouse-1> <mouse-1> M-n
> <help-echo> <down-mouse-2> <mouse-movement> <mouse-2>
> <help-echo> <help-echo> <switch-frame> <switch-frame>
> <down-mouse-1> <mouse-movement> <mouse-1> C-s <help-echo>
> <down-mouse-1> <mouse-movement> <mouse-1> <help-echo>
> <help-echo> <help-echo> C-h l

I recently triggered a similar backtrace after testing some of my own
code that I submitted in Bug#28852, and I suspect the root cause is
similar.  It can be reproduced as follows:

1. Apply the patch at https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28852#8 to emacs-26.
2. src/emacs -q
3. C-x v D RET
4. Click twice with mouse-1, roughly in the middle of the window showing buffer *vc-diff*.
5. M-g c 326 RET
6. C-c C-c RET C-x C-s C-x o g

Now click again in the window showing *vc-diff* and the error is triggered:

  set-transient-map PCH: (error "Marker does not point anywhere")

After M-x toggle-debug-on-error RET and evaluating `pop-mark' manually
with C-M-x, I see this backtrace:

Debugger entered--Lisp error: (error "Marker does not point anywhere")
  +(0 #<marker in no buffer>)
  (set-marker (mark-marker) (+ 0 (car mark-ring)) (current-buffer))
  (progn (setq mark-ring (nconc mark-ring (list (copy-marker (mark-marker))))) (set-marker (mark-marker) (+ 0 (car mark-ring)) (current-buffer)) (move-marker (car mark-ring) nil) (if (null (mark t)) (ding)) (setq mark-ring (cdr mark-ring)))
  (if mark-ring (progn (setq mark-ring (nconc mark-ring (list (copy-marker (mark-marker))))) (set-marker (mark-marker) (+ 0 (car mark-ring)) (current-buffer)) (move-marker (car mark-ring) nil) (if (null (mark t)) (ding)) (setq mark-ring (cdr mark-ring))))
  pop-mark()
  #f(compiled-function () #<bytecode 0x4124aadd>)()
  #f(compiled-function () #<bytecode 0x4124ab01>)()
  clear-transient-map()

The error happens when the marker at the head of the mark ring no
longer points into a buffer.  In this case, we could either delete the
dead marker until we find a live one, and then pop that, or just not
pop any mark at all.





  reply	other threads:[~2017-11-12 10:41 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-01 21:10 bug#17893: 24.4.50; (error "Marker does not point anywhere") Drew Adams
2014-07-01 22:42 ` Stefan Monnier
2014-07-02  1:17   ` Drew Adams
2014-07-02  2:11     ` Stefan Monnier
2014-07-02  2:49       ` Drew Adams
2014-07-02 14:09         ` Stefan Monnier
2014-07-02 14:22           ` Drew Adams
2014-07-02 14:58             ` Stefan Monnier
2014-07-02 16:08               ` Drew Adams
2014-07-02 18:24                 ` Stefan Monnier
2014-07-02 18:39                   ` Drew Adams
2014-07-02 18:58                 ` Stephen Berman
2014-07-15 16:19   ` Drew Adams
2017-11-12 10:41     ` Charles A. Roelli [this message]
2017-11-12 21:03       ` Stefan Monnier
2017-11-14 19:56         ` Charles A. Roelli
2017-11-14 20:08           ` Stefan Monnier
2017-11-19 19:31             ` Charles A. Roelli
2017-11-20 15:45               ` Eli Zaretskii
2017-11-20 16:51                 ` Stefan Monnier
2017-11-20 17:55                   ` Eli Zaretskii
2017-11-20 18:59                     ` Stefan Monnier
2017-11-20 19:32                       ` Eli Zaretskii
2017-11-20 19:49                 ` Andreas Schwab
2017-11-20 20:01                 ` Charles A. Roelli
2017-11-20 20:29                   ` Eli Zaretskii
2017-11-24 20:18                     ` Charles A. Roelli
2017-11-24 20:39                       ` Eli Zaretskii
2017-11-25 14:13                         ` Charles A. Roelli
2017-11-25 16:06                           ` Eli Zaretskii
2017-11-25 16:48                             ` Stefan Monnier
2017-11-25 17:20                               ` Eli Zaretskii
2017-11-25 18:30                             ` Andreas Schwab
2017-11-25 19:23                               ` Eli Zaretskii
2017-11-25 20:47                                 ` Andreas Schwab
2017-11-26 10:26                             ` martin rudalics
2017-11-26 16:07                               ` Eli Zaretskii
2017-11-27  8:50                                 ` martin rudalics
2017-11-27  9:54                                   ` Andreas Schwab
2017-11-27 10:02                                     ` martin rudalics
2017-11-24 21:22                       ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2k1yvpync.fsf@aurox.ch \
    --to=charles@aurox.ch \
    --cc=17893@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).