Re: Crash processing g_object_new arguments
- From: Murray Cumming <murrayc murrayc com>
- To: Nicola Fontana <ntd entidi it>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Crash processing g_object_new arguments
- Date: Mon, 09 Nov 2009 10:31:16 +0100
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.
And if you are compiling as C++, don't use NULL (ever) either, because
it has a different meaning in C++ . Use (void*)0.
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]