! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Not loading desktop; not reacting to settings manager
Status:
RESOLVED: FIXED
Severity:
blocker
Product:
Xfdesktop
Component:
General

Comments

Description boris 2013-03-05 19:33:15 CET
After upgrading to xfdesktop 4.10.1-1, the desktop was not loaded and changing the settings had no effect. Restarting helped to set an image background, but after that changing the settings any further had no effect. Further restarting had no effect.

After rolling back to 4.10.0-5, everything worked as usual. The last settings from the setting manager (set while using the non-working version) were automatically loaded at session start.
Comment 1 Evangelos Foutras 2013-03-06 03:24:35 CET
It appears to hang with 100% CPU usage (on one core). Using git-bisect the offending commit appears to be ebad377e5cd067cec9f2b402dff4991ddc4cc3b5 [1].

The issue exists when a solid color is selected as the background; the bug doesn't manifest when a background image is selected.

[1] http://git.xfce.org/xfce/xfdesktop/commit/?id=8672ff1f791a9801b9309052d053f8b12c4adab6
Comment 2 Evangelos Foutras 2013-03-06 12:12:44 CET
Created attachment 4948 
[xfce-4.10 branch] Fix hang when no backdrop image is selected (Bug #9892)

(Attached patch fixes the issue for me. It's based against the xfce-4.10 branch. The changes are described in the commit message [also pasted below].)

Checking whether backdrop->priv->image_path exists isn't enough; we'd
also have to check whether backdrop->priv->show_image is TRUE before
proceeding to apply a backdrop image.

When backdrop->priv->show_image is FALSE, iw and ih (image width/height)
will be zero, but can later be used to compute the upper limit of a for
loop as well as other computations.

To solve this, a new boolean variable (apply_backdrop_image) is added
and set to TRUE only if the return value of gdk_pixbuf_get_file_info()
is not NULL (meaning that the image format is recognized).

The above logic error was introduced in commit
ebad377e5cd067cec9f2b402dff4991ddc4cc3b5.
Comment 3 Evangelos Foutras 2013-03-06 12:14:49 CET
Created attachment 4949 
[master branch] Port fix for bug #9892 from the xfce-4.10 branch

(Same as the above patch but rebased against the master branch. The changes are described in the commit message [also pasted below].)

With the recent addition of per-workspace wallpapers (commit
88a920697b22b0653f244ede15f8e645ae013139) this bug is much harder to
trigger but can still manifest when an invalid image is selected and
style is set to Tiled. (xfce_backdrop_get_pixbuf() will hang in a for
loop.)

This commit ports the original fix for consistency and correctness
reasons. In addition, it also addresses the following warning which
appears when style is set to None:

  ** (xfdesktop:3236): CRITICAL **: Invalid image style: 0
Comment 4 Jérôme Guelfucci editbugs 2013-03-08 19:58:11 CET
Eric, are you OK with the patch? If yes, I can release xfdesktop 4.10.2 with this this week-end.
Comment 5 Eric Koegel editbugs 2013-03-09 07:05:20 CET
Created attachment 4951 
Fix tiling for animated images

Both patches are good, thank you Evangelos. I've added an additional patch for the 4.10 branch that could be added as well. When tiling an animated image where the image size changes between frames the tiling will fail. This is because gdk_pixbuf_get_file_info returns the bounding box size for the total animation and we need the size for just the first frame. This patch adds that.
Comment 6 Jérôme Guelfucci editbugs 2013-03-09 11:45:18 CET
Ok, pushed the two patches to the git xfce-4.10 branch. I would appreciate if some of you could test this branch before I release a new version, better be safe this time!
Comment 7 Evangelos Foutras 2013-03-09 14:40:21 CET
The bug is solved in current xfce-4.10 branch (commit 7b2eda13185b9e48d7f2a45f9b327f8d36a4637c) and I didn't noticed any other issues while trying out different combinations for Image and Style.
Comment 8 Jérôme Guelfucci editbugs 2013-03-10 11:59:30 CET
I just released xfdesktop 4.10.2, thank you all for your help to get this fixed quickly.

Bug #9892

Reported by:
boris
Reported on: 2013-03-05
Last modified on: 2013-03-24

People

Assignee:
Eric Koegel
CC List:
6 users

Version

Version:
Unspecified

Attachments

Additional information