Re: Crash processing g_object_new arguments
- From: Braden McDaniel <braden endoframe com>
- To: gtk-app-devel-list gnome org
- Subject: Re: Crash processing g_object_new arguments
- Date: Mon, 09 Nov 2009 13:00:08 -0500
On Mon, 2009-11-09 at 09:32 +0100, Nicola Fontana wrote:
Il giorno Mon, 09 Nov 2009 03:24:04 -0500
Braden McDaniel <braden endoframe com> ha scritto:
Clearly the "<Address ... out of bounds>" looks fishy; but I'm just
not seeing what could be a problem there; and I'm wondering if gdb
isn't just messing with me. The call site for
openvrml_xembed_browser_new looks like this:
OpenvrmlXembedBrowser * const browser =
OPENVRML_XEMBED_BROWSER(
g_object_new(OPENVRML_XEMBED_TYPE_BROWSER,
"control-host-proxy", host_proxy,
"control-host-name", host_name,
"dbus-thread-context",
dbus_thread_context, "expect-initial-stream", expect_initial_stream,
0));
Change 0 to NULL: on 64 bit platforms 0 != NULL, hence the property list
is not terminated.
Argh. Of course.
0L would presumably have worked fine--until the code was compiled on a
platform where sizeof (long) != sizeof (void*). (Hence Murray's
comment.)
Thanks, folks.
--
Braden McDaniel <braden endoframe com>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]