Re: Gtk (HEAD) problem
- From: Mikael Hermansson <mikeh bahnhof se>
- To: hp redhat com
- Cc: gtk-devel-list redhat com, timj gtk org
- Subject: Re: Gtk (HEAD) problem
- Date: Mon, 12 Feb 2001 16:13:11 +0100
Oki!
Here is the real debug report about:
GRuntime-CRITICAL **: file gvalue.c: line 48 (g_value_init): assertion
`G_VALUE_TYPE (value) == 0' failed
is happening on call to object_get_property() --> class->get_property
(gobject.c: 709)
it seems like gtktexttag.c: get_color_arg() is calling g_value_init on an
already initiated GValue object
(This tmpvalue is initiated in g_object_get_property gobject.c: 1214)
Thats why this fails:
GdkColor *col=NULL;
GValue val={0,};
g_value_init(&val,GTK_TYPE_GDK_COLOR);
g_object_get_property(G_OBJECT(tag),"foreground_gdk",&val);
Greats
M.H.
On mån, 12 feb 2001 15:07:33 Mikael Hermansson wrote:
> On lör, 10 feb 2001 18:50:08 Havoc Pennington wrote:
> >
> > Mikael Hermansson <mikeh bahnhof se> writes:
> > > I am trying to use the property API in glib to get values in
> > GtkTextTag.
> > >
> > > But I am getting GRuntime-CRITICAL **: file gvalue.c: line 48
> > > (g_value_init): assertion `G_VALUE_TYPE (value) == 0' failed when
> when
> > > calling: g_object_get_property using this code:
> > >
> > > GdkColor *col=NULL;
> > > GValue val={0,};
> > > g_value_init(&val,GTK_TYPE_GDK_COLOR);
> > > g_object_get_property(G_OBJECT(tag),"foreground_gdk",&val);
> > > col=g_value_get_as_pointer(&val);
> > > if (col)
> > > g_string_sprintfa(str,"<font
> > > color=#%X%X%X>\n",col->red,col->green,col->blue);
> > >
> >
> > Looks correct to me, which g_value_init() causes the warning? (what
> > line in libgobject?)
> >
> > Havoc
> >
>
> Sorry my late answer but it looks like the problem is happening in
> g_object_get_property when init the temp value (line 1214). Also
> it could be the g_value_convert (wich also calls g_value_init)?
>
> gobject.c from line 1214:
>
> gobject.c:1214: g_value_init (&tmp_value, G_PARAM_SPEC_VALUE_TYPE
> (pspec));
> gobject.c:1225: g_value_convert (&tmp_value, value);
>
> I will try recompile glib today with full debug to see were it goes
> wrong.
>
> Greats
>
> M.H
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]