GNOME Bugzilla – Bug 592718
Breaks users menu when disk space is full
Last modified: 2021-05-25 17:44:53 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.
0.9 is a very ancient version. Does this still happen in a current version?
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):
+ Trace 217195
main()
app = MainWindow(datadir, version, sys.argv)
self.editor = MenuEditor()
self.__loadMenus()
self.save(True)
fd.close()
######################################### #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
*** Bug 590491 has been marked as a duplicate of this bug. ***
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
Alive and screaming on alacarte0.13.2-2ubuntu2, shipped in today-s build of Edubuntu. https://bugs.launchpad.net/ubuntu/+source/alacarte/+bug/799370
I don't want to test by filling up my disk space. Is this still a problem in alacarte master?
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.