mate-panel crashes on empty Icon field in any .desktop file

Bug #1676840 reported by David Kastrup
60
This bug affects 3 people
Affects Status Importance Assigned to Milestone
mate-panel (Ubuntu)
Fix Released
Low
Unassigned
Zesty
Fix Released
Low
Unassigned

Bug Description

[Impact]

Any .desktop file from /usr/share/applications which contains the empty Icon
field makes mate-panel crash. It's very annoying and confusing because you
don't have to create a panel launcher from that file - it happens by itself,
usually during package updates/upgrades.

The patch attached to this report fixes the issue.

The fix is already present in Artful and tested by developers and users.
Would be nice to backport it to Zesty as well to free users from frustration.

[Test Case]

Edit any .desktop file in /usr/share/applications and remove the value part
from the Icon field (that is, make it just "Icon="). Restart mate-panel just
in case, then update/upgrade some packages. Soon the panel should crash.

[Regression Potential]

Quite low. The fix only affects loading icons which are used for menu items.
The worst outcome would be to lose some icons in the menu applets.

[Other Info]

The patch is included into the debdiff attached to bug 1675888.

The debdiff contains patches to fix bug 1675888, bug 1676840, bug 1690517,
bug 1695648. See other reports for the corresponding SRU templates.

Note that the debdiff attached to bug 1690517 is a separate one for Artful.

[Original Description]

Happened while sudo apt-get upgrade was running, with the following package list:

The following packages have been kept back:
  libubuntu-app-launch4 linux-headers-lowlatency:amd64 linux-image-lowlatency:amd64 linux-lowlatency:amd64 linux-tools-lowlatency:amd64
The following packages will be upgraded:
  chrome-gnome-shell eject gir1.2-ges-1.0 gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0 gir1.2-mate-panel gir1.2-networkmanager-1.0 gnome-settings-daemon
  gnome-settings-daemon-schemas gstreamer1.0-alsa gstreamer1.0-libav gstreamer1.0-plugins-bad gstreamer1.0-plugins-bad-faad gstreamer1.0-plugins-bad-videoparsers
  gstreamer1.0-plugins-base gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-plugins-ugly-amr gstreamer1.0-pulseaudio
  gstreamer1.0-tools gstreamer1.0-x libegl1-mesa libegl1-mesa-dev libgbm1 libges-1.0-0 libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-dri:amd64 libgl1-mesa-glx
  libgl1-mesa-glx:amd64 libglapi-mesa libglapi-mesa:amd64 libgles2-mesa libgstreamer-plugins-bad1.0-0 libgstreamer-plugins-base1.0-0 libgstreamer-plugins-good1.0-0
  libgstreamer1.0-0 liblirc-client0 liblircclient0 libmate-desktop-2-17 libmate-panel-applet-4-1 libmirclient-dev libmirclient9 libmircommon-dev libmircommon7 libmircookie-dev
  libmircookie2 libmircore-dev libmircore1 libmirprotobuf3 libnm-glib-vpn1 libnm-glib4 libnm-util2 libnm0 libosmesa6 libosmesa6:amd64 libpcre16-3 libpcre3 libpcre3:amd64
  libpcre3-dev libpcre32-3 libpcrecpp0v5 libsnapd-glib1 libwayland-egl1-mesa libxatracker2 linux-libc-dev linux-libc-dev:amd64 linux-tools-common mate-desktop
  mate-desktop-common mate-panel mate-panel-common mate-settings-daemon mate-settings-daemon-common mesa-common-dev mesa-vdpau-drivers network-manager python3-gst-1.0
  signon-ui signon-ui-service signon-ui-x11 snapd-login-service thunderbird thunderbird-globalmenu thunderbird-gnome-support thunderbird-locale-de thunderbird-locale-en
  thunderbird-locale-en-gb thunderbird-locale-en-us thunderbird-locale-fr xscreensaver-data xscreensaver-data-extra xscreensaver-gl xscreensaver-gl-extra
95 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

ProblemType: Crash
DistroRelease: Ubuntu 17.04
Package: mate-panel 1.18.0-0ubuntu2
ProcVersionSignature: Ubuntu 4.10.0-13.15-lowlatency 4.10.1
Uname: Linux 4.10.0-13-lowlatency x86_64
ApportVersion: 2.20.4-0ubuntu2
Architecture: i386
CrashCounter: 1
CurrentDesktop: MATE
Date: Tue Mar 28 13:20:38 2017
ExecutablePath: /usr/bin/mate-panel
InstallationDate: Installed on 2011-10-14 (1991 days ago)
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111011)
ProcCmdline: mate-panel
SegvAnalysis:
 Segfault happened at: 0xf70b9394: mov 0x4(%esi),%eax
 PC (0xf70b9394) ok
 source "0x4(%esi)" (0x00000004) not located in a known VMA region (needed readable region)!
 destination "%eax" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: mate-panel
