After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 627369 - Not receiving notifications after WriteMany
Not receiving notifications after WriteMany
Status: RESOLVED FIXED
Product: dconf
Classification: Core
Component: writer
0.5
Other All
: Normal normal
: ---
Assigned To: dconf-maint
dconf-maint
Depends on:
Blocks:
 
 
Reported: 2010-08-19 14:26 UTC by Tomas Bzatek
Modified: 2010-08-23 14:13 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tomas Bzatek 2010-08-19 14:26:34 UTC
My app uses g_settings_delay() / g_settings_apply() to write many changes at once. This properly corresponds to the WriteMany dbus method. However, another app (say simple 'gsettings monitor' command) listening to changes to the particular key is not receiving notify signals. This works properly if I remove the delay/apply combo.

Looking at dbus, I see proper communication:

> method call sender=:1.340 -> dest=ca.desrt.dconf serial=181 path=/ca/desrt/dconf/Writer/user; interface=ca.desrt.dconf.Writer; member=WriteMany
>    string "/desktop/gnome/background/"
>    array [
>       struct {
>          string "color-shading-type"
>          array [
>             variant                string "solid"
>          ]
>       }
> ...
>       struct {
>          string "secondary-color"
>          array [
>             variant                string "#ffffff"
>          ]
>       }
>    ]
> signal sender=:1.287 -> dest=(null destination) serial=512 path=/; interface=ca.desrt.dconf.Writer; member=Notify
>    string "/desktop/gnome/background/"
>    array [
>       string "color-shading-type"
> ...
>       string "secondary-color"
>    ]
>    string "244:1.287"

No signal arrives though.

With single writes, the communication is like this:

> method call sender=:1.277 -> dest=ca.desrt.dconf serial=38 path=/ca/desrt/dconf/Writer/user; interface=ca.desrt.dconf.Writer; member=Write
>    string "/desktop/gnome/background/draw-background"
>    array [
>       variant          boolean false
>    ]
> signal sender=:1.287 -> dest=(null destination) serial=510 path=/ca/desrt/dconf/Writer/user; interface=ca.desrt.dconf.Writer; member=Notify
>    string "/desktop/gnome/background/draw-background"
>    array [
>    ]
>    string "243:1.287"

And we can see the incoming signal just fine.


Debugging the gsettings backend in dconf code, it seems that the dconf_settings_backend_filter() callback is not called for Notify methods. I don't see any obvious reason for that though. dconf_settings_backend_subscribe() is always called with the '/desktop/gnome/background/' argument.
Comment 1 Tomas Bzatek 2010-08-19 16:06:37 UTC
Oh I see the problem now - look at the 'path' argument for Notify method. And we're subscribing to 
> type='signal',interface='ca.desrt.dconf.Writer',path='/ca/desrt/dconf/Writer/user',arg0path='/desktop/gnome/background/'
Comment 2 Allison Karlitskaya (desrt) 2010-08-19 16:08:18 UTC
path or arg0path?
Comment 3 Tomas Bzatek 2010-08-19 16:11:17 UTC
(In reply to comment #2)
> path or arg0path?
path actually, arg0path looks sane.
Comment 4 Allison Karlitskaya (desrt) 2010-08-19 16:18:39 UTC
oh.  the problem is with the path that the service is sending on multiple-writes.

Ok.  Thanks for the report.  This will be fixed in the next release.
Comment 5 Allison Karlitskaya (desrt) 2010-08-23 14:13:22 UTC
should be fixed now