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 763615 - Don't use Wnck on non-X11
Don't use Wnck on non-X11
Status: RESOLVED FIXED
Product: d-feet
Classification: Other
Component: general
0.3.x
Other Linux
: Normal normal
: ---
Assigned To: D-Feet Maintainer(s)
D-Feet Maintainer(s)
: 776242 (view as bug list)
Depends on:
Blocks: WaylandRelated
 
 
Reported: 2016-03-14 13:04 UTC by Timothy Ward
Modified: 2017-06-16 20:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of dfeet started on gnome on wayland (1.63 MB, image/png)
2016-03-26 12:56 UTC, Timothy Ward
  Details
Bustle application log of dfeet startup on gnoe on wayland (55.32 KB, application/octet-stream)
2016-03-26 13:16 UTC, Timothy Ward
  Details
Journal log file for dfeet start up using gnome-on-wayland (463.08 KB, text/plain)
2016-03-26 13:20 UTC, Timothy Ward
  Details
Trivial patch (316 bytes, patch)
2016-04-01 19:30 UTC, Yaroslav Isakov
none Details | Review
Don't use Wnck to get app-icons under non-X11 (1.72 KB, patch)
2016-04-17 13:24 UTC, Simon McVittie
committed Details | Review
Assume Wnck is absent on non-X11 (1.53 KB, patch)
2017-06-06 14:22 UTC, Debarshi Ray
none Details | Review
Revert "Don't use Wnck to get app-icons under non-X11" (1.88 KB, patch)
2017-06-07 10:47 UTC, Debarshi Ray
none Details | Review

Description Timothy Ward 2016-03-14 13:04:17 UTC
The application works with the X windows backend but not the wayland backend.

The X windows backend has several bugs which freeze the display on Fedora 23 making development harder than it should be.
Comment 1 Thomas Bechtold 2016-03-25 10:03:09 UTC
Can you be a bit more specific and maybe add some logs and steps how to reproduce this bug?
Comment 2 Timothy Ward 2016-03-26 12:56:02 UTC
Created attachment 324788 [details]
Screenshot of dfeet started on gnome on wayland
Comment 3 Timothy Ward 2016-03-26 13:16:59 UTC
Created attachment 324789 [details]
Bustle application log of dfeet startup on gnoe on wayland
Comment 4 Timothy Ward 2016-03-26 13:20:44 UTC
Created attachment 324790 [details]
Journal log file for dfeet start up using gnome-on-wayland
Comment 5 Timothy Ward 2016-03-26 13:49:29 UTC
The d-feet application when started on gnome-on-wayland starts up with the main
window and system and session bus widget buttons put does not display any information in both the system or session bus views.

I have attached a screen view plus a bustle-log and a journal log of the startup
of the application.

I do understand that Gnome-on-wayland is not feature complete but many
gnome applications seem to work correctly.

If you require additional debug info - please inform the debug steps to reproduce what is required.

The info added should have been included in the original report but was missed.

I am seeing the failure at anytime the d-feet application is started with gnome-on wayland. 

It is easy to reproduce just start the d-feet application on gnome-on-wayland

The Version number of d-feet installed is d-feet-0.3.9-3.fc23.noarch.
Comment 6 Yaroslav Isakov 2016-04-01 19:25:20 UTC
I had same problem, but I've managed to fix it by disabling wnck: I've forced has_libwnck = False in wnck_utils.py, and problem is gone
Comment 7 Yaroslav Isakov 2016-04-01 19:30:30 UTC
Created attachment 325182 [details] [review]
Trivial patch

I know that this is just a workaround, but it seems that wnck is X11-only library
Comment 8 Simon McVittie 2016-04-17 13:24:58 UTC
Created attachment 326199 [details] [review]
Don't use Wnck to get app-icons under non-X11

---
Here's what I think is a more correct patch: continue to use Wnck, but only if Wnck.Screen.get_default() returns non-None (i.e. in the underlying C code, wnck_screen_get_default() returns non-NULL).
Comment 9 Simon McVittie 2016-04-17 13:25:50 UTC
Downstream bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=821294
Comment 10 Thomas Bechtold 2016-04-23 10:25:00 UTC
Thanks for the fix!
Comment 11 Debarshi Ray 2017-06-06 11:19:32 UTC
Comment on attachment 326199 [details] [review]
Don't use Wnck to get app-icons under non-X11

This was committed.
Comment 12 Debarshi Ray 2017-06-06 11:38:09 UTC

*** This bug has been marked as a duplicate of bug 776242 ***
Comment 13 Debarshi Ray 2017-06-06 11:39:08 UTC
Damn, I got it the wrong way around.
Comment 14 Debarshi Ray 2017-06-06 11:39:16 UTC
*** Bug 776242 has been marked as a duplicate of this bug. ***
Comment 15 Debarshi Ray 2017-06-06 11:42:11 UTC
On GNOME 3.22 onwards or depending on the compiler flags or the phase of the moon, this led to a crash. See bug 776242 where wnck_screen_get is called with an obscenely negative number.
Comment 16 Debarshi Ray 2017-06-06 12:00:00 UTC
(In reply to Debarshi Ray from comment #15)
> On GNOME 3.22 onwards or depending on the compiler flags or the phase of the
> moon, this led to a crash. See bug 776242 where wnck_screen_get is called
> with an obscenely negative number.

It is sometimes called with an obscenely large positive number too, but it only seems to crash when it is negative. Anyway, I think we should not call into Wnck at all on Wayland.
Comment 17 Debarshi Ray 2017-06-06 14:21:48 UTC
(In reply to Debarshi Ray from comment #16)
> (In reply to Debarshi Ray from comment #15)
> > On GNOME 3.22 onwards or depending on the compiler flags or the phase of the
> > moon, this led to a crash. See bug 776242 where wnck_screen_get is called
> > with an obscenely negative number.
> 
> It is sometimes called with an obscenely large positive number too, but it
> only seems to crash when it is negative. Anyway, I think we should not call
> into Wnck at all on Wayland.

The difference between the Fedora and Debian breakages might be due to Python 3 versus Python 2. d-feet was switched to Python 3 in Fedora 24, before Wayland became default. That's probably why we have started seeing the crashes with Fedora 25 after Wayland became the default.
Comment 18 Debarshi Ray 2017-06-06 14:22:28 UTC
Created attachment 353262 [details] [review]
Assume Wnck is absent on non-X11

This is on top of the patch in bug 783468
Comment 19 Simon McVittie 2017-06-06 21:32:38 UTC
(In reply to Debarshi Ray from comment #18)
> Assume Wnck is absent on non-X11

Not a d-feet maintainer, but this looks good to me. You might want to revert my patch after applying this one, to get rid of the extra level of indent and the unexplained/unnecessary None check.
Comment 20 Debarshi Ray 2017-06-07 10:47:40 UTC
Created attachment 353309 [details] [review]
Revert "Don't use Wnck to get app-icons under non-X11"
Comment 21 Thomas Bechtold 2017-06-16 20:10:40 UTC
Applied in git. Thanks!