StacktraceTop:
 () at /usr/lib/i386-linux-gnu/libgtk-3.so.0
 () at /usr/lib/i386-linux-gnu/libgtk-3.so.0
 g_datalist_clear () at /lib/i386-linux-gnu/libglib-2.0.so.0
 () at /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
 g_object_unref () at /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
Title: mate-panel crashed with SIGSEGV
UpgradeStatus: Upgraded to zesty on 2017-01-05 (81 days ago)
UserGroups: adm admin audio cdrom dialout fax floppy lpadmin lxd plugdev pulse-access sambashare

Revision history for this message
David Kastrup (dak) wrote :
information type: Private → Public
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 gtk_image_definition_unref (def=0x0) at ././gtk/gtkimagedefinition.c:249
 gtk_drag_source_site_destroy (data=0xf3603b20) at ././gtk/gtkdragsource.c:117
 g_datalist_clear () from /tmp/apport_sandbox_00X9V6/lib/i386-linux-gnu/libglib-2.0.so.0
 ?? () from /tmp/apport_sandbox_00X9V6/usr/lib/i386-linux-gnu/libgobject-2.0.so.0
 g_object_unref () from /tmp/apport_sandbox_00X9V6/usr/lib/i386-linux-gnu/libgobject-2.0.so.0

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 mate-panel (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: mate-panel crashed with SIGSEGV

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

Changed in mate-panel (Ubuntu):
status: New → Confirmed
Revision history for this message
Vlad Orlov (monsta) wrote :

Uploaded a patch that should fix it.

More info at upstream reports:
https://github.com/mate-desktop/mate-panel/issues/494
https://github.com/mate-desktop/mate-panel/issues/555

New upstream 1.18.x and 1.16.x versions will be released later.

tags: added: patch yakkety
Revision history for this message
Vlad Orlov (monsta) wrote :

Workaround for unpatched versions:

1. Look at .desktop files in /usr/share/applications.
2. Find those containing a line with "Icon=" (that is, a key w/o any value).
3. Remove that line completely and save the file.
4. Restart mate-panel.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "fix-crash-on-empty-icon-field.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

Revision history for this message
Vlad Orlov (monsta) wrote :

Fix is included in upstream release 1.18.3 now.

tags: added: artful
Revision history for this message
Vlad Orlov (monsta) wrote :

Fixed version had landed in 17.10 repos. Still needs to be patched in 17.04 and 16.10.

tags: removed: artful
Vlad Orlov (monsta)
summary: - mate-panel crashed with SIGSEGV
+ mate-panel crashes on empty Icon field in any .desktop file
Vlad Orlov (monsta)
tags: added: ubuntu-mate-zesty-sru
Changed in mate-panel (Ubuntu):
status: Confirmed → Fix Released
Changed in mate-panel (Ubuntu Zesty):
status: New → Triaged
importance: Undecided → Low
Changed in mate-panel (Ubuntu):
importance: Medium → Low
Vlad Orlov (monsta)
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello David, or anyone else affected,

Accepted mate-panel into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mate-panel/1.18.1-0ubuntu2.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-zesty to verification-done-zesty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-zesty. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in mate-panel (Ubuntu Zesty):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-zesty
Revision history for this message
Vlad Orlov (monsta) wrote :

Testing in Zesty. It's done after testing the fix for bug 1675888, so the packages are already updated to version 1.18.1-0ubuntu2.1 from zesty-proposed.

- made the Icon field empty in /usr/share/applications/pluma.desktop
- restarted the panel
- reinstalled engrampa package (it could be any package which has a .desktop file)
- waited a few minutes - the panel doesn't crash
- reinstalled pluma package to get the Icon field filled again
- waited a few minutes again - the panel doesn't crash
- checked the panel menubar - all menu items have their icons, so no regression happened

All good here.

tags: added: verification-done-zesty
removed: verification-needed-zesty yakkety
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mate-panel - 1.18.1-0ubuntu2.1

---------------
mate-panel (1.18.1-0ubuntu2.1) zesty; urgency=medium

  * Added patches:
    + fix-transparent-panel-crashes.patch - fixes occasional crashes
      when the panel is transparent (LP: #1675888)
    + fix-crash-on-empty-icon-field.patch - fixes crashes when some
      .desktop file has empty Icon field (LP: #1676840)
    + fix-file-folder-launchers.patch - makes file/folder launchers
      work again (LP: #1690517)
    + fix-crash-on-unknown-signals.patch - fixes tray area crashes
      on unknown signals from apps using indicators (LP: #1695648)

 -- Vlad Orlov <email address hidden> Mon, 06 Nov 2017 20:44:51 +0300

Changed in mate-panel (Ubuntu Zesty):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for mate-panel has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.