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 699183 - Error on unmount - This location could not be displayed
Error on unmount - This location could not be displayed
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 701994 703660 703722 704892 709508 719866 723613 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-04-28 21:08 UTC by Michael Monreal
Modified: 2014-02-04 16:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Revert "places-sidebar: use gtk_tree_view_set_activate_on_single_click" (2.99 KB, patch)
2013-07-11 16:51 UTC, Joshua Lock
none Details | Review
places-sidebar: use gtk_tree_view_set_activate_on_single_click (1.57 KB, patch)
2013-07-11 16:52 UTC, Joshua Lock
none Details | Review
Don't call open_selected_bookmark () when the user has clicked eject (937 bytes, patch)
2013-07-11 20:48 UTC, Joshua Lock
reviewed Details | Review
Updated patch (1.21 KB, patch)
2013-07-11 21:22 UTC, Joshua Lock
committed Details | Review
umount after patch (208.05 KB, image/png)
2013-07-31 22:12 UTC, Andrew Brouwers
  Details

Description Michael Monreal 2013-04-28 21:08:17 UTC
After unmounting USB storage or ISO files the following error pops up:

---
This location could not be displayed.
“usb3” could not be found. Perhaps it has recently been deleted.
---

Reproducible today using nautilus-3.8.1-1.fc19.x86_64
Comment 1 António Fernandes 2013-07-05 15:19:09 UTC
*** Bug 703660 has been marked as a duplicate of this bug. ***
Comment 2 António Fernandes 2013-07-06 22:34:06 UTC
*** Bug 703722 has been marked as a duplicate of this bug. ***
Comment 3 António Fernandes 2013-07-10 23:08:12 UTC
*** Bug 701994 has been marked as a duplicate of this bug. ***
Comment 4 Joshua Lock 2013-07-10 23:17:06 UTC
As noted in bug 701994 this issue is present when using the eject button in the nautilus sidebar but not when using the shell to eject removable media.
Comment 5 Joshua Lock 2013-07-11 09:11:43 UTC
Another salient point to reproduce is that it seems you need to have navigated to a subdirectory of the USB storage:

