Subject: bug#28502: 25.3; list-packages ends with "error in process filter: End of file during parsing"

From: Stefan Kangas <[email-masked]>
Date: Mon, 21 Oct 2019 00:05:57 +0200

Michael Heerdegen <[email-masked]> writes:

> FWIW, I see now that my error was a bit different; I can still reproduce
> it with the copy of the file I had removed (it is attached):
>
> Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
>   package--add-to-archive-contents(nil "melpa")
>   package-read-archive-contents("melpa")
>   package-read-all-archive-contents()
>   package-initialize()
>   byte-code("..." 10)
>   load("~/gnu-emacs/.gnu-emacs")
>   eval-buffer(#<buffer  *load*> nil "/home/micha/.emacs" nil t)  ; Reading at buffer position 261
>   load-with-code-conversion("/home/micha/.emacs" "/home/micha/.emacs" t t)
>   load("~/.emacs" t t)
>   #f(compiled-function () #<bytecode 0x2567f5>)()
>   command-line()
>   normal-top-level()

Thanks for the archive-contents file and backtrace.

The file you saw contained a package entry that was nil.  My guess is
that this was due to an intermittent error on MELPA, since it was
well-formed in all other respects.

I don't think it's necessary to signal an error in this case.  We should
just ignore nil entries.  On the other hand, it might indicate that
something is wrong with the package archive, so it's nice to warn about
it.

I've installed the attached patch on master which does that.

Best regards,
Stefan Kangas