VM

Errors in numbering and summarizing

Bug #782620 reported by Uday Reddy
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
VM
Fix Committed
Medium
Uday Reddy

Bug Description

Terry Jones on viewmail-bugs list (2011-05-13):

Hi. I regularly run into errors when using VM. One species results in the
following in the debugger. I don't know enough to be able to dig into this.
When it happens, the things I try in VM (moving, saving) all result in a
similar error and I am unable to save my mail buffer. Sometimes I can
manage to get things back to normal, but I don't know how. Often I just
sigh and kill my modified mail buffer.

Sample output below (I removed a couple of sensitive vars with email
addresses in them).

Note that I have been using VM for a long time (at least 16 years) so I
expect I have some old/deprecated vars set, which may be causing the
problem.

BTW, is there any general way for emacs lisp packages to allow one to run a
command that identifies deprecated variables? I'd think such a thing would
be very easy to write. That's been a source of minor pain for me in emacs
over the decades...

Thanks for any help.

Terry Jones

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-to-number(nil)
  vm-number-messages(([[#<marker at 91210665 in INBOX> #<marker at 91210770 in
INBOX> nil #<marker at 91213596 in INBOX> #<marker at 91360456 in INBOX>
#<marker at 91360457 in INBOX>] [nil nil nil nil nil <<>> <-- From_ "147943"
#<buffer INBOX> nil nil nil nil nil nil nil nil nil nil ...] [t nil nil nil nil
nil nil nil nil] [nil nil nil nil nil nil nil nil nil
"<email address hidden>" nil "[intranet] History was
updated" nil nil nil nil "2011051319:59:24" "[intranet] History was updated"
nil nil nil nil nil nil nil nil] [nil <v> nil nil nil nil]]) nil)
  vm-do-needed-renumbering()
  #[(b)...]
  mapatoms(#[(b) ...]

  vm-update-summary-and-mode-line()
  vm-decode-mime-message()
  vm-show-current-message()
  vm-preview-current-message()
  vm-next-message(-1 1 1)
  vm-previous-message(1 1 1)
  call-interactively(vm-previous-message nil nil)

Tags: 8.2 virtual

Related branches

Revision history for this message
Uday Reddy (reddyuday) wrote :

Here is a possible theory of what might have generated the debug trace that
you sent us.

When you get new mail, the new messages are linked to the existing
messages and then the new messages are numbered. The starting point for
this numbering is found by looking at the predecessor of the first new
message (which should be the last of the existing messages).

If the get new mail operation is aborted for some reason, then the numbering
of the new messages would not have been done, and VM does it at the next
opportunity. You debug trace indicates that this is happening. (The
message with lots of nil's must be a new message that has not been numbered
yet.)

However, in your debug trace, the predecessor of the first new message also
doesn't have a message number. That is what is getting the error. That
means that something must have gone wrong in the previous get-new-mail
operation as well.

So, it seems that get-new-mil is what you need to watch to track down this
problem.

Cheers,
Uday

Uday Reddy (reddyuday)
Changed in vm:
status: Triaged → Incomplete
importance: High → Medium
Revision history for this message
Uday Reddy (reddyuday) wrote :

Terry Jones reports:

I seem to be able to reproduce one of my problems with VM now. To do it, I
run M-x vm, then immediately look at a virtual folder (V V nick RET). Then
I go into a shell window outside emacs and send myself mail. Then go back
to the main VM window (i.e., move my mouse over that window so it gets the
focus) and 'g' (vm-get-new-mail). That gives the following with
debug-on-error set to t:

Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
  vm-set-summary-pointer([[#<marker at 100907778 in INBOX> #<marker at
100907822 in INBOX> #<marker at 100910066 in INBOX> #<marker at 100910162 in
INBOX> #<marker at 100910167 in INBOX> #<marker at 100910168 in INBOX>] [nil
nil nil nil nil <<>> <-- From_ "64426" #<buffer INBOX> nil nil nil nil nil nil
[... ... "7bit" nil nil nil nil #<marker at 100908042 in INBOX> #<marker at
100910161 in INBOX> #<marker at 100910162 in INBOX> #<marker at 100910167 in
INBOX> nil <<c>> <<m>> nil nil nil] none nil nil nil <<>> nil] [nil nil nil nil
nil nil nil nil nil nil nil nil nil nil nil nil] [nil nil nil nil nil nil nil
"Terry Jones" "<email address hidden>" nil nil nil "^From:" nil nil nil nil nil nil nil
nil nil nil nil nil nil] [nil <v> nil nil nil t]])
  vm-do-needed-summary-rebuild()
  #[(b) ... 4](INBOX)
  mapatoms(#[(b) ... 4] [0 0 0 0 0 0 INBOX 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 \(nick\) 0 0 0 0])
  vm-update-summary-and-mode-line()
  vm-show-current-message()
  vm-present-current-message()
  vm-get-new-mail(nil)
  call-interactively(vm-get-new-mail nil nil)

After that, trying to move around in the INBOX folder causes error such as
those I reported earlier. Note that in the above description with the
virtual folder called nick, I don't do anything in that folder, I only
create it - no moving between messages etc. Here's its entry in my
vm-virtual-folder-alist

 ("nick"
  (("~/mail/INBOX")
   (or (author "<email address hidden>")
              (author "<email address hidden>")
       (author "<email address hidden>")
              (author "<email address hidden>")
       (author "<email address hidden>")
       (author "<email address hidden>")
       (author "<email address hidden>")
              (author "<email address hidden>")
              (author "<email address hidden>"))))

All the xxx parts are different.

Does this help at all? It feels as though vm has set some variable(s) when
it creates the virtual folder and when the focus shifts to the INBOX buffer
and 'g' is run that they're invalid / out of range, etc.

Revision history for this message
Uday Reddy (reddyuday) wrote :

The problem is occurring because vm-build-virtual-message-list now calls vm-visit-folder for the component folders. If the component-folder is already visited, then it revisits it and things get confused. In this instance, vm-assimilate-new-messages is called and, since there are no new messages, the buffer variables are overwritten, in particular `vm-numbering-redo-start-point' and `vm-summary-redo-start-point'.

Uday Reddy (reddyuday)
tags: added: virtual
Revision history for this message
Uday Reddy (reddyuday) wrote :

Fix committed in revision 869.

Changed in vm:
status: Incomplete → Fix Committed
Revision history for this message
Uday Reddy (reddyuday) wrote :

Better fix in revision 870.

Revision history for this message
Uday Reddy (reddyuday) wrote :

But, an important question is, when vm-build-virtual-message-list calls vm-visit-folder for an already visited folder, why is it calling vm-assimilate-new-messages?

Changed in vm:
status: Fix Committed → In Progress
Uday Reddy (reddyuday)
summary: - string-to-number(nil) error
+ Errors in numbering and summarizing
Revision history for this message
Uday Reddy (reddyuday) wrote :

Avoiding assimilation for revisited folders in rev. 1302.

Revision history for this message
Uday Reddy (reddyuday) wrote :

Reported on 2011-06-12

Um, well, I repeat the same actions I described in the previous mail but
now see a different error. Below is the debug output I see after I've done
a load-library on vm-summary and triggered the bug. (current-buffer)
returned #<buffer INBOX Summary>

I'll try it with a freshly started emacs and let you know if anything
differs.

Terry

---

Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
  vm-set-summary-pointer([[#<marker at 110193547 in INBOX> #<marker at 110193594 in INBOX> #<marker at 110194241 in INBOX> #<marker at 110194336 in INBOX> #<marker at 110194341 in INBOX> #<marker at 110194342 in INBOX>] [nil nil nil nil nil <<>> <-- From_ "101352" #<buffer INBOX> nil nil nil nil nil nil [... ... "7bit" nil nil nil nil #<marker at 110193817 in INBOX> #<marker at 110194335 in INBOX> #<marker at 110194336 in INBOX> #<marker at 110194341 in INBOX> nil <<c>> <<m>> nil nil nil] none nil nil nil <<>> nil] [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] [nil nil nil nil nil nil nil "Terry Jones" "terry@terryT61p" nil nil nil "^From:" nil nil nil nil nil nil nil nil nil nil nil nil nil] [nil <v> nil nil nil t]])
  vm-do-needed-summary-rebuild()
  #[(b) ... [b vm-buffers-needing-undo-boundaries vm-use-toolbar vm-summary-show-threads vm-thread-obarray vm-summary-buffer get-buffer symbol-name intern buffer-name vm-check-for-killed-summary vm-toolbar-support-possible-p vm-toolbar-update-toolbar vectorp vm-build-threads nil vm-do-needed-renumbering vm-do-needed-summary-rebuild vm-do-needed-mode-line-update] 4](INBOX)
  mapatoms(#[(b) ... [b vm-buffers-needing-undo-boundaries vm-use-toolbar vm-summary-show-threads vm-thread-obarray vm-summary-buffer get-buffer symbol-name intern buffer-name vm-check-for-killed-summary vm-toolbar-support-possible-p vm-toolbar-update-toolbar vectorp vm-build-threads nil vm-do-needed-renumbering vm-do-needed-summary-rebuild vm-do-needed-mode-line-update] 4] [0 0 0 0 0 0 INBOX 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \(nick\) 0 0 0 0])
  vm-update-summary-and-mode-line()
  vm-show-current-message()
  vm-present-current-message()
  vm-get-new-mail(nil)
  call-interactively(vm-get-new-mail nil nil)

Uday Reddy (reddyuday)
Changed in vm:
milestone: 8.2.0b → 8.2.0
Uday Reddy (reddyuday)
Changed in vm:
milestone: 8.2.0b1 → 8.2.0
Uday Reddy (reddyuday)
Changed in vm:
milestone: 8.2.0 → 8.2.0b1
status: In Progress → Fix Committed
Uday Reddy (reddyuday)
Changed in vm:
milestone: 8.2.2a → 8.2.1a
Uday Reddy (reddyuday)
Changed in vm:
milestone: 8.2.1a → 8.2.90a
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.