Имею на борту sbcl-1.0.40-r1 и вот такой код
(defclass clox-gtk2 ()
((widgets :initarg :widgets
:accessor clox-gtk2-widgets
:initform nil
:documentation "plist of widgets
:window - main window
:scrolled-window - scroll container
:vbox - vertical container
:text-view - main text view widget
other names not reserved ")
(buffers :initarg :buffers
:accessor clox-gtk2-buffers
:documentation "list of buffer class instances")))
(defmethod shared-initialize :after ((obj clox-gtk2) slot-names &rest init-args &key key)
(let* ((window (or (getf (clox-gtk2-widgets obj) :window)
(make-instance 'gtk:gtk-window :title "clox" :position :center)))
(text-view (or (getf (clox-gtk2-widgets obj) :text-view)
(make-instance 'gtk:text-view)))
(scrolled-window (or (getf (clox-gtk2-widgets obj) :scrolled-window)
(make-instance 'gtk:scrolled-window))))
(gtk:container-add window scrolled-window)
(gtk:container-add scrolled-window text-view)
;; (gobject:g-signal-connect window "destroy-event" #'(lambda (x)
;; (declare (ignore x))
;; (gtk:gtk-main-quit)
;; nil))
(setf (getf (clox-gtk2-widgets obj) :window) window
(getf (clox-gtk2-widgets obj) :text-view) text-view
(getf (clox-gtk2-widgets obj) :scrolled-window) scrolled-window)))
(defgeneric clox-gtk2-show (inst)
(:documentation "Show main window"))
(defmethod clox-gtk2-show ((inst clox-gtk2))
(gtk:widget-show (getf (clox-gtk2-widgets inst) :window) :all t))
(defun run ()
(let ((instance (make-instance 'clox-gtk2)))
(gtk:within-main-loop
(clox-gtk2-show instance))
instance))
(<unknown>:7848): Gtk-CRITICAL **: gtk_text_attributes_ref: assertion `values != NULL' failed
(<unknown>:7848): Gtk-CRITICAL **: gtk_text_attributes_ref: assertion `values != NULL' failed
(<unknown>:7848): Pango-CRITICAL **: pango_layout_new: assertion `context != NULL' failed
CORRUPTION WARNING in SBCL pid 7848(tid 140737199892752):
Memory fault at 48 (pc=0x7fffeff7809f, sp=0x7fffeece52b0)
The integrity of this image is possibly compromised.
Continuing with fingers crossed.
debugger invoked on a SB-SYS:MEMORY-FAULT-ERROR in thread #<THREAD
"cl-gtk2 main thread" RUNNING
{10052BD611}>:
#<CLOX-GTK2::CLOX-GTK2 {10052BF9A1}>
* Unhandled memory fault at #x48.