I’m using signal_connect(‘notify’) on a bunch of Gtk::Label instances,
each wrapped in an EventBox. Sporadically, the callback fails because
the GLib::Param passed as the second parameter to the callback is a
terminated Ruby object. This results in a message concerning calling
“method_missing” on the terminated object and reporting that the class
is 0x0, followed by Ruby crashing with a segmentation fault.
If I test that the GLib::Param is among the objects known by ObjectSpace
and ignore the callback if it isn’t (a very time-consuming test, by the
way), then the program proceeds. Often, a second or third bad callback
is seen among the hundreds of widgets created.
UPDATE: The widget passed to the callback is the EventBox and it has not
For a specific configuration of my program, it is the same
Gtk::Label/Gtk::EventBox that is involved, but for different
configurations (meaning the Gtk::Label/Gtk::EventBox objects may be
created in different numbers and in different orders), a different
instance sees the error.
It seems like it might be that the Nth widget created has the problem,
for N somewhere in the hundreds. It seems plausible that GC was run just
before the problem occurs, but I have no proof.
Relevant library versions:
Ruby interpreter: 1:188.8.131.52