alacarte crashes on startup, when all menu entries are not present

Bug #613358 reported by Patryk "LeadMan" Benderz
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Alacarte Menu Editor
New
Critical
alacarte (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Binary package hint: alacarte

1)
patben@esp-patben-lin:~$ lsb_release -rd
Description: Ubuntu 10.04.1 LTS
Release: 10.04

2)
patben@esp-patben-lin:~$ apt-cache policy alacarte
alacarte:
  Zainstalowana: 0.13.1-0ubuntu1
  Kandydująca: 0.13.1-0ubuntu1
  Tabela wersji:
 *** 0.13.1-0ubuntu1 0
        500 http://pl.archive.ubuntu.com/ubuntu/ lucid/main Packages
        100 /var/lib/dpkg/status

3) alacarte is supposed to start

4) alacarte crashes:
patben@esp-patben-lin:~$ alacarte
Traceback (most recent call last):
  File "/usr/bin/alacarte", line 36, in <module>
    main()
  File "/usr/bin/alacarte", line 33, in main
    app.run()
  File "/usr/lib/pymodules/python2.6/Alacarte/MainWindow.py", line 72, in run
    self.loadMenus()
  File "/usr/lib/pymodules/python2.6/Alacarte/MainWindow.py", line 213, in loadMenus
    self.loadMenu(iters, menu)
  File "/usr/lib/pymodules/python2.6/Alacarte/MainWindow.py", line 228, in loadMenu
    iters[depth] = self.menu_store.append(None, (icon, cgi.escape(parent.get_name()), parent))
AttributeError: 'NoneType' object has no attribute 'get_name'

5) Additional Info:
This has occured after:
a) I have installed Squirrel SQL client, with option to add squirrel shortcut to "" menu section (name contains of empty string)
b) new main menu section "" has appeared, and inside there was a shortcut to squirrel
c) I have moved this shortcut to "Programming(?)" section, it was ok
d) I tried to delete "" menu section from main menu.
e) all entries from main menu disappeared (this is unlikely that I have selected all menu entries and deleted them)
e) alacarte stopped to respond, so I have closed it.
f) tried to start alacarte, and it has failed to start with the errors mentioned in point 4)

If you need strace/ltrace/gdb/anything please let me know as soon as possible, as it is very hard to work without main menu, and I will regenerate new profile/home for my login.
If you need to know if this is repeatable, I can try to trigger this on another login.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: alacarte 0.13.1-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-24.38-generic 2.6.32.15+drm33.5
Uname: Linux 2.6.32-24-generic x86_64
NonfreeKernelModules: fglrx
Architecture: amd64
Date: Wed Aug 4 10:22:49 2010
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
PackageArchitecture: all
ProcEnviron:
 LANG=pl_PL.utf8
 SHELL=/bin/bash
SourcePackage: alacarte

Revision history for this message
Patryk "LeadMan" Benderz (leadman) wrote :
Revision history for this message
Patryk "LeadMan" Benderz (leadman) wrote :

My ~/.config/menus path contained following after this failure:
patben@esp-patben-lin:~/.config/menus$ ls -lR
.:
razem 12
-rw-r--r-- 1 patben patben 366 2010-08-04 10:27 applications.menu
drwxr-xr-x 2 patben patben 4096 2010-08-04 09:38 applications-merged
-rw-r--r-- 1 patben patben 404 2010-08-04 10:27 settings.menu

./applications-merged:
razem 0
patben@esp-patben-lin:~/.config/menus$

And my applications.menu file contained only the following:
patben@esp-patben-lin:~/Backup/.config/menus$ cat applications.menu
<!DOCTYPE Menu
  PUBLIC '-//freedesktop//DTD Menu 1.0//EN'
  'http://standards.freedesktop.org/menu-spec/menu-1.0.dtd'>
<Menu>
 <Name>Applications</Name>
 <MergeFile type="parent">/etc/xdg/menus/applications.menu</MergeFile>
 <Menu>
  <Name>Development</Name>
  <Include>
   <Filename>SQuirreL SQL Client.desktop</Filename>
  </Include>
 </Menu>
 <Deleted/>
</Menu>

After additional search I have copied /etc/xdg/menus/applications.menu to ~/.config/menus. After that, all menu entries has appeared back... together with "" (empty name) entry.
Alacarte has started properly, I have moved squirrel SQL shortcut again to "Programming" entry.
Now I payed more attention, when "(empty)" was selected "Delete" button was greyed out.
I have clicked "squirrel" shortcut in menu entry and deleted it - went fine.
I have clicked "(empty)" - "delete" button was still grey.
I tried to move "(empty)" to subsection of "Accessories" with hope i will be able to delete it.
Then all menu entries has disappeared and after I closed it, terminal contained:
patben@esp-patben-lin:/etc/xdg/menus$ alacarte

** (alacarte:3726): WARNING **: Error loading menu layout from "/home/patben/.config/menus/applications.menu": Line 6 character 9: Element <Old> is required to contain text and was empty

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/Alacarte/MainWindow.py", line 112, in loadUpdates
    self.loadMenus()
  File "/usr/lib/pymodules/python2.6/Alacarte/MainWindow.py", line 213, in loadMenus
    self.loadMenu(iters, menu)
  File "/usr/lib/pymodules/python2.6/Alacarte/MainWindow.py", line 228, in loadMenu
    iters[depth] = self.menu_store.append(None, (icon, cgi.escape(parent.get_name()), parent))
AttributeError: 'NoneType' object has no attribute 'get_name'

Conclusion: previously I have accidentally moved "(empty)" menu entry to another section, which has triggered disappearance of all menu entries. Should this be reported as separate bug? I remind you, that this bug concerns crash of alacarte, when there are no menu entries.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thank you for your bug report. This bug has been reported to the developers of the software. You can track it and make comments at:
 https://bugzilla.gnome.org/show_bug.cgi?id=626204

Changed in alacarte (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Changed in alacarte:
status: Unknown → New
Changed in alacarte:
importance: Unknown → Critical
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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