GNU bug report logs - #29220
26.0.90; eieio-persistent-read fail to restore saved object.

Previous Next

Package: emacs;

Reported by: pierre.techoueyres <at> free.fr (Pierre Téchoueyres)

Date: Wed, 8 Nov 2017 22:20:01 UTC

Severity: normal

Merged with 33441

Found in version 26.0.90

Full log


Message #35 received at 29220 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: pierre.techoueyres <at> free.fr (Pierre Téchoueyres)
Cc: Eric Abrahamsen <eric <at> ericabrahamsen.net>, 29220 <at> debbugs.gnu.org,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#29220: 26.0.90;
 eieio-persistent-read fail to restore saved object.
Date: Fri, 17 Nov 2017 22:40:58 -0500
Noam Postavsky <npostavs <at> users.sourceforge.net> writes:

> When I set a breakpoint in eieio-persistent-read, the object being seems
> correct.  If I evaluate (pcache-get ret 'foo) in edebug, I get 44, as
> expected.  But somehow the object which gets returned from
> (pcache-repository :object-name #1="pcache-test/tmp2") doesn't have
> anything in its hash table.

Okay, I found where the problem is, it's failing pcache-validate-repo
(what's the idea behind throwing an error which is caught and ignored
anyway?):

    (cl-defmethod make-instance ((cache (subclass pcache-repository)) &rest args)
      ...
                 (condition-case nil
                     (let* ((obj (eieio-persistent-read path 'pcache-repository)))
                       (and (or (pcache-validate-repo obj)
                                (error "wrong version")) ...
                   (error nil)))

Specifically, this part:

    (defun pcache-validate-repo (cache)
       ...
       (cl-every
        (lambda (entry)
          (and (object-of-class-p entry (slot-value cache 'entry-cls))
               ...
        (pcache-hash-table-values (slot-value cache 'entries)))))

I can't really tell what this function is supposed to be checking.




This bug report was last modified 6 years and 15 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.