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 372477 - Item name gets truncated when re-naming
Item name gets truncated when re-naming
Status: RESOLVED FIXED
Product: alacarte
Classification: Applications
Component: general
0.10.x
Other All
: Normal normal
: ---
Assigned To: Alacarte Maintainer(s)
Alacarte Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2006-11-08 14:34 UTC by Alex Sutcliffe
Modified: 2007-01-11 21:35 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16



Description Alex Sutcliffe 2006-11-08 14:34:35 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):
  • File "/usr/lib/python2.4/site-packages/Alacarte/DialogHandler.py", line 454 in on_menu_contents_changed
    self.saveMenu(values)
  • File "/usr/lib/python2.4/site-packages/Alacarte/DialogHandler.py", line 464 in saveMenu
    self.editor.editMenu(self.menu, None, values[1], values[2], final)
  • File "/usr/lib/python2.4/site-packages/Alacarte/MenuEditor.py", line 265 in editMenu
    menu_xml = self.__getXmlMenu(self.__getPath(menu), dom, dom)
  • File "/usr/lib/python2.4/site-packages/Alacarte/MenuEditor.py", line 447 in __getPath
    path = menu.tree.root.get_menu_id()
AttributeError: 'NoneType' object has no attribute 'root'


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
Comment 1 Rob Bradford 2006-11-16 19:22:34 UTC
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.

Comment 2 Travis Watkins 2007-01-11 21:35:18 UTC
Fixed in the development version. The fix will be available in the next major release. Thank you for your bug report.