Various apps crash due to assertion failure in ensure_surface_for_gicon [gtkiconhelper.c:493/494]

Bug #1627564 reported by Thom Guida
166
This bug affects 19 people
Affects Status Importance Assigned to Milestone
GTK+
Fix Released
Unknown
debconf (Ubuntu)
Fix Released
High
Unassigned
Focal
Confirmed
Undecided
Unassigned
gtk+3.0 (Ubuntu)
Confirmed
High
Unassigned
Focal
Invalid
Undecided
Unassigned

Bug Description

https://errors.ubuntu.com/problem/2b11576fed59ad23c640bc85a266cc82ec30a689
https://errors.ubuntu.com/problem/9d612b3f25168e76adb91fa4eedc301ffa632383
https://errors.ubuntu.com/problem/519aee3ed0c68efc5b754ee3e783103e59361d46

---

bubble opened up indicating there was a failure during the latest update.

ProblemType: Crash
DistroRelease: Ubuntu 16.10
Package: lightdm-gtk-greeter 2.0.1-2ubuntu4
ProcVersionSignature: Ubuntu 4.8.0-16.17-generic 4.8.0-rc7
Uname: Linux 4.4.0-9136-generic i686
ApportVersion: 2.20.3-0ubuntu7
Architecture: i386
Date: Sun Sep 25 20:37:06 2016
ExecutablePath: /usr/sbin/lightdm-gtk-greeter
InstallationDate: Installed on 2016-08-04 (52 days ago)
InstallationMedia: Lubuntu 16.10 "Yakkety Yak" - Alpha i386 (20160727)
ProcCmdline: /usr/sbin/lightdm-gtk-greeter
ProcEnviron:
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/false
Signal: 6
SourcePackage: lightdm-gtk-greeter
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

modified.conffile..etc.lightdm.lightdm-gtk-greeter.conf:
 [greeter]
 theme-name = Lubuntu-dark-panel
mtime.conffile..etc.lightdm.lightdm-gtk-greeter.conf: 2016-08-14T22:33:57.293011

Revision history for this message
Thom Guida (thom-1) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 g_assertion_message () from /tmp/apport_sandbox_PhKEt1/lib/i386-linux-gnu/libglib-2.0.so.0
 g_assertion_message_expr () from /tmp/apport_sandbox_PhKEt1/lib/i386-linux-gnu/libglib-2.0.so.0
 ensure_surface_for_gicon (self=self@entry=0x816fcd80, style=0x8170a8a8, dir=dir@entry=GTK_TEXT_DIR_LTR, scale=1, gicon=0xb1f02508) at ././gtk/gtkiconhelper.c:493
 gtk_icon_helper_load_surface (self=0x816fcd80, scale=1) at ././gtk/gtkiconhelper.c:564
 gtk_icon_helper_ensure_surface (self=self@entry=0x816fcd80) at ././gtk/gtkiconhelper.c:601

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceSource.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in lightdm-gtk-greeter (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
information type: Private → Public
Vlad Orlov (monsta)
affects: lightdm-gtk-greeter (Ubuntu) → gtk+3.0 (Ubuntu)
summary: - was doing an upgrade and this created a trouble report
+ crash due to assertion in ensure_surface_for_gicon
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: crash due to assertion in ensure_surface_for_gicon

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gtk+3.0 (Ubuntu):
status: New → Confirmed
tags: added: artful
summary: - crash due to assertion in ensure_surface_for_gicon
+ Crash due to assertion failure in ensure_surface_for_gicon
+ [gtkiconhelper.c:493]
Revision history for this message
Sebastien Bacher (seb128) wrote : Re: Crash due to assertion failure in ensure_surface_for_gicon [gtkiconhelper.c:493]

The issue there can at least be hit during upgrades, on the machine I'm currently using which is on bionic

$ LC_ALL=C eog

(eog:5727): GdkPixbuf-WARNING **: 15:51:18.029: Cannot open pixbuf loader module file '/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory

Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /org/gtk/libgtk/icons/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)

gdk-pixbuf is being upgraded

iU libgdk-pixbuf2.0-0:amd64 2.36.11-2 amd64 GDK Pixbuf library

