[rucksack-devel] Error unbound Slot Transaction-id

Mariano Montone marianomontone at gmail.com
Wed Jan 7 17:56:07 UTC 2009


Is it possible that

(rucksack:with-rucksack (rs "/tmp/db")
          (rucksack:with-transaction ()
            (make-instance 'user :no 1)))

returns a user instance and when the lisp listener tries to print it fails
because it needs to read the slots but there aren't any transactions
anymore? That's why returning nil works fine.

I don't know if that's desirable behavior or not. Beside, I'm just guessing.


Cheers

Mariano

On Wed, Jan 7, 2009 at 2:21 PM, Helmut G. Enders <
helmut at cybernetic-systems.de> wrote:

> Here is a complete test case with sbcl.
>
> ; SLIME 2008-10-30
> CL-USER> (require :rucksack)
> ("SERIALIZE")
> CL-USER> (rucksack:with-rucksack (rs "/tmp/db")
>           (rucksack:with-transaction ()
>              (defclass user ()
>                ((no :initarg :no :accessor :no :index :number-index :unique
> t))
>                (:index t)
>                (:metaclass rucksack:persistent-class))))
> #<RUCKSACK:PERSISTENT-CLASS USER>
> T
> CL-USER> (rucksack:with-rucksack (rs "/tmp/db")
>           (rucksack:with-transaction ()
>             (make-instance 'user :no 1)))
>
> -->> ERROR:  Unable to display error condition
>              [Condition of type UNBOUND-SLOT]
>
>
> CL-USER> ;; Now the same call, but with a NIL after the make-instance:
>          ;; No Error.
>          (rucksack:with-rucksack (rs "/tmp/db")
>           (rucksack:with-transaction ()
>             (make-instance 'user :no 2) nil))
> NIL
> T
> CL-USER>
>
> There is no meaningful backtrace.
>
>
> debugger invoked on a UNBOUND-SLOT in thread #<THREAD "initial thread"
> RUNNING {A8345B1}>:
> (A UNBOUND-SLOT was caught when trying to print *DEBUG-CONDITION* when
> entering
> the debugger. Printing was aborted and the UNBOUND-SLOT was stored in
> SB-DEBUG::*NESTED-DEBUG-CONDITION*.)
> (CELL-ERROR-NAME SB-DEBUG::*NESTED-DEBUG-CONDITION*) =
> RUCKSACK:TRANSACTION-ID
>
> Helmut
>
>
> _______________________________________________
> rucksack-devel mailing list
> rucksack-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/rucksack-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/rucksack-devel/attachments/20090107/fff355d2/attachment.html>


More information about the rucksack-devel mailing list