gtk:color-selection and Unknown Pointer Object

Chisheng Huang <[email protected]> Sat, 05 Jan 2008 13:01:01 -0800
Newsgroups gmane.lisp.clg.devel
Message-ID <[email protected]>
Hi,

The following code was distilled from a real system to illustrate
a problem that's been bothering me.  I'm using the 2007-12 snapshot
of CMUCL on a Gentoo x86 computer and the CLG is the latest from
the CVS source.

Step 0. Enter the following into Lisp:

  (defun popup-palette ()
    (let ((dialog (make-instance 'gtk:dialog
                                 :modal nil
                                 :button (list "gtk-ok"
                                               #'gtk:widget-destroy
                                               :object t))))
      (gtk:box-pack-start (gtk:dialog-vbox dialog)
                          (make-instance 'gtk:color-selection)
                          ;;(make-instance 'gtk:label
                          ;;               :label "this should be ok")
                          t t 0)
      (gtk:widget-show-all dialog)
      dialog))

  (let ((w (make-instance 'gtk:window)))
    (gtk:widget-add-events w '(:button-press))
    (glib:signal-connect w
                         :button-press-event
                         #'(lambda (event)
                             (declare (ignore event))
                             (popup-palette)))
    (gtk:widget-show w))

Step 1. Click the left mouse button over the blank window to pop up a
   color selection dialog.

Step 2. Click the OK button of the the color selection dialog.

Setp 3. Repeat 1 again.

Step 4. Repeat 2 again and you'll get the following error:

Invalid function name: #<Unknown Pointer Object, type=#x8B
                         {58D30A97}>
   [Condition of type SIMPLE-TYPE-ERROR]

Restarts:
 0: [CONTINUE] Return from callback function
 1: [RE-INVOKE] Re-invoke callback function
 2: [DISCONNECT] Disconnect and exit signal handler
 3: [ABORT] Return to Top-Level.

Backtrace:
  0: (LISP::FDEFINITION-OBJECT #<Unknown Pointer Object, type=#x8B {58D30A97}> NIL)
  1: (KERNEL:%COERCE-TO-FUNCTION #<Unknown Pointer Object, type=#x8B {58D30A97}>)
  2: ("DEFMETHOD COMPUTE-SLOT-READER-FUNCTION (EFFECTIVE-VIRTUAL-ALIEN-SLOT-DEFINITION)" #<GTK:DIALOG at 0x8115E38>)
  3: ("DEFMETHOD COMPUTE-SLOT-BOUNDP-FUNCTION (EFFECTIVE-VIRTUAL-SLOT-DEFINITION)" #<GTK:DIALOG at 0x8115E38>)
  4: ("DEFMETHOD COMPUTE-SIGNAL-FUNCTION (WIDGET T T T T)" #<GTK:DIALOG at 0x8115E38>)
  5: ("DEFMETHOD SIGNAL-CONNECT (GOBJECT T T)" #<GTK:DIALOG at 0x8115E38> 0)
  6: (GLIB:INVOKE-CALLBACK 22 NIL #<GTK:DIALOG at 0x8115E38> 0)
  7: (GLIB::INVOKE-SIGNAL-HANDLER 22 #<unused-arg> #<GTK:DIALOG at 0x8115E38> 0)
  8: (GLIB::CALLBACK-TRAMPOLINE #<Function GLIB::INVOKE-SIGNAL-HANDLER {59327581}> 22 2 #.(SYSTEM:INT-SAP #x3FFFB960) ...)
  9: (GLIB::SIGNAL-HANDLER-MARSHAL 268430813 268430809)
 10: ("call_into_lisp+#x8C [#x8052BE8] /usr/local/cmucl/bin/lisp")
 11: ("funcall3+#x26 [#x8052A56] /usr/local/cmucl/bin/lisp")
 12: ("Foreign function call land")

If you replace the color selection widget with a label widget,
repeating steps 1 & 2 as many times as you want won't send CMUCL
into the debugger.

Could someone please shed any light on what's going on?

Best wishes,

-cph

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/