GNOME Bugzilla – Bug 652454
alacarte crashed with TypeError in on_menu_tree_cursor_changed(): iter should be a GtkTreeIter
Last modified: 2011-08-23 19:17:10 UTC
this report has been filed here: https://bugs.launchpad.net/ubuntu/+source/alacarte/+bug/709365 "Just launched the application from the console and got this error. I haven't found a pattern to reproduce it." Traceback: Traceback (most recent call last):
+ Trace 227460
menu_path = menus.get_path(iter) TypeError: iter should be a GtkTreeIter
Created attachment 193363 [details] [review] Use gtk.SELECTION_BROWSE mode for menu_tree This bug is caused by the fact that treeview.get_selection().get_selected() can return a None iter when the selection has no rows (e.g. if the user has deselected a row by Ctrl-clicking on it). The solution is to use gtk.SELECTION_BROWSE selection mode; it will ensure that one row is always selected and valid iters are returned from the selection's get_selected().
The following fix has been pushed: 1646c19 Fix crash in on_menu_tree_cursor_changed()
Created attachment 194525 [details] [review] Fix crash in on_menu_tree_cursor_changed() This bug is caused by the fact that treeview.get_selection().get_selected() can return a None iter when the selection has no rows (e.g. if the user has deselected a row by Ctrl-clicking on it). The solution is to use gtk.SELECTION_BROWSE selection mode; it will ensure that one row is always selected and valid iters are returned from the selection's get_selected().