GNOME Bugzilla – Bug 372477
Item name gets truncated when re-naming
Last modified: 2007-01-11 21:35:18 UTC
Please describe the problem: Changing the name of an item results in a randomly truncated name. For example, changing the top level item 'Games' to 'Entertainment' might result in 'Enter' The following output is produced after a number of characters are entered in the box. Only the editing done before this output is saved. ** (alacarte:12788): CRITICAL **: gmenu_tree_ref: assertion `tree != NULL' failed Traceback (most recent call last):
+ Trace 84358
self.saveMenu(values)
self.editor.editMenu(self.menu, None, values[1], values[2], final)
menu_xml = self.__getXmlMenu(self.__getPath(menu), dom, dom)
path = menu.tree.root.get_menu_id()
Steps to reproduce: 1. Right click on an item 2. Select 'Properties' 3. Edit 'Name' field and hit 'close' Actual results: Item's new name will be incomplete Expected results: That the name would reflect what you set it to in properties Does this happen every time? Not every time. It is more likely to occur when doing lots of editing. For example, changing 'Games' to Game' (one keystroke) will likely work but changing 'Games' to 'Entertainment' almost certainly won't Other information: Originally raised as a Ubuntu bug at https://launchpad.net/distros/ubuntu/+source/alacarte/+bug/70798
Okay. I've been looking at this and trying to figure it out. The easiest way to reproduce it is open the properties window, type something quickly (e.g. rename Accessories to Accessories123) and then something again after that after waiting. You then see this behaviour. I think a clue about what is happening might be in the assertion: ** (alacarte:26850): CRITICAL **: gmenu_tree_ref: assertion `tree != NULL' failed If you follow the code path from pygmenu_tree_directory_get_tree it goes though to gmenu_tree_directory_get_tree whereupon one of the last things that function does is gmenu_tree_ref. Because it returns NULL this results in None being returned. Uhm. Interesting this behaviour also only happens if you attempt to edit a top-level menu entry. (e.g. Accessories, etc) rather than something in the next level, e.g. Calculator.
Fixed in the development version. The fix will be available in the next major release. Thank you for your bug report.