viewmail-info
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[VM] Trackling down Lisp errors in VM


From: Uday Reddy
Subject: [VM] Trackling down Lisp errors in VM
Date: Sat, 11 Jun 2011 19:42:36 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10

Increasingly I am getting reports of Lisp errors such as "wrong-type-argument", "arrayp nil" etc. Ideally, such errors should not arise. All the error messages that are produced by VM should be VM-specific. Unfortunately, VM is not perfect in this regard.

Lisp errors arise for two possible reasons:

- Programming bugs in new code or newly modified code, which will be be fixed in due course.

- Something has gone wrong somewhere that is outside VM's control. (Examples include malformed messages, bugs in mail servers, network malfunctions etc.) However, proceeding from there ignoring the problem might imply that VM encounters inconsistent data later on. These kind of problems are harder to track down because the cause of the problem is something that happened much earlier than the symptom we notice.

An example is a problem that Salome reported a while ago:

  "vm-save-message: Wrong type argument: number-or-marker-p, nil"

The message indicates that the vm-save-message function got a `nil' value somewhere whereas it expected a number. Another example is:

   "vm-number-messages: Wrong type argument: stringp, nil"

Whenever you get an error message that appears to be from Emacs Lisp (such as "wrong type argument" here), it is best to assume that it is a bug, and send me a vm-submit-bug-report.

The error messages that are given by VM itself would be usually intelligible.

When you file a bug report for this kind of a problem, you can help me by doing a bit of work.

1. The first symbol in the message, such as `vm-save-message' or `vm-number-messages', is the Lisp function that gave the error. If you do C-h f on that symbol, you can find out which Lisp file is involved. For `vm-save-message', it is vm-save.el, and, for `vm-number-messages', it is vm-folder.el.

2. Do M-x load-library for the .el file in question. This will load the uncompiled code for the function, which can help us track down the problem.

3. Do M-x toggle-debug-on-error, which asks Emacs to enter a debug mode when it runs into errors. When the debug mode is entered, you get a backtrace. Please copy the backtrace into the bug report.

4. Evaluate the expression `(current-buffer)' in the backtrace buffer. Go to the "Debugger" on the menu, and pick "Eval expression".

(After this you can do M-x toggle-debug-on-error again to turn off debug mode, and continue as normal.)

Complete your bug-report by explaining what sequence of actions led to this error.

The bug-report will also automatically list the values of all your VM option variables. Please don't delete them because they are necessary for me to recreate your problem.

Cheers,
Uday




reply via email to

[Prev in Thread] Current Thread [Next in Thread]