2.0.2 and GConf

Mark Johnson mrj001 at shaw.ca
Tue Dec 5 14:25:52 EST 2006


Mark Johnson wrote:

> Mark Johnson wrote:
>
>> Derek Atkins wrote:
>>
>>
>>
>>> Mark Johnson <mrj001 at shaw.ca> writes:
>>>
>>>
>>>
>>>
>>>> Mark Johnson wrote:
>>>>
>>>>
>>>>
>>>>> This does not look like the sort of thing that occurs when debugging
>>>>> optimized code, but I am going to try a build without optimization
>>>>> anyway.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>> Obviously, the optimization was interfering with debugging. Here is 
>>>> the gnucash terminal output:
>>>> mj at ds9:~$ gnucash --g-fatal-warnings
>>>>
>>>> GConf-CRITICAL **: file gconf-listeners.c: line 444 
>>>> (ltable_remove): assertion `node != NULL' failed
>>>> aborting...
>>>>
>>>>
>>> This would seem to imply that we're trying to remove a listener
>>> a second time, when the listener has already been removed. At
>>> least that's my reading of the message.
>>>
>>>
>>>
>> I've been working on this in my spare time. (You'd think I'd have 
>> more of that since I'm on leave from work, but....)
>>
>> Setting a breakpoint at gnc-gconf-utils.c:867 indicates that this is 
>> not being called twice. I also set a breakpoint at 
>> gnc-main-window.c:2692 where the notification is added. I noted the 
>> id that was stored in the GObject under notify_tag (in 
>> gnc_gconf_add_notification). When gnucash tried to release this 
>> listener (in gnc_gconf_remove_notification), the id value had changed 
>> (I confirmed that the object pointer was the same as before).
>>
>> This raises two possibilities:
>> 1. Gnucash is changing it. (I expect this would be a bug.)
>> 2. "Something else" is trashing it. (Someone else's bug)
>>
>>
>>
> In file src/gnome-utils/gnc-main-window.c, we have the following lines:
> 2692 gnc_gconf_add_notification(G_OBJECT(window), GCONF_GENERAL,
> 2693 gnc_main_window_gconf_changed,
> 2694 GNC_MAIN_WINDOW_NAME);
> 2695 gnc_gconf_add_notification(G_OBJECT(window), 
> DESKTOP_GNOME_INTERFACE,
> 2696 gnc_main_window_gconf_changed,
> 2697 GNC_MAIN_WINDOW_NAME);
>
> Now gnc_gconf_add_notification, stores an id in the object under the 
> key notify_tag. notify_tag is made up of two components - the whoami 
> argument to the function and a fixed string NOTIFY_TAG 
> ("GncMainWindow-notify_id" in both cases). This triggered my watch 
> point for finding out when the notify-tag was overwritten.
>
> Note in the above two calls to gnc_gconf_add_notification that the 
> whoami and object parameters are the same. This causes the second 
> call's storing of the id value in notify_tag key of the object to 
> overwrite that of the first call. Thus, when the notify removal is 
> later attempted in src/gnome-utils/gnc-main-window.c:
> 1815 gnc_gconf_remove_notification(G_OBJECT(window), 
> DESKTOP_GNOME_INTERFACE,
> 1816 GNC_MAIN_WINDOW_NAME);
> 1817 gnc_gconf_remove_notification(G_OBJECT(window), GCONF_GENERAL,
> 1818 GNC_MAIN_WINDOW_NAME);
>
> The second call fails and prints my GConf fatal warning, since it has 
> just tried to remove the same notification that the first call 
> removed. Naturally, this has lead to one notification being removed 
> and the other being lost.
>
> There were no further triggers of my watchpoint after line 2695 above. 
> So nothing else changed the id value. So it looks like it was 
> possibility #1 after all.
>
> Comments?
>
> Mark
>
>
>
Filed in Bugzilla:
http://bugzilla.gnome.org/show_bug.cgi?id=382706

Mark



More information about the gnucash-devel mailing list