[cells-gtk-devel] Problems with demo

Peter Hildebrandt peter.hildebrandt at gmail.com
Wed Jan 30 00:22:56 UTC 2008


Leandro,

welcome aboard.

As to the error you are reporting, I am pretty much in the dark right 
now.  The interesting thing is, Friedrich (I cc'd him) has seen the 
exact same error today.  It is not an issue for me (or other people on 
the list here).

Since both of you are runnign into the exact same issue, maybe we can 
track it down.

I noticed both of you of 64bit machines (I am on an ancient Pentium-M). 
   It might be an issue with (and 64bit cffi gtk).  Your sbcl is quite a 
bit older than Friedrich's, so I doubt that the problem lies with sbcl.

Your error is:
 > Unhandled memory fault at #x400000004B.
 >    [Condition of type SB-SYS:MEMORY-FAULT-ERROR]

Friedrich reported the exact same thing:
Unhandled memory fault at #x400000004B.
    [Condition of type SB-SYS:MEMORY-FAULT-ERROR]

I am just speculating here, but:  I have never seen a memory fault 
starting with anything but #x00 -- if my maths is correct, you need more 
than 32bit to express the fault address there.  Forgive me if this is 
nonsense.

Your backtrace:
 > Backtrace:
 >   0: (SB-SYS:MEMORY-FAULT-ERROR)
 >   1: (SB-SYS:MEMORY-FAULT-ERROR)
 >   2: ("foreign function: #x41D7B2")
 >   3: ("foreign function: #x41D880")

Friedrich's backtrace:
Backtrace:
   0: (SB-SYS:MEMORY-FAULT-ERROR)
   1: (SB-SYS:MEMORY-FAULT-ERROR)
   2: ("foreign function: #x41DC32")
   3: ("foreign function: #x41DD00")

In both cases the memory fault appears to be raised in a C function and 
then being caught by sbcl.

Since I cannot reproduce this problem, here's a few ideas how to narrow 
down the problem further:

- check the last few (say 50) lines of the (gtk-demo t) output when you 
comment out only the menus or only the tree-view page.  If it is 
consistent, send us a longer version of the trace (~200 lines).  This 
will give me a better idea about what is going on before the crash.

- comment out parts of the demos in test-menus.lisp and 
test-tree-view.lisp.  If you could get those demos to run this way, it'd 
be great to see which subpart of the demo causes the problem.

On a different note, we are currently working on porting cells-gtk to 
cells3 and cffi from darcs.  I doubt that this might remedy your issue, 
but it might be worth giving it a try on your config once we have 
something stable.  The menus turned out to be a difficult issue in this 
respect, too.

HTH,
Peter

Leandro Ríos wrote:
> Hi,
> 
> I'm having problems to run the demo of cells-gtk. I compiled 
> libcellsgtk.so (I'm running Ubuntu 7.10 AMD64 and SBCL 1.0.6) When I run 
> (test-gtk:gtk-demo) sbcl halts with this error:
> 
> Unhandled memory fault at #x400000004B.
>    [Condition of type SB-SYS:MEMORY-FAULT-ERROR]
> 
> Restarts:
>  0: [ABORT] Return to SLIME's top level.
>  1: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread" 
> {1002AB65E1}>)
> 
> Backtrace:
>   0: (SB-SYS:MEMORY-FAULT-ERROR)
>   1: (SB-SYS:MEMORY-FAULT-ERROR)
>   2: ("foreign function: #x41D7B2")
>   3: ("foreign function: #x41D880")
> 
> If I enable debug:
> 
> -------------------------------------------------------------------
> CL-USER> (test-gtk:gtk-demo t)
> 
> eval (INIT-GTK)
> Calling (gtk-adds-g-thread-supported )
>   (gtk-adds-g-thread-supported ) returns 1--> NIL
> eval (SHOW-WIN APP-NAME TERMINATE-ON-CLOSE T)
> eval (SETF APP
>              (APPLY #'MAKE-INSTANCE APP-NAME VISIBLE (C-IN NIL) INITARGS))
> Calling (gtk-statusbar-new )
>   (gtk-statusbar-new ) returns #.(SB-SYS:INT-SAP #X00AF7330)
> Calling (gtk-statusbar-get-context-id #.(SB-SYS:INT-SAP #X00AF7330) MAIN)
>   (gtk-statusbar-get-context-id #.(SB-SYS:INT-SAP #X00AF7330) MAIN) 
> returns 1
> Calling (gtk-list-store-newv 2 #.(SB-SYS:INT-SAP #X00ABAF90))
> 
> -------------------------------------------------------------------
> 
> And the debugger pops up with above error.
> 
> If I modify the model test-gtk like:
> 
> (defmodel test-gtk (gtk-app)
>   ()
>   (:default-initargs
>       :title "GTK Testing"
>     ;;:tooltips nil ;;dkwt
>     ;;:tooltips-enable nil ;;dkwt
>     :icon (namestring *small-image*)
>     :stock-icons (list (list :my-g (namestring *stock-icon-image*)))
>     :position :center
>     :splash-screen-image (namestring *splash-image*)
>     :width 650 :height 550
>     :kids (let ((tabs '("Buttons"
>                         "Display"
>             "Layout"
>                         ;"Menus" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< HERE
>                         "Dialogs"
>             "Addon"
>                         "Entry"
>             "Textview"
>                         ;"Tree-view" <<<<<<<<<<<<<<<<<<<<<<<<<<<<< HERE
>                 ;"Drawing"
>             )))
>             (list (mk-notebook
>                    :tab-labels tabs
>                    :kids  (loop for test-name in tabs
>                               collect (make-instance
>                                           (intern (string-upcase
>                                                    (format nil "test-~a" 
> test-name))
>                                             :test-gtk))))))))
> 
> the demo runs, but the treeview and menu demos are missing (of course).
> 
> Using Cells 2.0 and CFFI 0.9.2, from asdf-install and cells-gtk from CVS
> 
> Any ideas?
> 
> Thanks in advance,
> 
> Leandro
> 
> _______________________________________________
> cells-gtk-devel site list
> cells-gtk-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/cells-gtk-devel



More information about the cells-gtk-devel mailing list