While editing main menu, xfce4-panel crashed with SIGSEGV in fast_validate()

Bug #1217916 reported by Alistair Buxton
62
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Garcon
Unknown
Unknown
alacarte (Fedora)
Won't Fix
Undecided
alacarte (Ubuntu)
Fix Released
Medium
Unassigned
garcon (Ubuntu)
Fix Released
Undecided
Unassigned
xfce4-panel (Ubuntu)
Invalid
Undecided
Unassigned
xfdesktop4 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

To reproduce:

1. Open the main menu properties.
2. Click "Edit" to open the menu editor.
3. Disable some launchers: mail reader, system settings, log out and/or launcher directories such as Accessories.
4. Attempt to reenable them - this does not work.
5. Disable a different launcher - notice that any launcher you tried to previously reenable (possibly an odd number of times) is now enabled.
6. Click on the main menu on the panel. The whole panel crashes.

Your panel is now totally broken. No amount of changes in the main menu editor will fix it. The only way to recover is to rm ~/.local/share/applications/*, then open the menu editor and click "restore system defaults".

Alacarte spits out this error when trying to reenable the disabled launcher items:

Traceback (most recent call last):
  File "/usr/share/alacarte/Alacarte/MainWindow.py", line 343, in on_item_tree_show_toggled
    self.editor.setVisible(item, True)
  File "/usr/share/alacarte/Alacarte/MenuEditor.py", line 182, in setVisible
    self.writeItem(item, NoDisplay=False)
  File "/usr/share/alacarte/Alacarte/MenuEditor.py", line 408, in writeItem
    f.write(contents)
  File "/usr/lib/python2.7/codecs.py", line 691, in write
    return self.writer.write(data)
  File "/usr/lib/python2.7/codecs.py", line 351, in write
    data, consumed = self.encode(object, self.errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd9 in position 262: ordinal not in range(128)

A quicker way to reproduce the xfce crashes:

"truncate --size 0 ~/.local/share/desktop-directories/xfce-accessories.directory"

This causes xfdesktop to instantly segfault, and xfce4-panel to segfault the next time you open the main menu.

ProblemType: Crash
DistroRelease: Ubuntu 13.10
Package: xfce4-panel 4.10.1-1ubuntu1
ProcVersionSignature: Ubuntu 3.11.0-4.9-generic 3.11.0-rc7
Uname: Linux 3.11.0-4-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.12.1-0ubuntu2
Architecture: amd64
Date: Wed Aug 28 15:29:27 2013
ExecutablePath: /usr/bin/xfce4-panel
InstallationDate: Installed on 2013-08-27 (0 days ago)
InstallationMedia: Xubuntu 13.10 "Saucy Salamander" - Alpha amd64 (20130827)
MarkForUpload: True
ProcCmdline: xfce4-panel --display :0.0 --sm-client-id 2d7a344e9-88a4-4aeb-bbde-215467583950
ProcEnviron:
 LANGUAGE=en_GB:en
 PATH=(custom, user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SegvAnalysis:
 Segfault happened at: 0x7fecdca51260 <g_utf8_validate+464>: movzbl (%rdi),%eax
 PC (0x7fecdca51260) ok
 source "(%rdi)" (0x00000000) not located in a known VMA region (needed readable region)!
 destination "%eax" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: xfce4-panel
StacktraceTop:
 g_utf8_validate () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
 garcon_menu_directory_set_name () from /usr/lib/x86_64-linux-gnu/libgarcon-1.so.0
 ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
 g_object_new_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
 g_object_new () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
Title: xfce4-panel crashed with SIGSEGV in g_utf8_validate()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
description: updated
Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

This also puts xfdesktop into a permanent crash loop, but clearing out ~/.local/share/applications doesn't fix it.

description: updated
description: updated
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 fast_validate (str=<optimized out>) at /build/buildd/glib2.0-2.37.6/./glib/gutf8.c:1453
 g_utf8_validate (str=str@entry=0x0, max_len=max_len@entry=-1, end=end@entry=0x0) at /build/buildd/glib2.0-2.37.6/./glib/gutf8.c:1621
 garcon_menu_directory_set_name (directory=0x7fece0d7fba0, name=0x0) at garcon-menu-directory.c:441
 object_set_property (nqueue=0x7fece0e235b0, value=0x7fff2ac58ef0, pspec=0x7fece0e52ba0, object=0x7fece0d7fba0) at /build/buildd/glib2.0-2.37.6/./gobject/gobject.c:1366
 g_object_new_internal (class=class@entry=0x7fece0e61e10, params=params@entry=0x7fff2ac58fd0, n_params=<optimized out>) at /build/buildd/glib2.0-2.37.6/./gobject/gobject.c:1797

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 alacarte (Ubuntu):
importance: Undecided → Medium
summary: While editing main menu, xfce4-panel crashed with SIGSEGV in
- g_utf8_validate()
+ fast_validate()
tags: removed: need-amd64-retrace
information type: Private → Public
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in alacarte (Ubuntu):
status: New → Confirmed
Changed in xfce4-panel (Ubuntu):
status: New → Confirmed
Changed in xfdesktop (Ubuntu):
status: New → Confirmed
Changed in xfce4-panel (Ubuntu):
status: Confirmed → New
affects: xfdesktop (Ubuntu) → xfdesktop4 (Ubuntu)
Changed in xfdesktop4 (Ubuntu):
status: Confirmed → New
Revision history for this message
Daniel Letzeisen (dtl131) wrote :

I could only reproduce the alacarte (mis)behavior.

I don't have a ~/.local/share/desktop-directories directory to test that command.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

It should be enough to create the directory, I think. That's what alacarte is doing - making the directory, making the file, then crashing when it tries to write a non-ascii character, so the files end up empty which xfce can't handle.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in xfce4-panel (Ubuntu):
status: New → Confirmed
Changed in xfdesktop4 (Ubuntu):
status: New → Confirmed
Changed in xfce4-panel (Ubuntu):
status: Confirmed → Invalid
Changed in xfdesktop4 (Ubuntu):
status: Confirmed → Invalid
Changed in garcon (Ubuntu):
status: New → Confirmed
Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Hello duplicate bug reporters. This bug has been fixed upstream and the fix is in trusty.

Revision history for this message
Thaddaeus Tintenfisch (thad-fisch-deactivatedaccount) wrote :

Fixed in Ubuntu 14.04 (Trusty Tahr).

Changed in garcon (Ubuntu):
status: Confirmed → Fix Released
Changed in alacarte (Fedora):
importance: Unknown → Undecided
status: Unknown → Won't Fix
Changed in alacarte (Ubuntu):
status: Confirmed → 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.