GNOME Bugzilla – Bug 679040
crash in boxes_collection_view_get_path_for_item
Last modified: 2016-03-31 13:54:25 UTC
- start boxes - create a new f17 box with unattended install - click on the box to see it's content - go back to the collection view - delete the box while it's running - create another f17 box with unattended install -> crash when clicking on the "create" button
+ Trace 230451
See bug #678894 where this bug was first mentioned, Zeeshan has another reproducer (which I did not test): Zeeshan Ali (Khattak) [reporter] [gnome-boxes developer] 2012-06-28 02:29:52 UTC Aha, this crash seem to have nothing to do with my recent changes. I can reproduce it against v3.5.3 tag. Steps I take to reproduce this: 1. Create a machine for live media (I used F17) through wizard. 2. Shut it down from inside the guest. Seems more like a regression from Alex's zoom in/out patches.
Created attachment 217529 [details] [review] Break out some code into a helper function This avoids some code duplication.
Created attachment 217530 [details] [review] Don't crash when zooming out of a removed box Instead we zoom to 0,0.
Review of attachment 217529 [details] [review]: Looks good otherwise. ::: src/collection-view.vala @@ -198,3 +205,3 @@ } - private Gtk.TreePath get_path_for_item (CollectionItem item) { + private Gtk.TreePath? get_path_for_item (CollectionItem item) { This change seems unrelated to this patch? @@ -201,2 +208,2 @@ var iter = item.get_data<Gtk.TreeIter?> ("iter"); - return model.get_path (iter); + if (iter != null) I'd rather do it as this so its clear which one is exception here: if (iter == null) return null; return model.get_path (iter);
Review of attachment 217530 [details] [review]: ACK!
Review of attachment 217529 [details] [review]: ::: src/collection-view.vala @@ -198,3 +205,3 @@ } - private Gtk.TreePath get_path_for_item (CollectionItem item) { + private Gtk.TreePath? get_path_for_item (CollectionItem item) { Agh, yeah, it should be in the other patch.
Attachment 217529 [details] pushed as 04f54c0 - Break out some code into a helper function Attachment 217530 [details] pushed as 6d61294 - Don't crash when zooming out of a removed box