Bug 456

Summary: matchbox desktop icons crash
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Edwin Zhai <edwin.zhai>
Component: meta-yoctoAssignee: Edwin Zhai <edwin.zhai>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: Medium CC: jessica.zhang, julie.n.fleischer, kevin.tian, poky.bs.watcher, poky.watcher, richard.purdie, sgw, shane.wang
Version: 1.0   
Target Milestone: 1.1   
Hardware: x86   
OS: x86   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Edwin Zhai 2010-10-13 19:34:59 UTC
On RC1 image, after several times of booting, qemux86/-64 image probably has icons on the matchbox desktop crashed. That is, an icon of big "X" take place of original application's icon like contacts,dates..
Comment 1 Richard Purdie 2010-10-14 11:15:10 UTC
How are you shutting down the qemu images? Could this be corruption of the images?
Comment 2 Edwin Zhai 2010-10-14 17:52:42 UTC
(In reply to comment #1)
> How are you shutting down the qemu images? Could this be corruption of the
> images?

I shutdown it by clicking the shutdown icon, and heard somebody has same experience. Will look into it if I can reproduce.
Comment 3 Edwin Zhai 2011-03-02 04:28:47 UTC
This bug is not hard to reproduce, but hard to debug.

The matchbox-desktop in the final sato image(strip & prelink) can reproduce it, but all other versions can _not_, including matchbox-desktop in .../image(non-strip & non-prelink), and the one in .../packcages-split(strip & non-prelink).

Even with the bogus binary, change the running sequence for debug make this bug disappear, including:
*use gdb to attach matchbox-desktop
*use strace to log the system call
*change the start order of applications in X script.
*add some simple printf in matchbox-desktop

The error log looks like:
** (matchbox-desktop:418): WARNING **: Error loading icon: Icon 'application-x-executable' not present in theme

The phenomenon is:
All the icons on matchbox-desktop are missing, except icons of dates, tasks, keyboard and gThumb. Dates, tasks and gThumb changed to the icon of "hicolor", while keyboard and gThumb come from the /usr/share/pixmaps.

So the culprit should be:
For some tricky race condition issue, matchbox-desktop failed to locate the default gtk icon theme:"Sato", and use the fall-back theme "hicolor". In theory, this should not happen as all the icon, index, cache and config files never changed, but...

Possible fix:
We can explictly make the gtk icon theme as "Sato" in the file of "/home/root/.gtkrc-2.0"
Comment 4 Saul Wold 2011-03-03 17:31:00 UTC
Work around provided for 1.0, this will need to be fixed more correctly for 1.1

http://git.pokylinux.org/cgit/cgit.cgi/poky/commit/?id=72afe301d14873296e97738028f52afd4a73a847
Comment 5 Edwin Zhai 2011-03-08 18:27:50 UTC
some debug info:

==== matchbox-desktop ====
matchbox-desktop loads icons when idle based on glib mechanism, need further checking...
gtk_icon_theme_load_icon failed to lead the "Error loading icon: xxx" issue.


==== gtk+ ====
* icon loading *
gtk_icon_theme_load_icon        ==>>
gtk_icon_theme_lookup_icon      ==>>
choose_icon: for each theme in priv->themes, look for the required icon


* icon themes loading *
....                    ==>>
ensure_valid_themes     ==>>
load_themes             ==>>
_gtk_icon_cache_new_for_path


* themes changing *
GtkIconTheme::priv->current_theme
gobject: "gtk-icon-theme-name"
Comment 6 Edwin Zhai 2011-08-22 23:05:00 UTC
I have tried it on latest master, and couldn't reproduce it. I guess glib or gtk upgrade fix this tricky race condition.

I mark it as fixed, and revisit it if recur in future.