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

Re: some issues with message expiration



Dirk-Jan C. Binnema wrote:
>>>>>> On Sun, 18 Jul 2010 22:03:19 +0200, David Maus ("DM") wrote:

>[expire]

>  >> ("^\\.system$"               (date 3) remove)

>  >> First it updates the message
>  >> db, then I get the 'Wrong type argument: listp, nil'. However, I do /not/ get
>  >> any backtrace. When I then try to enter the folder, or do anything (even when
>  >> trying M-x toggle-debug-on-error), I either get that same error again. And I
>  >> cannot move the cursor anymore. Emacs menus are still accessible though, it's
>  >> not a general hang. But just about whatever I do gives me 'Wrong type
>  >> argument: listp, nil'.

>  DM> Interesting.  Do you call expire in Folder mode or Summary mode?  Here
>  DM> expiring a maildir folder works perfectly in Summary mode, but in
>  DM> Folder mode I get an error -- although a different one (WL not being
>  DM> capable of finding the file the correspondents to a maildir message
>  DM> number).

>This is in Folder mode; I just reproduced it with the latest Wanderlust from
>Dave Abrahams repo. Interestingly, when I do that in summary mode
>(wl-summary-expire), the same thing does not happen; in fact, it seems to work
>without any problem in that case.

This fits with my observation.

>Interestingly, after doing the summary-mode expire, I can try folder-mode
>expire without any further trouble -- I think this is because there is no
>msgdb update involved now.

>After glancing at the sources (wl-summary-expire vs wl-folder-expire-entity),
>it seem that the main difference is that the latter updates the msgdb first;
>and I get the errors somewhere during or after update takes place.
>But, if I enter the folder (which involves a msgdb update as well), and the
>use expire in the summary mode, things work well.

>So my current hypothesis is that for some reason, msg-updating works in some
>different and wrong way when it's triggered by folder-mode expire. Digging
>further...

Good.  This is a lead.

>  DM> A question about this one:

>  >> - when trying to expire my 'System' folder, I get
>  >> "Wrong type argument: listp, nil"
>  >> but
>  >> when I try to enter the folder afterwards I get:
>  >> "Format specifier doesn't match argument type", after which WL (or emacs)
>  >> is not very useful anymore, and tells me
>  >> "Symbol's value as variable is void: nil". After that, I cannot even close
>  >> emacs properly, but have to kill it.

>  DM> Do you have a way to reproduce this behavior?  IIRC I hit a problem
>  DM> with the same symptoms occasionally and "Symbol's value as variable is
>  DM> void: nil" sound horrible: Meaning that Emacs somehow forgot that the
>  DM> symbol nil is ... nil.  What ever WL might do wrong: THIS should not
>  DM> never happen :( (read: It could be a Emacs bug).

>Yes, this easily reproducible, it happens every time I try to expire in Folder
>Mode when the folder needs to be updated. Indeed, the nil thing seems very
>scary. Do you have any idea on how I could debug this? (as mentioned,
>toggle-debug-on-error does not work).

Good thing: You can reproduce it!  Maybe this will give a clue:

 1. Start Wanderlust

 2. Enable tracing for all functions that start with wl- or elmo-

    (progn
      (let (func)
        (mapc (lambda (f)
    	        (if (and (not (memq f func))
		         (string-match "\\(wl-\\|elmo-\\)" (symbol-name f)))
		    (setq func (cons f func)))) obarray)
        (mapc (lambda (f)
	        (trace-function-background f (get-buffer-create "*TRACE*"))) func)))

 3. Produce the first bug (format specifier etc.)

 4. The buffer "*TRACE*" might give a hint.  Especially that the
    format string was, that caused the first error.

 5. If you are lucky you might as well produce the nasty one and be
    able to save the *TRACE* buffer for further investigation.

HTH,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

Attachment: pgpKUjQLu5j0g.pgp
Description: PGP signature