[rucksack-devel] (no subject)

Леонид Новиков ln at bk.ru
Tue Dec 18 03:38:40 UTC 2007


I play with Rucksak and get this error:

CL-USER> (defvar *tmp-rucksack* #p"/tmp/tmp-rs/")
*TMP-RUCKSACK*
CL-USER> (rucksack:with-rucksack (rs *tmp-rucksack*) 
	   (rucksack:with-transaction ()
	     (defclass plan-of-acc2 () 
	   ((name :initform "1"
		  :accessor name
		  :index :string-index)
	    (accs :accessor accs))
	   (:metaclass rucksack:persistent-class)
	   (:index t))))
#<RUCKSACK:PERSISTENT-CLASS PLAN-OF-ACC2>
T
CL-USER> (rucksack:with-rucksack (rs *tmp-rucksack*)
	   (rucksack:with-transaction () 
	     (make-instance 'plan-of-acc2)
	     (rucksack:rucksack-map-class rs 'plan-of-acc2 
					  (lambda (x)
					    (print (name x))))))

"1" 
NIL
T
CL-USER> (rucksack:with-rucksack (rs *tmp-rucksack*)
	   (rucksack:with-transaction () 
	     (rucksack:rucksack-map-class rs 'plan-of-acc2 
					  (lambda (x)
					    (setf (name x) "w")))))

Argument X is not a NUMBER: NIL
   [Condition of type SIMPLE-TYPE-ERROR]

Restarts:
 0: [ABORT] Abort #<RUCKSACK:STANDARD-TRANSACTION #340689439800000 with 1 dirty object>
 1: [RETRY] Retry #<RUCKSACK:STANDARD-TRANSACTION #340689439800000 with 1 dirty object>
 2: [ABORT] Return to SLIME's top level.
 3: [CLOSE-CONNECTION] Close SLIME connection
 4: [ABORT] Exit debugger, returning to top level.

Backtrace:
  0: (SB-KERNEL:TWO-ARG-= NIL 0)
  1: (RUCKSACK::LEAF-DELETE-KEY
      #<RUCKSACK:BTREE #23 in #<STANDARD-CACHE of size 10000, heap #P"e:\\tmp\\tmp-rs\\heap" and 39 objects in memory.>>
      #<RUCKSACK:BTREE-NODE with 1 bindings {CE98CF1}>
      (#<RUCKSACK:BTREE-NODE with 2 bindings {CE984B9}> NIL)
      "1"
      :IGNORE)
  2: ((SB-PCL::FAST-METHOD RUCKSACK:BTREE-DELETE
       (RUCKSACK:BTREE #1="#<...>" . #1#))
      (#(NIL) . #())
      #<unavailable argument>
      #<RUCKSACK:BTREE #23 in #<STANDARD-CACHE of size 10000, heap #P"e:\\tmp\\tmp-rs\\heap" and 39 objects in memory.>>
      "1"
      34)
  3: ((SB-PCL::FAST-METHOD RUCKSACK:RUCKSACK-MAYBE-INDEX-CHANGED-SLOT
       (RUCKSACK:STANDARD-RUCKSACK T T T T T T T))
      #<unavailable argument>
      #<unavailable argument>
      #<RUCKSACK::SERIAL-TRANSACTION-RUCKSACK in #P"\\tmp\\tmp-rs\\" with 0 roots {CE3C511}>
      #<RUCKSACK:PERSISTENT-CLASS PLAN-OF-ACC2>
      #<PLAN-OF-ACC2 #34 in #<STANDARD-CACHE of size 10000, heap #P"e:\\tmp\\tmp-rs\\heap" and 39 objects in memory.>>
      #<RUCKSACK::PERSISTENT-EFFECTIVE-SLOT-DEFINITION NAME>
      "1"
      "w" ..)
  4: ((SB-PCL::FAST-METHOD (SETF SB-MOP:SLOT-VALUE-USING-CLASS) :AROUND
       (T RUCKSACK:PERSISTENT-CLASS T T))
      #<unavailable argument>
      #<CLOSURE (LAMBDA #) {D335ABD}>
      "w"
      #<RUCKSACK:PERSISTENT-CLASS PLAN-OF-ACC2>
      #<PLAN-OF-ACC2 #34 in #<STANDARD-CACHE of size 10000, heap #P"e:\\tmp\\tmp-rs\\heap" and 39 objects in memory.>>
      #<RUCKSACK::PERSISTENT-EFFECTIVE-SLOT-DEFINITION NAME>)
  5: (SB-PCL::SET-SLOT-VALUE
      #<PLAN-OF-ACC2 #34 in #<STANDARD-CACHE of size 10000, heap #P"e:\\tmp\\tmp-rs\\heap" and 39 objects in memory.>>
      NAME
      "w")
  6: ((SB-PCL::FAST-METHOD RUCKSACK::MAP-BTREE-KEYS-FOR-NODE
       (RUCKSACK:BTREE RUCKSACK:BTREE-NODE T T T T T T))
      #<unavailable argument>
      #<unavailable argument>
      #<RUCKSACK:BTREE #1 in #<STANDARD-CACHE of size 10000, heap #P"e:\\tmp\\tmp-rs\\heap" and 39 objects in memory.>>
      #<RUCKSACK:BTREE-NODE with 1 bindings {CE91459}>
      #<CLOSURE (LAMBDA #) {CE9033D}>
      NIL
      NIL
      NIL ..)
  7: ((SB-PCL::FAST-METHOD RUCKSACK::MAP-BTREE-KEYS-FOR-NODE
       (RUCKSACK:BTREE RUCKSACK:BTREE-NODE T T T T T T))
      #<unavailable argument>
      #<unavailable argument>
      #<RUCKSACK:BTREE #1 in #<STANDARD-CACHE of size 10000, heap #P"e:\\tmp\\tmp-rs\\heap" and 39 objects in memory.>>
      #<RUCKSACK:BTREE-NODE with 2 bindings {CE90C61}>
      #<CLOSURE (LAMBDA #) {CE9033D}>
      NIL
      NIL
      NIL ..)
  8: ((LABELS RUCKSACK::MAP-INSTANCES) PLAN-OF-ACC2)
  9: ((SB-PCL::FAST-METHOD RUCKSACK:RUCKSACK-MAP-CLASS
       (RUCKSACK:STANDARD-RUCKSACK #1="#<...>" . #1#))
      #<unavailable argument>
      #<unavailable argument>
      #<RUCKSACK::SERIAL-TRANSACTION-RUCKSACK in #P"\\tmp\\tmp-rs\\" with 0 roots {CE3C511}>
      PLAN-OF-ACC2
      #<FUNCTION (LAMBDA #) {CE30A25}>)

This patch will possible allow to avoid such behaviours.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch
URL: <https://mailman.common-lisp.net/pipermail/rucksack-devel/attachments/20071218/4521a316/attachment.ksh>


More information about the rucksack-devel mailing list