After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 592718 - Breaks users menu when disk space is full
Breaks users menu when disk space is full
Status: RESOLVED OBSOLETE
Product: alacarte
Classification: Applications
Component: general
0.12.x
Other Linux
: Normal critical
: ---
Assigned To: Alacarte Maintainer(s)
Alacarte Maintainer(s)
: 590491 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-08-22 16:27 UTC by Ryan Braley
Modified: 2021-05-25 17:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ryan Braley 2009-08-22 16:27:20 UTC
I encountered the problem described here
http://ubuntuforums.org/showthread.php?t=639457

If there is no free space in the user's disk then opening alacarte overwrites the 
/home/affecteduser/.config/menus/applications.menu
file with a blank file.

I perused the source code for alacarte and found that file operations blindly open and write to files without error checking for IOErrors.


The desired behavior should be that if anytime during the alacarte's operation the free space is depleted, the user's menu remains in a usable state. This could be achieved by writing the menu changes to a temporary file and committing the changes by replacing the applications.menu file if no errors are encountered. 

This bug is enough to render all but the most savvy users' distribution inoperable. This program is a good use case for a unit testing suite. 


I am running ubuntu 9.04
Thank you and if you would like my help just email me.
Comment 1 André Klapper 2009-08-25 17:21:01 UTC
0.9 is a very ancient version. Does this still happen in a current version?
Comment 2 Ryan Braley 2009-08-28 14:38:00 UTC
Yes this still happens in the latest version that I could find, 0.11.10. I tested it as follows:

python alacarte
/home/rbraley/bin/alacarte-0.11.10/Alacarte/MainWindow.py:52: GtkWarning: Error parsing gtk-icon-sizes string:
	'panel-menu=24,24
panel=20,20
gtk-button=18,18
gtk-large-toolbar=24,24'
  self.tree = gtk.glade.XML(os.path.join(self.file_path, 'alacarte.glade'))
#############################################
#tested to see if latest version works... it does.
#now repeat the bug by wasting space with
rbraley@rbraley-laptop:~$ cat /dev/zero >> SPACEWASTER 
cat: write error: No space left on device

#and try to run it again:


rbraley@rbraley-laptop:~/bin/alacarte-0.11.10$ python alacarte
Traceback (most recent call last):
  • File "alacarte", line 36 in <module>
    main()
  • File "alacarte", line 32 in main
    app = MainWindow(datadir, version, sys.argv)
  • File "/home/rbraley/bin/alacarte-0.11.10/Alacarte/MainWindow.py", line 50 in __init__
    self.editor = MenuEditor()
  • File "/home/rbraley/bin/alacarte-0.11.10/Alacarte/MenuEditor.py", line 36 in __init__
    self.__loadMenus()
  • File "/home/rbraley/bin/alacarte-0.11.10/Alacarte/MenuEditor.py", line 59 in __loadMenus
    self.save(True)
  • File "/home/rbraley/bin/alacarte-0.11.10/Alacarte/MenuEditor.py", line 65 in save
    fd.close()
IOError: [Errno 28] No space left on device

#########################################
#Now even if I rm SPACEWASTER the damage is done and the gnome applications #menu is destroyed:
rbraley@rbraley-laptop:~/.config/menus$ file applications.menu 
applications.menu: empty

#and trying to run it again yields the same error as the post in the ubuntu #forums:

rbraley@rbraley-laptop:~/bin/alacarte-0.11.10$ python alacarte
Traceback (most recent call last):
  File "alacarte", line 36, in <module>
    main()
  File "alacarte", line 32, in main
    app = MainWindow(datadir, version, sys.argv)
  File "/home/rbraley/bin/alacarte-0.11.10/Alacarte/MainWindow.py", line 50, in __init__
    self.editor = MenuEditor()
  File "/home/rbraley/bin/alacarte-0.11.10/Alacarte/MenuEditor.py", line 36, in __init__
    self.__loadMenus()
  File "/home/rbraley/bin/alacarte-0.11.10/Alacarte/MenuEditor.py", line 46, in __loadMenus
    self.applications.dom = xml.dom.minidom.parse(self.applications.path)
  File "/usr/lib/python2.6/xml/dom/minidom.py", line 1918, in parse
    return expatbuilder.parse(file)
  File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 924, in parse
    result = builder.parseFile(fp)
  File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 211, in parseFile
    parser.Parse("", True)
xml.parsers.expat.ExpatError: no element found: line 1, column 0
Comment 3 Akhil Laddha 2009-12-04 04:30:16 UTC
*** Bug 590491 has been marked as a duplicate of this bug. ***
Comment 4 Pacho Ramos 2010-10-29 17:40:48 UTC
0.13.2 is still affected by this as reported downstream at:
http://bugs.gentoo.org/show_bug.cgi?id=343273

To reproduce, reporter simple needs to drag menu item from one menu to another, alacarte crashes then and breaks menus
Comment 5 Fabio 2011-06-19 12:06:37 UTC
Alive and screaming on alacarte0.13.2-2ubuntu2, shipped in today-s build of Edubuntu.

https://bugs.launchpad.net/ubuntu/+source/alacarte/+bug/799370
Comment 6 Jasper St. Pierre (not reading bugmail) 2012-06-01 05:10:23 UTC
I don't want to test by filling up my disk space. Is this still a problem in alacarte master?
Comment 7 André Klapper 2021-05-25 17:44:53 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new enhancement request ticket at
  https://gitlab.gnome.org/GNOME/alacarte/-/issues/

Thank you for your understanding and your help.