summary: Crash due to assertion failure in ensure_surface_for_gicon
- [gtkiconhelper.c:493]
+ [gtkiconhelper.c:493] (when png loader is missing/during upgrades)
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: Crash due to assertion failure in ensure_surface_for_gicon [gtkiconhelper.c:493] (when png loader is missing/during upgrades)
description: updated
Changed in gtk+3.0 (Ubuntu):
importance: Medium → High
summary: - Crash due to assertion failure in ensure_surface_for_gicon
+ Debconf crash due to assertion failure in ensure_surface_for_gicon
[gtkiconhelper.c:493] (when png loader is missing/during upgrades)
Revision history for this message
Sebastien Bacher (seb128) wrote : Re: Debconf crash due to assertion failure in ensure_surface_for_gicon [gtkiconhelper.c:493] (when png loader is missing/during upgrades)

Going to reassigning to debconf, while it's gtk not handling when loaders are not configured that's during-update issue where the system is in inconsistent state and I'm unsure GTK itself is where to fix the problem

it had been discussed a bit on https://irclogs.ubuntu.com/2020/04/21/%23ubuntu-release.html#t16:15

debconf handles GTK failing, but that's not a clear failure case, the error is hit when trying to load icons ... one way to address this would perhaps be to make debconf try to do that and fallback as well if it's failing. Reassigning to foundation and tagging rls-ff-incoming since that's a common case of upgrade failure

affects: gtk+3.0 (Ubuntu) → ubuntu
tags: added: rls-ff-incoming
tags: added: bionic focal
removed: artful yakkety
affects: ubuntu → debconf (Ubuntu)
tags: removed: rls-ff-incoming
tags: added: id-5f3eab1b0d119251fb17b47e
tags: added: fr-348
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in debconf (Ubuntu Focal):
status: New → Confirmed
Revision history for this message
Balint Reczey (rbalint) wrote :

This is indeed a complex problem and it is hard to do anything reasonable about a missing GTK frontend when debconf is not initiated from the terminal.

OTOH I think there is an easy fix for GTK+ to always include an "image-missing" icon at compile time, but apparently I'm not the first one coming up with this idea, but something is still broken:

gtk/gtkiconhelper.c:494

  if (destination == NULL)
    {
      GError *error = NULL;
      destination = gtk_icon_theme_load_icon (icon_theme,
                                              "image-missing",
                                              width,
                                              flags | GTK_ICON_LOOKUP_USE_BUILTIN | GTK_ICON_LOOKUP_GENERIC_FALLBACK,
                                              &error);
      /* We include this image as resource, so we always have it available or
       * the icontheme code is broken */
      g_assert_no_error (error);
      g_assert (destination);
      symbolic = FALSE;
    }

Revision history for this message
Iain Lane (laney) wrote :

> OTOH I think there is an easy fix for GTK+ to always include an "image-missing" icon at compile time

I'm sorry, it's not that easy. A PNG icon is indeed included, and it gets found properly (also from the actual icon theme; that is a dependency of GTK). The problem is the ability to load PNGs *at all* is not available sometimes during the middle of dist-upgrades.

I think extending that test program in Debconf (referred to in the IRC log above) to do a bit more work - trying to load an icon - might make the fallback trigger in this case too.

e.g:

  my $window = Gtk3::Window->new('toplevel');
  my $icontheme = Gtk3::IconTheme::get_default;
  my $icon = $icontheme->load_icon('image-missing', 32, []);

If you manually remove '/usr/lib/*/gdk-pixbuf-2.0/2.10.0/loaders.cache' (suggest doing this in a VM) then you can reproduce this by extracting the program out of Debconf.

Changed in gtk+3.0 (Ubuntu):
status: New → Invalid
Changed in gtk+3.0 (Ubuntu Focal):
status: New → Invalid
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
summary: - Debconf crash due to assertion failure in ensure_surface_for_gicon
- [gtkiconhelper.c:493] (when png loader is missing/during upgrades)
+ Various apps crash due to assertion failure in ensure_surface_for_gicon
+ [gtkiconhelper.c:493/494]
Changed in gtk+3.0 (Ubuntu):
status: Invalid → Confirmed
tags: added: hirsute
Changed in gtk+3.0 (Ubuntu):
importance: Undecided → High
description: updated
Changed in debconf (Ubuntu):
status: Confirmed → Fix Released
Changed in gtk:
status: Unknown → Fix Released
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.