[Libguestfs] [PATCH 0/3] ruby: Fix event handler failure

Richard W.M. Jones rjones at redhat.com
Thu Aug 25 13:04:57 UTC 2011


I won't pretend I really understand what's going on here.  I've CC'd
this message to Chris since he might have a better idea.

  https://bugzilla.redhat.com/show_bug.cgi?id=733297

In this bug, it appears that the event log callback goes out of scope
and is garbage collected.  (This is despite the fact we registered it
as a global root).  When we invoke the callback later, rb_funcall
raises this exception:

  wrong argument type Proc (expected Data)

I checked the type of the callback, and indeed it changes from T_DATA
(normal) to T_NONE (raises this exception).

My workaround simply checks that the type != T_NONE before calling.

Rich.




More information about the Libguestfs mailing list