[cells-gtk-devel] Problems with demo

Leandro Ríos leandror at tutopia.com
Thu Jan 31 01:04:19 UTC 2008


Peter Hildebrandt escribió:
>
> Leandro,
>
> welcome aboard.

Thanks!

Sorry for getting back late. I've been doing some debugging, and this is 
what I found so far:

The error is raised in SBCL's %make-alien function, file 
target-alienval.lisp. More precisely:

(defun %make-alien (bits)
  (declare (type index bits))
  (alien-funcall (extern-alien "malloc"
                               (function system-area-pointer unsigned))
                 (ash (the index (+ bits 7)) -3))) <<<<<<<<here

This is the backtrace of the last debugging step before the error occurs:

Evaluating call:
  (ASH (THE SB-INT:INDEX (+ SB-SYS:BITS 7)) -3)
With unknown arguments

   [Condition of type STEP-FORM-CONDITION]

Restarts:
 0: [STEP-CONTINUE] Resume normal execution
 1: [STEP-OUT] Resume stepping after returning from this function
 2: [STEP-NEXT] Step over call
 3: [STEP-INTO] Step into call
 4: [ABORT] Return to SLIME's top level.
 5: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread" 
{10044B06D1}>)

Backtrace:
  0: (CFFI:FOREIGN-ALLOC :INT)
  1: (GTK-FFI:GTK-LIST-STORE-NEW (:STRING :STRING))
  2: ((LAMBDA
          (CELLS::SLOT-C
           &AUX (CELLS:SELF (CELLS::C-MODEL CELLS::SLOT-C))
           (CELLS:.CACHE (CELLS::C-VALUE CELLS::SLOT-C))))
      [?#:<obs>=[0]ID/LIST-STORE])
  3: ((FLET CELLS::BODY))
  4: (CELLS::C-CALCULATE-AND-SET [?#:<obs>=[0]ID/LIST-STORE])
  5: ((SB-PCL::FAST-METHOD CELLS::C-AWAKEN-CELL (CELLS::C-DEPENDENT))
      #<unused argument>
      #<unused argument>
      [?#:<obs>=[0]ID/LIST-STORE])
  6: ((LAMBDA ()))
  7: (CELLS::CALL-WITH-INTEGRITY
      #<unused argument>
      NIL
      #<CLOSURE (LAMBDA #) {10042F5619}>)
  8: (CELLS:C-AWAKEN [?#:<obs>=[0]ID/LIST-STORE])
  9: ((SB-PCL::FAST-METHOD CELLS:MD-AWAKEN (CELLS::MODEL-OBJECT))
      (#(8) . #())
      #<unused argument>
      LIST-STORE)
 10: (CELLS:TO-BE LIST-STORE)
 11: ((SB-PCL::FAST-METHOD CELLS::C-OUTPUT-SLOT-NAME PROGN
       ((EQL 'CELLS-GTK:TREE-MODEL) CELLS-GTK:TREE-VIEW T T T))
      #<unused argument>
      #<unused argument>
      #<unused argument>
      LISTBOX
      LIST-STORE
      #<unused argument>
      #<unused argument>)
 12: ((LAMBDA
          (SB-PCL::.PV-CELL. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0.
           SB-PCL::.ARG1. SB-PCL::.ARG2. SB-PCL::.ARG3. SB-PCL::.ARG4.))
      #<unused argument>
      #<unused argument>
      CELLS-GTK:TREE-MODEL
      LISTBOX
      LIST-STORE
      NIL
      T)
 13: ((LAMBDA
          (SB-PCL::.PV-CELL. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0.
           SB-PCL::.ARG1. SB-PCL::.ARG2. SB-PCL::.ARG3. SB-PCL::.ARG4.))
      #<unused argument>
      #<unused argument>
      #<unavailable argument>
      #<unavailable argument>
      #<unavailable argument>
      #<unavailable argument>
      #<unavailable argument>)
 14: ((LAMBDA ()))
 15: (CELLS::FINISH-BUSINESS)
 16: (CELLS::CALL-WITH-INTEGRITY
      #<unused argument>
      NIL
      #<CLOSURE (LAMBDA #) {1003B81DC9}>)
 17: (CELLS::MD-SLOT-VALUE LISTBOX CELLS-GTK:TREE-MODEL)
 18: ((SB-PCL::FAST-METHOD CELLS-GTK:TREE-MODEL (CELLS-GTK:TREE-VIEW))
      #<unused argument>
      #<unused argument>
      LISTBOX)
 19: (CELLS-GTK:MK-LISTBOX)
 20: ((LAMBDA ()))
 21: ((SB-PCL::FAST-METHOD SB-PCL::DEFAULT-INITARGS
       (SB-PCL::SLOT-CLASS T T))
      #<unavailable argument>
      #<unavailable argument>
      #<unavailable argument>
      NIL
      ((:TAB-LABELS (LIST "Listbox" "Treebox" "Cells-Tree-View") #)
       (:KIDS (LIST #) #) (:DEF-GTK-CLASS-NAME 'CELLS-GTK:NOTEBOOK #)
       (:CURRENT-PAGE (CELLS:C-IN NIL) #) (:SHOW-TABS (CELLS:C-IN T) #)
       (:ON-DELETE-EVENT (CELLS:C-IN #'#) #) (:MD-NAME NIL #) ..))
 22: ((SB-PCL::FAST-METHOD MAKE-INSTANCE (CLASS))
      #<unavailable argument>
      #<unavailable argument>
      #<STANDARD-CLASS TEST-GTK::TEST-TREE-VIEW>)
 23: ((LAMBDA ()))
 24: ((SB-PCL::FAST-METHOD SB-PCL::DEFAULT-INITARGS
       (SB-PCL::SLOT-CLASS T T))
      #<unavailable argument>
      #<unavailable argument>
      #<unavailable argument>
      (:VISIBLE [i0:=[0]ANONCELL/ANONMD] :TERMINATE-ON-CLOSE T)
      ((:TITLE "GTK Testing" #)
       (:ICON (NAMESTRING TEST-GTK::*SMALL-IMAGE*) #)
       (:STOCK-ICONS (LIST #) #) (:POSITION :CENTER #)
       (:SPLASH-SCREEN-IMAGE (NAMESTRING TEST-GTK::*SPLASH-IMAGE*) #) ..))
 25: ((SB-PCL::FAST-METHOD MAKE-INSTANCE (CLASS))
      #<unavailable argument>
      #<unavailable argument>
      #<STANDARD-CLASS TEST-GTK::TEST-GTK>)
 26: (CELLS-GTK::SHOW-WIN TEST-GTK::TEST-GTK)
 27: (CELLS-GTK:START-APP TEST-GTK::TEST-GTK)
 28: (TEST-GTK:GTK-DEMO NIL)
 29: (SB-INT:SIMPLE-EVAL-IN-LEXENV (TEST-GTK:GTK-DEMO) #<NULL-LEXENV>)
 30: (SWANK::EVAL-REGION
      "(test-gtk::gtk-demo)
     "
      T)
 31: ((LAMBDA ()))
 32: ((LAMBDA (SWANK-BACKEND::FN)) #<CLOSURE (LAMBDA #) {10043AE999}>)
 33: (SWANK::CALL-WITH-BUFFER-SYNTAX #<CLOSURE (LAMBDA #) {10043AE999}>)
 34: (SWANK:LISTENER-EVAL
      "(test-gtk::gtk-demo)
     ")
 35: (SB-INT:SIMPLE-EVAL-IN-LEXENV
      (SWANK:LISTENER-EVAL "(test-gtk::gtk-demo)
     ")
      #<NULL-LEXENV>)
 36: ((LAMBDA ()))
 37: ((LAMBDA (SWANK-BACKEND::HOOK SWANK-BACKEND::FUN))
      #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK>
      #<CLOSURE (LAMBDA #) {10043AE6A9}>)
 38: ((LAMBDA ()))
 39: ((LAMBDA (SWANK-BACKEND::HOOK SWANK-BACKEND::FUN))
      #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK>
      #<FUNCTION (LAMBDA #) {100574A119}>)
 40: (SWANK::CALL-WITH-REDIRECTED-IO
      #<SWANK::CONNECTION {10032725A1}>
      #<CLOSURE (LAMBDA #) {10043AE549}>)
 41: (SWANK::CALL-WITH-CONNECTION
      #<SWANK::CONNECTION {10032725A1}>
      #<FUNCTION (LAMBDA #) {100574A119}>)
 42: (SWANK::HANDLE-REQUEST #<SWANK::CONNECTION {10032725A1}>)
 43: (SWANK::REPL-LOOP #<SWANK::CONNECTION {10032725A1}>)
 44: (SWANK::REPL-LOOP #<SWANK::CONNECTION {10032725A1}>)
 45: (SWANK::CALL-WITH-BINDINGS NIL #<CLOSURE (LAMBDA #) {100453C129}>)
 46: ((LAMBDA ()))
 47: ("foreign function: #x41D7B2")
 48: ("foreign function: #x415971")

Next step, it hangs. It seems that the problem originates in the call to
(cells:md-slot-value list-store cells-gtk:new-args) only, calling the 
function with other parameters succeeds.
I don't know enough about cffi or sbcl internals to determine if it is a 
malformed call from cffi or a bug in sbcl itself.

If you need me to perform any test you can think of, I'll be pleased to 
do so. Thanks for your help, Peter.

Leandro




More information about the cells-gtk-devel mailing list