WARNING: gtk-update-icon-cache-3.0: The generated cache was invalid.

Bug #741387 reported by Micah Gersten on 2011-03-24
118
This bug affects 19 people
Affects Status Importance Assigned to Milestone
gtk+3.0 (Ubuntu)
Undecided
Unassigned
Natty
Undecided
Unassigned
ubuntu-mono (Ubuntu)
High
Mathieu Trudel-Lapierre
Natty
High
Mathieu Trudel-Lapierre

Bug Description

Running:

  sudo apt-get install --reinstall ubuntu-mono

with version 0.0.25 or 0.0.26 produces the output:

  Setting up ubuntu-mono (0.0.25) ...
  gtk-update-icon-cache-3.0: The generated cache was invalid.
  WARNING: icon cache generation failed for /usr/share/icons/ubuntu-mono-dark
  gtk-update-icon-cache-3.0: The generated cache was invalid.
  WARNING: icon cache generation failed for /usr/share/icons/ubuntu-mono-light

Solution is the minimal removal of four unneeded symlinks from the package. This allows the caches to be rebuilt successfully upon install and will effect the restoration of the Ubuntu Monochrome icons.

Gary M (garym) wrote :

Also occurs for me with version 0.0.26.

Changed in ubuntu-mono (Ubuntu):
status: New → Confirmed
tags: added: natty
Gediminas Paulauskas (menesis) wrote :

Because of this the monochrome icons are not available, standard gnome icons are used instead.

Gediminas Paulauskas (menesis) wrote :

I believe the underlying problem is Bug #741899, that SVG images are not recognized.

Paul Sladen (sladen) on 2011-03-29
tags: added: sladen-natty-ui-freeze
tags: added: gtk-update-icon-cache
description: updated
summary: - WARNING: icon cache generation failed
+ WARNING: gtk-update-icon-cache-3.0: The generated cache was invalid.
Paul Sladen (sladen) wrote :

At cypermox's suggestion, tried building without scour:

  $ sudo dpkg -i ../ubuntu-mono_0.0.26-noscour_all.deb
  gtk-update-icon-cache-3.0: The generated cache was invalid.
  WARNING: icon cache generation failed for /usr/share/icons/ubuntu-mono-light
  x4

unfortunately no difference.

Paul Sladen (sladen) wrote :