1) Insert USB stick
2) Navigate into the top-level with nautilus, either a) "Open with Files" or b) navigate into the USB stick within nautilus
3) Be sure to navigate to a folder deeper than the root of the drive
4) Hit eject either on the nautilus sidebar
Comment 6 Andrew Brouwers 2013-07-11 11:02:28 UTC
(In reply to comment #5)
> Another salient point to reproduce is that it seems you need to have navigated
> to a subdirectory of the USB storage:
> 

I'm not sure that is true (or, maybe I misunderstood) - I sometimes see this if I first click back to my home directory in nautilus, and then click the eject button from the sidebar.
Comment 7 Joshua Lock 2013-07-11 11:12:37 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Another salient point to reproduce is that it seems you need to have navigated
> > to a subdirectory of the USB storage:
> > 
> 
> I'm not sure that is true (or, maybe I misunderstood) - I sometimes see this if
> I first click back to my home directory in nautilus, and then click the eject
> button from the sidebar.

Quite right, I see that too. Perhaps then the issue is that you will see such errors if you click eject whilst the view is anywhere other than the root of the mounted storage being ejected?
Comment 8 Joshua Lock 2013-07-11 16:17:00 UTC
I've finally tracked down the commit which introduced this:

277a6a45 - places-sidebar: use gtk_tree_view_set_activate_on_single_click

in this commit the GtkTreeView::row-activated signal was connected to bookmarks_row_activated_cb () which in turn calls open_selected_bookmark () for the activated row.

The problem is that a click on the eject icon for a volume triggers the row-activated signal and nautilus tries to open the volume which is in the process of being ejected.

A simple fix is to revert 277a6a45 apart from the part which changes eel_gtk_tree_view_set_activate_on_single_click () to gtk_tree_view_set_activate_on_single_click ()
Comment 9 Joshua Lock 2013-07-11 16:51:37 UTC
Created attachment 248944 [details] [review]
Revert "places-sidebar: use gtk_tree_view_set_activate_on_single_click"
Comment 10 Joshua Lock 2013-07-11 16:52:09 UTC
Created attachment 248945 [details] [review]
places-sidebar: use gtk_tree_view_set_activate_on_single_click
Comment 11 Joshua Lock 2013-07-11 16:54:07 UTC
The two patches attached revert to the old behaviour of making the open_selected_bookmark () call on button-release-event. As this code, and therefore this bug, now exist in Gtk+ I shall file an issue there and see if we there's a better way to resolve this.
Comment 12 Cosimo Cecchi 2013-07-11 19:12:23 UTC
Thanks for the investigation, but I don't really like this solution, as it also requires reverting back the eel code that was removed.

Can you check for clicked_eject_button() in the callback for row-activated and avoid calling into open_selected_bookmark() if that returns TRUE instead?
Comment 13 Joshua Lock 2013-07-11 20:44:44 UTC
(In reply to comment #12)
> Thanks for the investigation, but I don't really like this solution, as it also
> requires reverting back the eel code that was removed.

True, if you want to ensure the tree can always be built (which one assumes you would) that would be required.
 
> Can you check for clicked_eject_button() in the callback for row-activated and
> avoid calling into open_selected_bookmark() if that returns TRUE instead?

That's a much more pleasant solution! I had missed that API, thanks for the suggestion. Patch incoming.
Comment 14 Joshua Lock 2013-07-11 20:48:07 UTC
Created attachment 248967 [details] [review]
Don't call open_selected_bookmark () when the user has clicked eject
Comment 15 Cosimo Cecchi 2013-07-11 21:03:24 UTC
Review of attachment 248967 [details] [review]:

Thanks, this is much better! Other than the comments below, looks good to be pushed to the gnome-3-8 branch.

::: src/nautilus-places-sidebar.c
@@ +2931,3 @@
 	}
 
+	if (!clicked_eject_button (sidebar, &path))

Two little details:
* Nautilus' coding style requires curly braces around every if block, even if it's only one line
* You're reusing the pointer to the GtkTreePath passed in to the callback. I'd rather you had another GtkTreePath * to pass as an out arg to clicked_eject_button(). In case clicked_eject_button() returns TRUE, you should also free the returned GtkTreePath using gtk_tree_path_free().
Comment 16 Joshua Lock 2013-07-11 21:22:25 UTC
Created attachment 248972 [details] [review]
Updated patch

Thanks Cosimo. Here's a cleaned up version as requested. I don't have push privileges so would appreciate you pushing to gnome-3-8 if you approve of the patch.

I'll file a bug with a patch for Gtk+ master tomorrow.
Comment 17 Cosimo Cecchi 2013-07-11 21:41:46 UTC
Thanks a lot Joshua - I pushed the patch to gnome-3-8 now.
Closing this as FIXED.
Comment 18 António Fernandes 2013-07-25 23:17:26 UTC
*** Bug 704892 has been marked as a duplicate of this bug. ***
Comment 19 Andrew Brouwers 2013-07-31 22:12:14 UTC
Created attachment 250563 [details]
umount after patch
Comment 20 Andrew Brouwers 2013-07-31 22:15:32 UTC
I rebuilt nautilus using the actual git commit to the gnome-3.8 branch ( https://git.gnome.org/browse/nautilus/patch/?id=d5c09af0d7052b778e295ece5b4bdda71b779383 ) , and still notice the error upon unmount.  Attached is a screenshot of a recent eject for my MP3 device.  Also, the nautilus process has definitely been restarted, as I rebooted this morning for the 3.10 kernel update :-)

Does one also need subsequent commits, since 3.8.2 ?
Comment 21 Adam Williamson 2013-09-17 22:29:29 UTC
I'm still seeing this with nautilus 3.9.91.
Comment 22 António Fernandes 2013-10-06 15:20:44 UTC
*** Bug 709508 has been marked as a duplicate of this bug. ***
Comment 23 António Fernandes 2013-12-04 21:08:50 UTC
*** Bug 719866 has been marked as a duplicate of this bug. ***
Comment 24 António Fernandes 2014-02-04 16:35:26 UTC
*** Bug 723613 has been marked as a duplicate of this bug. ***