On Jan 9, 2009, at 4:01 PM, Kevin Ryde wrote:
The program below gets two errors
GLib-CRITICAL **: g_hash_table_lookup: assertion `hash_table !=
NULL' failed at /home/gg/bug/glib-sig-ret-undef/foo.pl line 44.
[gperl_value_from_sv] FIXME: unhandled type - 0 ((null)
fundamental for (null))
I think the first is gperl_fundamental_wrapper_class_from_type()
called
when "wrapper_class_by_type" is NULL. Is that supposed to be at least
possible? Maybe when _gperl_sv_from_value_internal() gets a signal's
return value which is a new fundamental type from some C code, when
neither that new type nor anything else has ever yet told to
gperl_register_fundamental_full()?
That is not supposed to be possible. We're supposed to do all the
type registration when loading the module, before any code using the
things gets called. But you're also not supposed to pass around
GValues with type G_TYPE_NONE, so far as i know. It makes me think
something else is afoot. Try the fix below, first.
I think the second is because gperl_signal_class_closure_marshal()
tries
to gperl_value_from_sv() into a GValue which is G_TYPE_NONE. Dunno
if a
return_value location like that is supposed to be allowed, but
gtk_binding_entry_activate() calls g_signal_emitv() that way.
That sounds like it could be a problem. We use the presence of a
return value pointer to determine whether we're supposed to expect any
return values, but here they've passed ... *brane asplode*
Try this: at the top of gperl_signal_class_closure_marshal(),
if (return_value) {
/* Try to cover for people doing strange things */
if (G_TYPE_NONE == G_VALUE_TYPE (return_value))
return_value = NULL;
}
This will cause return_value to be NULL later in the function where we
decide what flags to pass to call_method(). G_VOID|G_DISCARD will
cause the interpreter to toss anything returned from the subroutine so
that we don't have to worry about it.
--
zella (crying): I want...
us: What?
zella (still crying): I want... something!
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list