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 688811 - wacom: g-s-d can enter an infinite recursion in gsettings callback on tablet-pc
wacom: g-s-d can enter an infinite recursion in gsettings callback on tablet-pc
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: wacom
unspecified
Other All
: Normal major
: ---
Assigned To: Olivier Fourdan
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2012-11-21 14:41 UTC by Olivier Fourdan
Modified: 2012-11-29 22:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (1.43 KB, patch)
2012-11-21 14:52 UTC, Olivier Fourdan
committed Details | Review

Description Olivier Fourdan 2012-11-21 14:41:06 UTC
g-s-d can enter an infinite recursion on gsettings callback on a tablet-pc (where the monitor EDID is not Wacom)

gsettings callback -> set_display() -> gsd_wacom_device_get_display_matrix() -> find_output() -> set_display_by_output() -> g_settings_set_value() -> will generate another gsettings callback ...

Downstream bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=877153
https://bugzilla.redhat.com/show_bug.cgi?id=877191
Comment 1 Olivier Fourdan 2012-11-21 14:52:52 UTC
Created attachment 229580 [details] [review]
Proposed patch
Comment 2 Bastien Nocera 2012-11-21 21:57:13 UTC
Did you verify that we have a fallback in case the data filled into the GSettings is incorrect?

We should probably add in libwacom to support more than "WAC" as the EDID too.
Comment 3 Olivier Fourdan 2012-11-23 11:20:16 UTC
(In reply to comment #2)
> Did you verify that we have a fallback in case the data filled into the
> GSettings is incorrect?

That's another problem not necessarily related to this issue.

If the EDID in gsettings is invalid (or not found), then find_output_by_display() will return NULL.

In such a case, two possibilities:

1. The tablet is a screen-tablet, we look for EDID="WAC,*,*", but this may fail as well (typical case of a Tablet-PC)
2. The tablet is a regular tablet, we do not search for a monitor if none is found.

Either way, if all this fail, we end up mapping to the entire screen, this is what is done in gsd_wacom_device_get_display_monitor()

This happens if some maps a device t oa monitor and then remove the monitor, or if someone unplugs the connector if his Cintiq, for example.

> We should probably add in libwacom to support more than "WAC" as the EDID too.

Agreed, that would allow for multiple screen tablets as well. I am sure one day or another we shall have people connecting a Cintiq to a tablet-PC (as those are to become more and more widespread with Windows 8, I believe).

But again, that's another issue IMHO.
Comment 4 Bastien Nocera 2012-11-29 22:24:19 UTC
Pushed in gnome-3-6 and master