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

Bug #741387 reported by Micah Gersten
118
This bug affects 19 people
Affects Status Importance Assigned to Milestone
gtk+3.0 (Ubuntu)
Invalid
Undecided
Unassigned
Natty
Invalid
Undecided
Unassigned
ubuntu-mono (Ubuntu)
Fix Released
High
Mathieu Trudel-Lapierre
Natty
Fix Released
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.

Revision history for this message
Gary M (garym) wrote :

Also occurs for me with version 0.0.26.

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

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

Revision history for this message
Gediminas Paulauskas (menesis) wrote :

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

Paul Sladen (sladen)
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.
Revision history for this message
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.

Revision history for this message
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

Revision history for this message
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) = ?

Revision history for this message
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.

Revision history for this message
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

Revision history for this message
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

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

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

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

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)
Revision history for this message
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)
description: updated
Changed in ubuntu-mono (Ubuntu):
status: In Progress → Fix Committed
milestone: none → ubuntu-11.04-beta-1
Martin Pitt (pitti)
Changed in ubuntu-mono (Ubuntu Natty):
milestone: ubuntu-11.04-beta-1 → ubuntu-11.04-beta-2
Revision history for this message
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.

Revision history for this message
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
Revision history for this message
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.

Revision history for this message
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.

Revision history for this message
Eric Finkenbiner (lnknpk04) wrote :

ubuntu-mono updated to 0.0.27, but same problem exists

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.