GNOME Bugzilla – Bug 664456
segfault on arrow keypress in empty GtkIconView
Last modified: 2011-11-23 22:52:38 UTC
In gtk/gtkiconview.c, gtk_icon_view_move_cursor_left_right and gtk_icon_view_move_cursor_up_down set item = NULL if the icon view has no items. They then call gtk_icon_view_set_cell_data (icon_view, item), which tries to read either item->index or item->iter, and therefore crashes with SIGSEGV. http://git.gnome.org/browse/gtk+/tree/gtk/gtkiconview.c?id=54d6ef115b364edfebaaa67cc584006adaf499dc#n3772 http://git.gnome.org/browse/gtk+/tree/gtk/gtkiconview.c?id=54d6ef115b364edfebaaa67cc584006adaf499dc#n3917 http://git.gnome.org/browse/gtk+/tree/gtk/gtkiconview.c?id=54d6ef115b364edfebaaa67cc584006adaf499dc#n4222 Reproduceable as follows: Start cheese 3.0.1-2. It is in photo mode by default. Click on the empty pane where photos would appear if you took any. Press the Right arrow key. The process dies with SIGSEGV. (This crash does not occur if you do have any photos in the pane.) Please see http://bugs.debian.org/638704 for the backtrace and exact versions. Although I expect it won't be necessary because the bug is evident from the source. This bug is different from https://bugzilla.gnome.org/page.cgi?id=trace.html&trace_id=205506 because that one has item != NULL.
The following fix has been pushed: b84d37a GtkIconView: Fix a segfault
Created attachment 202034 [details] [review] GtkIconView: Fix a segfault Keynav on an empty iconview was causing segfaults. This was reported in