GNOME Bugzilla – Bug 343488
nautilus sometimes crashes when opening new window
Last modified: 2007-09-05 17:58:45 UTC
That bug has been opened on https://launchpad.net/distros/ubuntu/+source/nautilus/+bug/47619 "Nautilus has crashed quite a few times since I started using Ubuntu starting with dapper flight 7, though lately it has done so much less often. I'm not able to reproduce this crash consistently, all I can say is it happens more or less often depending on how well behaved nautilus is felling when I log on, and only happens when I open a new nautilus window by whatever means (places menu, desktop, etc.), no specific partition/device. Below are attached two tracebacks, one with just the debug symbols for nautilus, the other after I installed the ones for other packages which I found mentioned in the first one. They were copy/pasted from the 'inform developers' option of the crash dialogue. Don't know how useful this could be, how common the bug is, or if it has been submited before (couldn't find it with the search function), I'm just submiting this bug to know if theres something can be done, and/or if I have to reinstall Ubuntu to fix it. The worst that can happen is this bug gets rejected :-) ... Backtrace was generated from '/usr/bin/nautilus' Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". [Thread debugging using libthread_db enabled] [New Thread -1226762560 (LWP 7105)] [New Thread -1228469328 (LWP 7113)] 0xffffe410 in __kernel_vsyscall ()
+ Trace 68554
Thread 1 (Thread -1226762560 (LWP 7105))
Just got the exact same stacktrace, with an exception of the function call in frame #15 in the one above, which was for me: read_file_read_callback (handle=0xc8, result=GNOME_VFS_ERROR_EOF, buffer=0x85dc736, bytes_requested=) at eel-vfs-extensions.c:110 Just as the original report, I can not reproduce this either. Opened a new Nautilus window, Ctrl+L, typed in "/data/" and on hitting return, Nautilus crashed instantly. Or at least, I hope I typed this -- was pretty quick, and I believe I used tab-completion rather than typing the entire string... Confirming as per duplicate.
Created attachment 71012 [details] [review] Check nautilus_file_get_uri() return value in get_link_files() nautilus_file_get_uri() may return NULL, so it's probably a good idea to check for it.
This appears to be the same as bug 350452, by the way.
*** Bug 352212 has been marked as a duplicate of this bug. ***
*** Bug 352558 has been marked as a duplicate of this bug. ***
copying christian's comment from bug 350452: Maybe nautilus_file_get_uri returns NULL. Possibly, file->details->directory->details->uri is NULL. It would be very helpful to get a list of affected GnomeVFS modules. On the other hand, nautilus_directory_new asserts that precisely this variable may not be NULL.
Thanks for linking these two bug reports Andre. Setting patch status of attachment 71012 [details] [review] to rejected. I disagree that "nautilus_file_get_uri() may return NULL" as pointed out in comment 2. It's a bit odd that all the crashes occur somewhere in the metadata code. Either we were not mindful enough to track simple refcount issues, or there are more complex (CORBA?) issues involved. We just pass strings, though, so I'm not really convinced that CORBA is the culrpit. I for myself remember having this crash once or twice only.
hi christian, it seems this is related to bug 350975 (at least one guy posted this stacktrace here at bug 350975 when trying to reproduce 350975, and bug 339605 also lists both traces), which is a major pita as it bites many users and should be hopefully fixed within the 2.16.x cycle. any investigation appreciated. :-)
Created attachment 74040 [details] [review] Proposed debugging patch The attached patch adds some g_asserts to nautilus_file_get_uri(). This may help us to determine what code section is wrong. It would be nice if those of you who can repeteadly reproduce the issue could apply the patch, recompile and try to trigger it again.
*** Bug 362396 has been marked as a duplicate of this bug. ***
*** Bug 362465 has been marked as a duplicate of this bug. ***
This is the same bug as 350975, with loads of dups, so it would be nice to fix it. Its likely that the failing part of nautilus_file_get_uri() is: g_return_val_if_fail (NAUTILUS_IS_FILE (file), NULL); Since none of the other parts should return NULL. So, this sounds like a memory management issue where we pass in an unref:ed file.
*** Bug 350975 has been marked as a duplicate of this bug. ***
*** Bug 350452 has been marked as a duplicate of this bug. ***
The return_val_if_fail case would have given some output on stdout. Has anyone seen that when reproducing this bug?
thanks for taking a look at this...
*** Bug 335114 has been marked as a duplicate of this bug. ***
*** Bug 339605 has been marked as a duplicate of this bug. ***
I read through all the dups (hundreds of them!) of this bug, and here are some thoughts: This happens in a variety of cases: Opening home folder (often from panel menu), browsing (or auto-opening) a usb drive, mounting a usb drive, browsing NFS or SMB mounts, browsing to a FAT mount, browsing to trash, and sometimes without the user even touching nautilus. Several of the reports also talk about having done file copies before the crash. I think the common thing about all these is that we're doing I/O to some slow device where we often have nothing cached from disk. The crash happens when we finish reading the metadata files (stored in homedir) for the location and send out changed events. Maybe the trigger is some specific ordering of the i/o operations. bug 358053 has an interesting comment about how the mounted usb desktop icon ends up in a different place when the crash happens. This is consistent with file metadata being read in later than usual. There are reports from both Ubuntu, Fedora and Mandrake, although the majority are Ubuntu. I don't know if this is due to more Ubuntu users, but it could possibly be related to Ubuntu using browser mode by default. One user claimed moving to spatial made the bug go away (but its hard to tell with unreproducible bugs like this). I've seen bugreports from both 2.14 and 2.16, but no earlier. The trigger for the bug is nautilus_file_get_uri() returning NULL. Looking at the code the most likely cause for this is the g_return_val_if_fail which should give some output on stderr. Unfortunately no bugrepors give any stderr output. I'd like some information to figure this out: * The stderr output after the crash. This is in ~/.xsession-errors normally, or on the terminal if started manually. * Has anyone reproduced this in spatial mode?
*** Bug 362624 has been marked as a duplicate of this bug. ***
From the Ubuntu bug: "http://librarian.launchpad.net/4861597/Unsaved%20Document%201 nautilus backtrace Ok, here's the output in the console after I run nautilus with that command, and then it crashes. I somehow managed to make nautilus crash three times in row by following a few steps, the output always looks the same except for the pid in the last line. That last line is what appears when nautilus crashed, and I will also attach the backtrace. ======= ======= ~$ gnome-session-remove nautilus && nautilus Removing 'nautilus' from the session (gnome-session-remove:11501): GLib-CRITICAL **: g_shell_parse_argv: assertion `command_line != NULL' failed Initializing nautilus-open-terminal extension totem-video-thumbnailer couln't open file 'file:///home/rpedro/Documents/downloads/aMule/preferences.dat' Reason: There is no plugin to handle this movie.. totem-video-thumbnailer couln't open file 'file:///home/rpedro/Documents/downloads/aMule/preferencesKad.dat' Reason: There is no plugin to handle this movie.. ** (nautilus:11502): CRITICAL **: nautilus_file_get_uri: assertion `NAUTILUS_IS_FILE (file)' failed"
Ah, that confirms my suspicion that the g_return_val_if_fail fails, thanks!
*** Bug 362781 has been marked as a duplicate of this bug. ***
I've asked for informations on the device opened and a backtrace for the assertion on the Ubuntu page, reply from the submitter: "http://librarian.launchpad.net/4861935/Unsaved%20Document%201 nautilus gdb backtrace ...
+ Trace 76755
Thread 1 (Thread -1226045760 (LWP 17480))
I will attach the backtrace from gdb."
Created attachment 74858 [details] [review] Possible fix This patch might fix this issue, if you can reproduce this bug, please test it.
If anybody of the reporters do not use pre-compiled packages (provided by their distributor), but compile from the source code, please help us by applying the patch at comment 25 in order to test if this fixes this crash. Feedback highly welcome and appreciated, thanks everybody in advance!
I've applied the patch and it seems to be working well for now. :) I'll reply again if it isn't working later.
From the Ubuntu bug: "Ok, I installed the patched debs, and I no longer get the crash(!) with the procedure I had. I also left various nautilus windows open overnight and been fooling around for a few minutes, browising folders, opening a few new nautilus windows, and all is running OK :-) As an added bonus, this patch seems to have fixed the issue I mentioned to you before, where nautilus would, over time, get increasingly slow browsing between folders, until finally it would crash. So congratulations! and thank you very much for the fix! :-)" Marking as fixed since the patch has been commited to the CVS already
*** Bug 363389 has been marked as a duplicate of this bug. ***
*** Bug 363395 has been marked as a duplicate of this bug. ***
*** Bug 363396 has been marked as a duplicate of this bug. ***
*** Bug 363425 has been marked as a duplicate of this bug. ***
*** Bug 363470 has been marked as a duplicate of this bug. ***
*** Bug 363487 has been marked as a duplicate of this bug. ***
*** Bug 363508 has been marked as a duplicate of this bug. ***
*** Bug 363535 has been marked as a duplicate of this bug. ***
*** Bug 363543 has been marked as a duplicate of this bug. ***
*** Bug 363545 has been marked as a duplicate of this bug. ***
*** Bug 363605 has been marked as a duplicate of this bug. ***
*** Bug 363583 has been marked as a duplicate of this bug. ***
*** Bug 363553 has been marked as a duplicate of this bug. ***
*** Bug 363905 has been marked as a duplicate of this bug. ***
*** Bug 363928 has been marked as a duplicate of this bug. ***
*** Bug 363931 has been marked as a duplicate of this bug. ***
*** Bug 364933 has been marked as a duplicate of this bug. ***
*** Bug 365020 has been marked as a duplicate of this bug. ***
*** Bug 365536 has been marked as a duplicate of this bug. ***
*** Bug 366166 has been marked as a duplicate of this bug. ***
*** Bug 366262 has been marked as a duplicate of this bug. ***
*** Bug 367235 has been marked as a duplicate of this bug. ***
*** Bug 367285 has been marked as a duplicate of this bug. ***
*** Bug 368410 has been marked as a duplicate of this bug. ***
*** Bug 368774 has been marked as a duplicate of this bug. ***
*** Bug 368805 has been marked as a duplicate of this bug. ***
*** Bug 369273 has been marked as a duplicate of this bug. ***
*** Bug 369793 has been marked as a duplicate of this bug. ***
*** Bug 370953 has been marked as a duplicate of this bug. ***
*** Bug 371445 has been marked as a duplicate of this bug. ***
*** Bug 380434 has been marked as a duplicate of this bug. ***
*** Bug 391846 has been marked as a duplicate of this bug. ***
*** Bug 397972 has been marked as a duplicate of this bug. ***
*** Bug 401266 has been marked as a duplicate of this bug. ***
*** Bug 414935 has been marked as a duplicate of this bug. ***
*** Bug 440214 has been marked as a duplicate of this bug. ***
*** Bug 441668 has been marked as a duplicate of this bug. ***
*** Bug 442893 has been marked as a duplicate of this bug. ***
*** Bug 473889 has been marked as a duplicate of this bug. ***