Re: Crash processing g_object_new arguments

2009-11-09 Thread Braden McDaniel
On Mon, 2009-11-09 at 09:32 +0100, Nicola Fontana wrote: > Il giorno Mon, 09 Nov 2009 03:24:04 -0500 > Braden McDaniel ha scritto: > > > Clearly the "" 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

Re: Crash processing g_object_new arguments

2009-11-09 Thread Dave Howorth
David Nečas wrote: > The real problem is `pointers are integers' from the dark times of C. BCPL created many positive influences but this wasn't its finest feature. At least as seen with the benefit of hindsight! Cheers, Dave ___ gtk-app-devel-list mail

Re: Crash processing g_object_new arguments

2009-11-09 Thread David Nečas
On Mon, Nov 09, 2009 at 03:17:24PM +, ern...@comcast.net wrote: > 0 *is* NULL, in pointer contexts. In fact, some compilers define NULL > using > >#define NULL 0 > > So using NULL instead of 0, by itself, won't necessarily address the > problem, although it will if the definition happens

Re: Crash processing g_object_new arguments

2009-11-09 Thread Jim George
I've never come across this problem since I've never used any headers that re-define NULL, nor have I used gobject with C++, but it seems like enough of a "gotcha" that it might make sense to define another constant (G_ARG_TERM?) that always maps to (void *) and use that with all the glib functions

Re: Crash processing g_object_new arguments

2009-11-09 Thread erniew
David Nečas wrote: > On Mon, Nov 09, 2009 at 03:24:04AM -0500, Braden McDaniel wrote: >> 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-

Re: Crash processing g_object_new arguments

2009-11-09 Thread Lars Wirzenius
On Mon, 2009-11-09 at 09:32 +0100, Nicola Fontana wrote: > Change 0 to NULL: on 64 bit platforms 0 != NULL, hence the property list > is not terminated. Even better, in C, is to use (void *)0 or (void *)NULL, since in C it is acceptable for NULL to be #defined as 0, even though that tends to make

Re: Crash processing g_object_new arguments

2009-11-09 Thread Murray Cumming
On Mon, 2009-11-09 at 09:32 +0100, Nicola Fontana wrote: > Il giorno Mon, 09 Nov 2009 03:24:04 -0500 > Braden McDaniel ha scritto: > > > Clearly the "" 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 f

Re: Crash processing g_object_new arguments

2009-11-09 Thread Nicola Fontana
Il giorno Mon, 09 Nov 2009 03:24:04 -0500 Braden McDaniel ha scritto: > Clearly the "" 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: > > Openvr

Re: Crash processing g_object_new arguments

2009-11-09 Thread David Nečas
On Mon, Nov 09, 2009 at 03:24:04AM -0500, Braden McDaniel wrote: > OpenvrmlXembedBrowser * const browser = > OPENVRML_XEMBED_BROWSER( > g_object_new(OPENVRML_XEMBED_TYPE_BROWSER, > "control-host-proxy", host_proxy, >

Crash processing g_object_new arguments

2009-11-09 Thread Braden McDaniel
Does this backtrace suggest anything reasonably concrete to anyone here? #0 strchr () at ../sysdeps/x86_64/strchr.S:33 #1 0x003834814e1d in IA__g_param_spec_pool_lookup (pool=0x6cc500, param_name=0x7fff , owner_type=140737085709488, walk_ancestors=1) at gparam.c:105