Nautilus crashes when reconnecting to network file server

Bug #1202159 reported by Michał Sawicz on 2013-07-17
This bug affects 164 people
Affects Status Importance Assigned to Milestone
Fix Released
nautilus (Fedora)
Won't Fix
nautilus (Ubuntu)
Robert Ancell
Robert Ancell

Bug Description

Reconnecting to servers using nautilus causes a crash.

[Test Case]
1. Open a nautilus window
2. In sidebar, click "Connect to Network"
3. Enter network address ""
4. Click connect in both dialogs
5. Press eject button beside entry that appears in sidebar
6. In sidebar, click "Connect to Network"
7. Enter network address ""
8. Click connect in both dialogs

Expected result:
In both steps 4 and 8 you are reconnected to and can browse files on that server

Observed result:
The first connect (step 4) works and nautilus crashes on the second attempt (step 8)

[Regression Potential]
The fix is adding a missing unref call in the code which is a simple memory leak bug and is unlikely to have negative consequences. Could expose any existing unref bug that may be hidden by this leak.

Michał Sawicz (saviq) wrote :

 _g_log_abort () at /build/buildd/glib2.0-2.37.3/./glib/gmessages.c:255
 g_assertion_message (domain=domain@entry=0x0, file=file@entry=0x503443 "nautilus-bookmark.c", line=line@entry=350, func=func@entry=0x503a50 <__PRETTY_FUNCTION__.48439> "nautilus_bookmark_connect_file", message=<optimized out>) at /build/buildd/glib2.0-2.37.3/./glib/gtestutils.c:2075
 g_assertion_message_expr (domain=domain@entry=0x0, file=file@entry=0x503443 "nautilus-bookmark.c", line=line@entry=350, func=func@entry=0x503a50 <__PRETTY_FUNCTION__.48439> "nautilus_bookmark_connect_file", expr=expr@entry=0x503758 "!nautilus_file_is_gone (bookmark->details->file)") at /build/buildd/glib2.0-2.37.3/./glib/gtestutils.c:2086
 nautilus_bookmark_connect_file (bookmark=bookmark@entry=0x7f7f08004860) at nautilus-bookmark.c:350
 nautilus_bookmark_constructed (obj=<optimized out>) at nautilus-bookmark.c:549