For reference: (paraphrased): bzr branch lp:ubuntu-mono && cd ubuntu-mono && sed -p -i -e 's/ --with-scour//' debian/rules && debuild -b && dpkg -i ../*.deb

Paul Sladen (sladen) wrote :

  open("/usr/share/icons/ubuntu-mono-light/.icon-theme.cache", O_RDONLY|O_LARGEFILE) = 3
  fstat64(3, {st_mode=S_IFREG|0644, st_size=40652, ...}) = 0
  mmap2(NULL, 40652, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7785000
  close(3) = 0
  munmap(0xb7785000, 40652) = 0

  write(2, "gtk-update-icon-cache-3.0", 25) = 25
  write(2, ": ", 2) = 2
  write(2, "The generated cache was invalid."..., 33) = 33
  exit_group(1) = ?

Paul Sladen (sladen) wrote :

Post-clean install:

  ls -1 /usr/share/icons/{LoginIcons,ubuntu-mono-dark,ubuntu-mono-light}/{.,}icon-theme.cache
  ls: cannot access /usr/share/icons/LoginIcons/.icon-theme.cache: No such file or directory
  ls: cannot access /usr/share/icons/ubuntu-mono-dark/icon-theme.cache: No such file or directory
  ls: cannot access /usr/share/icons/ubuntu-mono-light/icon-theme.cache: No such file or directory
  /usr/share/icons/LoginIcons/icon-theme.cache
  /usr/share/icons/ubuntu-mono-dark/.icon-theme.cache
  /usr/share/icons/ubuntu-mono-light/.icon-theme.cache

so whatever it is, is occuring only during processing of the ubuntu-mono-{dark,light} subdirectories, and then sum of the icons in '/LoginIcons' aren't a contributing factor to the failure.

Paul Sladen (sladen) wrote :

Removing "--quiet" from the shell script:

  /usr/sbin/update-icon-caches

produces the interesting juxtaposition:

  gtk-update-icon-cache-3.0: The generated cache was invalid.
  gtk-update-icon-cache-3.0: Cache file created successfully.

the executable itself is in:

  libgtk-3-bin: /usr/bin/gtk-update-icon-cache-3.0

Paul Sladen (sladen) wrote :

  gtk/updateiconcache.c:1531

    if (!validate_file (tmp_cache_path))
    {
      g_printerr (_("The generated cache was invalid.\n"));
      /*g_unlink (tmp_cache_path);*/
      exit (1);
    }

   …

  gtk/updateiconcache.c:1398
  validate_file (const gchar *file)
  {
  …
    if (!_gtk_icon_cache_validate (&info))
    {

  gtk/gtkiconcachevalidator.c:371

    371 /**
    372 * _gtk_icon_cache_validate:
    373 * @info: a CacheInfo structure
    374 *
    375 * Validates the icon cache passed in the @cache and
    376 * @cache_size fields of the @info structure. The
    377 * validator checks that offsets specified in the
    378 * cache do not point outside the mapped area, that
    379 * strings look reasonable, and that pixbufs can
    380 * be deserialized. The amount of validation can
    381 * be controlled with the @flags field.
    382 *
    383 * Return value: %TRUE if the cache is valid
    384 */
    385 gboolean
    386 _gtk_icon_cache_validate (CacheInfo *info)

  /**
   * _gtk_icon_cache_validate:
   * @info: a CacheInfo structure
   *
   * Validates the icon cache passed in the @cache and
   * @cache_size fields of the @info structure. The
   * validator checks that offsets specified in the
   * cache do not point outside the mapped area, that
   * strings look reasonable, and that pixbufs can
   * be deserialized. The amount of validation can
   * be controlled with the @flags field.
   *
   * Return value: %TRUE if the cache is valid
   */
  gboolean
  _gtk_icon_cache_validate (CacheInfo *info)
  {

nb. it could also be interaction with:

  debian/patches/060_ignore-random-icons.patch

I just tried to rebuild gtk without that patch, but the cache generation still fails to validate.

Not an issue in GTK+ at all. In a brief moment of lucidity, I tried to generate icon caches for each of the subdirectories:

sudo find . -type d -print -exec gtk-update-icon-cache -ft /usr/share/icons/ubuntu-mono-dark

Only the animation directory fails. Turns out there are duplicate symlinks for the nm-stage02-connecting03 icon.

Changed in gtk+3.0 (Ubuntu):
status: New → Invalid
Changed in ubuntu-mono (Ubuntu):
status: Confirmed → In Progress
importance: Undecided → High
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
Paul Sladen (sladen) wrote :

Wooo!

  Setting up ubuntu-mono (0.0.27) ...
  gtk-update-icon-cache-3.0: Cache file created successfully.
  gtk-update-icon-cache-3.0: Cache file created successfully.
  gtk-update-icon-cache-3.0: Cache file created successfully.

Paul Sladen (sladen) on 2011-03-31
description: updated
Changed in ubuntu-mono (Ubuntu):
status: In Progress → Fix Committed
milestone: none → ubuntu-11.04-beta-1
Martin Pitt (pitti) on 2011-03-31
Changed in ubuntu-mono (Ubuntu Natty):
milestone: ubuntu-11.04-beta-1 → ubuntu-11.04-beta-2
Martin-Éric Racine (q-funk) wrote :

1) this package misses an explicit Build-Depends on python-rsvg
2) dh_scour fails on several files, because cmpsvg dies at random.
3) the package indeed installs cleanly, this time. Hurray! :-)
4) it however still doesn't fix the broken icon issue in notification-area or in GDM.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-mono - 0.0.27

---------------
ubuntu-mono (0.0.27) natty; urgency=low

  * Clean up stray duplicate symlinks for the nm-stage02-connecting03 icon
    under animations/ that would make icon cache validation fail. (LP: #741387)
 -- Mathieu Trudel-Lapierre <email address hidden> Wed, 30 Mar 2011 16:14:45 -0400

Changed in ubuntu-mono (Ubuntu Natty):
status: Fix Committed → Fix Released
Harry (harry33) wrote :

Well I believe this issue (broken notification area) is not fixed.
I still do not have Nm-applet icon in notification area.
And still, downgrading to the previous libappindicator1_0.2.99-0ubuntu1 solves the issue.

Harry (harry33) wrote :

The broken notification area (or icons in it) is reported in the bug #741385
That is marked as duplicate to this bug report.

Eric Finkenbiner (lnknpk04) wrote :

ubuntu-mono updated to 0.0.27, but same problem exists

joopbraak (joopbraak) wrote :

bug #741385 is not marked anymore as being a duplicate of this one,
So please comment on bug #741385 if your icons in the notification area are still broken.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers