Runtime error when inheriting from RRIDXP
Sandro Poppi <[email protected]> Sun, 16 Feb 2003 17:09:17 +0100
| Newsgroups | gmane.network.beep.roadrunner.general |
|---|---|
| Message-ID | <[email protected]> |
Hi,
although my problem seems to be gobject based I ask it here:
I'm using the current cvs versions of roadrunner, rridxp and rrtls to
create an own profile. It worked with previous rr cvs versions but not
with the current.
I'm inheriting from RRIDXP this way:
typedef struct _RRTLSIDXP RRTLSIDXP;
typedef struct _RRTLSIDXPClass RRTLSIDXPClass;
struct _RRTLSIDXP
{
RRIDXP parent_object;
};
/* Class specific data */
struct _RRTLSIDXPClass
{
RRIDXPClass parent_class;
};
The get_type function is:
GType
rr_tlsidxp_get_type (void)
{
static GType rr_type = 0;
rr_debug1 ("rr_tlsidxp_get_type called.");
if (!rr_type) {
static GTypeInfo type_info = {
sizeof (RRTLSIDXPClass),
NULL,
NULL,
(GClassInitFunc) rr_tlsidxp_class_init,
NULL,
NULL,
sizeof (RRTLSIDXP),
16,
/* (GInstanceInitFunc) rr_tlsidxp_init*/
NULL
};
rr_debug4 ("rr_tlsidxp_get_type: g_type_register_static call
follows.");
rr_type = g_type_register_static (RR_TYPE_IDXP,
"RRTLSIDXP",
&type_info, 0);
rr_debug4 ("rr_type is a RR_CHANNEL: %s", g_type_is_a (rr_type,
RR_TYPE_CHANNEL)?"yes":"no");
rr_debug4 ("rr_type is a RR_IDXP: %s", g_type_is_a (rr_type,
RR_TYPE_IDXP)?"yes":"no");
/* Use the original IDXP URI, no need to use an own one. */
rr_debug4 ("rr_tlsidxp_get_type: rr_channel_set_uri call follows.");
rr_channel_set_uri (rr_type, IDXP_URI);
}
rr_debug4 ("rr_tlsidxp_get_type ended.");
return rr_type;
}
My profile compiles without any warning. But whenever I run the test
server I get the following output:
rr_tlsidxp_get_type called.
rr_tlsidxp_get_type: g_type_register_static call follows.
(process:32720): GLib-GObject-WARNING **: specified instance size for
type `RRTLSIDXP' is smaller than the parent type's `RRIDXP' instance
size
rr_type is a RR_CHANNEL: no
rr_type is a RR_IDXP: no
rr_tlsidxp_get_type: rr_channel_set_uri call follows.
RR-ERROR **: file rr-channel.c: line 584 (rr_channel_set_uri): assertion
failed: (g_type_is_a (type, RR_TYPE_CHANNEL))
aborting...
Aborted
So the call to g_type_register_static() fails generating the warning
message.
I already searched the internet with no luck. I'm sure it's a very
trivial error, I'm just overseeing something.
Any hint what it could be?
TIA
Ciao,
Sandro
--
"Linux is like a wigwam: no windows, no gates ... apache inside!"
http://spoppi.home.pages.de/
http://www.lug-burghausen.org/