Changed in nautilus (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nautilus (Ubuntu):
status: New → Confirmed
tags: added: bugpattern-needed
Changed in nautilus (Ubuntu):
status: Confirmed → Triaged
importance: Medium → High
information type: Private → Public
Changed in nautilus:
importance: Unknown → Critical
status: Unknown → New
tags: added: trusty
Aurélien Leblond (blablack) wrote :

On my side, this issue happens when i eject a mounted share (smb or ftp).
I can reproduce it on two machines.

Donarsson (benjamin-schwarz) wrote :

For me, it happened when trying to re-mount a smb share after the Windows host was rebooted.

tags: added: ubuntu-desktop-trusty
Vincent Gerris (vgerris) wrote :

for me also when ejecting. if anyone needs more info please let me know how to acquire it.

Marcin Kordyaczny (kordyaczny) wrote :

server connection is broken. Can't connecting with ftp.

The error came up when my Samsung Galaxy GT-I9100 running CM 11 was unmounted from usb-connection using MTP-transfer mode.

Nilfred (nilfred) wrote :

Connect my camera Panasonic DMC-TZ35 and selecting PC mode: Can't be mounted.
Selecting Picbridge: It mounts, but navigate to DCIM/* and... Here I am.
So I do what used to do before: Remove the microSD card form camera and read from card reader.

Robert Ancell (robert-ancell) wrote :

The bug is when nautilus attempts to resolve bookmark information. At this point it gets an object that represents the file but the object is marked as being "gone". It seems like a race condition where instead of failing on an assertion we should wait for the file to not be "gone" before accessing it.

I haven't been able to find a reproducible test case yet, but I imagine based on the reports and the code it will involve making a bookmark to a directory on a removable/remote location and disconnecting that location.

Sebastien Bacher (seb128) wrote : has a different backtrace but could have the same underlining cause and it has steps to trigger it

Iain Lane (laney) wrote : is what I've been doing (with, but I didn't get anywhere in debugging really.

Robert Ancell (robert-ancell) wrote :

Thanks Iain! I can reproduce this now.

The problem seems to be because the bookmark is being kept in the history once it is closed. So when you "eject" the FTP bookmark nautilus deletes the bookmark visually but keeps a reference to it for the history. The bookmark keeps a reference to the NautilusFile for the FTP location and this is marked as "gone".

When try and connect to this location again (or press back in the history) it tries and create a new bookmark which then uses the cached NautilusFile which is marked gone. Thus the assertion fails.

The solution I am currently trying to find is to remove the bookmark from the history when it is ejected.

Changed in nautilus:
status: New → Confirmed
Changed in nautilus (Ubuntu):
status: Triaged → In Progress
Changed in nautilus (Ubuntu Trusty):
status: New → In Progress
importance: Undecided → High
Changed in nautilus (Ubuntu):
assignee: nobody → Robert Ancell (robert-ancell)
Changed in nautilus (Ubuntu Trusty):
assignee: nobody → Robert Ancell (robert-ancell)
description: updated
summary: - nautilus assert failure: ERROR:nautilus-
- bookmark.c:350:nautilus_bookmark_connect_file: assertion failed:
- (!nautilus_file_is_gone (bookmark->details->file))
+ Nautilus crashes when reconnecting to network file server
Changed in nautilus:
status: Confirmed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nautilus - 1:3.10.1-0ubuntu10

nautilus (1:3.10.1-0ubuntu10) utopic; urgency=medium

  * debian/patches/git_crash_network_reconnect.patch:
    - Fix crash reconnecting to network file servers (LP: #1202159)
 -- Robert Ancell <email address hidden> Fri, 02 May 2014 10:41:50 +1200

Changed in nautilus (Ubuntu):
status: In Progress → Fix Released

Hello Michał, or anyone else affected,

Accepted nautilus into trusty-proposed. The package will build now and be available at in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at . Thank you in advance!

Changed in nautilus (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
tags: added: verification-done
removed: verification-needed

The verification of the Stable Release Update for nautilus has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nautilus - 1:3.10.1-0ubuntu9.1

nautilus (1:3.10.1-0ubuntu9.1) trusty; urgency=medium

  * debian/patches/git_crash_network_reconnect.patch:
    - Fix crash reconnecting to network file servers (LP: #1202159)
 -- Robert Ancell <email address hidden> Fri, 02 May 2014 10:41:50 +1200

Changed in nautilus (Ubuntu Trusty):
status: Fix Committed → Fix Released
Download full text (4.6 KiB)

I'm using nautilus 1:3.10.1-0ubuntu9.5 on trusty and it looks like I still have the similar issue after umounting a smb share and connecting again with different credentials.

Here is my stacktrace:

#0 0x00007f99a94c8cc9 in __GI_raise (sig=sig@entry=0x6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007f99a94cc0d8 in __GI_abort () at abort.c:89
#2 0x00007f99aa004165 in g_assertion_message (domain=domain@entry=0x0, file=file@entry=0x50127f "nautilus-bookmark.c", line=line@entry=0x15e, func=func@entry=0x501890 <__FUNCTION__.49716> "nautilus_bookmark_connect_file", message=message@entry=0x1405a60 "assertion failed: (!nautilus_file_is_gone (bookmark->details->file))") at /build/buildd/glib2.0-2.40.2/./glib/gtestutils.c:2291
#3 0x00007f99aa0041fa in g_assertion_message_expr (domain=domain@entry=0x0, file=file@entry=0x50127f "nautilus-bookmark.c", line=line@entry=0x15e, func=func@entry=0x501890 <__FUNCTION__.49716> "nautilus_bookmark_connect_file", expr=expr@entry=0x501590 "!nautilus_file_is_gone (bookmark->details->file)") at /build/buildd/glib2.0-2.40.2/./glib/gtestutils.c:2306
#4 0x0000000000482649 in nautilus_bookmark_connect_file (bookmark=bookmark@entry=0x7f99740041e0) at nautilus-bookmark.c:350
#5 0x0000000000482694 in nautilus_bookmark_constructed (obj=<optimized out>) at nautilus-bookmark.c:550
#6 0x00007f99aa2b438a in g_object_new_internal (class=class@entry=0x11db0b0, params=params@entry=0x7fff28f75c80, n_params=0x3) at /build/buildd/glib2.0-2.40.2/./gobject/gobject.c:1763
#7 0x00007f99aa2b64c4 in g_object_new_valist (object_type=object_type@entry=0xeb1a40, first_property_name=first_property_name@entry=0x4fd6cb "location", var_args=var_args@entry=0x7fff28f75dd8) at /build/buildd/glib2.0-2.40.2/./gobject/gobject.c:1980
#8 0x00007f99aa2b68a4 in g_object_new (object_type=0xeb1a40, first_property_name=first_property_name@entry=0x4fd6cb "location") at /build/buildd/glib2.0-2.40.2/./gobject/gobject.c:1571
#9 0x0000000000482a04 in nautilus_bookmark_new (location=location@entry=0x11dca90, custom_name=custom_name@entry=0xf6b940 "") at nautilus-bookmark.c:757
#10 0x00000000004750ab in nautilus_window_slot_update_bookmark (file=0x1472320, slot=0x100e530) at nautilus-window-slot.c:1964
#11 nautilus_window_slot_update_for_new_location (slot=0x100e530) at nautilus-window-slot.c:2249
#12 location_has_really_changed (slot=0x100e530) at nautilus-window-slot.c:2505
#13 view_begin_loading_cb (view=<optimized out>, slot=0x100e530) at nautilus-window-slot.c:2426
#14 0x00007f99aa2af3b8 in g_closure_invoke (closure=0x1217900, return_value=0x0, n_param_values=0x1, param_values=0x7fff28f760e0, invocation_hint=0x7fff28f76080) at /build/buildd/glib2.0-2.40.2/./gobject/gclosure.c:768
#15 0x00007f99aa2c0d3d in signal_emit_unlocked_R (node=node@entry=0x1033cc0, detail=detail@entry=0x0, instance=instance@entry=0x1202550, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fff28f760e0) at /build/buildd/glib2.0-2.40.2/./gobject/gsignal.c:3551
#16 0x00007f99aa2c8a29 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fff28f76268) at /buil...


Changed in nautilus (Fedora):
importance: Unknown → Undecided
status: Unknown → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.