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 343488 - nautilus sometimes crashes when opening new window
nautilus sometimes crashes when opening new window
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Navigation
2.16.x
Other Linux
: Immediate blocker
: 2.16.x
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 335114 339605 350452 350975 352212 352558 362396 362465 362624 362781 363389 363395 363396 363425 363470 363487 363508 363535 363543 363545 363553 363583 363605 363905 363928 363931 364933 365020 365536 366166 366262 367235 367285 368410 368774 368805 369273 369793 370953 371445 380434 391846 397972 401266 414935 440214 441668 442893 473889 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-05-31 09:34 UTC by Sebastien Bacher
Modified: 2007-09-05 17:58 UTC
See Also:
GNOME target: 2.16.x
GNOME version: 2.15/2.16


Attachments
Check nautilus_file_get_uri() return value in get_link_files() (822 bytes, patch)
2006-08-16 10:51 UTC, Andreas Kling
rejected Details | Review
Proposed debugging patch (1.19 KB, patch)
2006-10-05 09:55 UTC, Christian Neumair
none Details | Review
Possible fix (710 bytes, patch)
2006-10-17 09:05 UTC, Alexander Larsson
none Details | Review

Description Sebastien Bacher 2006-05-31 09:34:34 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 ()

Thread 1 (Thread -1226762560 (LWP 7105))

  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/tls/i686/cmov/libpthread.so.0
  • #2 libgnomeui_module_info_get
    from /usr/lib/libgnomeui-2.so.0
  • #3 <signal handler called>
  • #4 IA__g_str_hash
    at gstring.c line 95
  • #5 IA__g_hash_table_lookup
    at ghash.c line 242
  • #6 get_link_files
    at nautilus-file.c line 1355
  • #7 nautilus_file_emit_changed
    at nautilus-file.c line 5396
  • #8 nautilus_directory_emit_change_signals
    at nautilus-directory.c line 762
  • #9 emit_change_signals_for_all_files
    at nautilus-directory.c line 265
  • #10 corba_metafile_ready
    at nautilus-directory-metafile-monitor.c line 110
  • #11 ORBit_c_stub_invoke
    from /usr/lib/libORBit-2.so.0
  • #12 Nautilus_MetafileMonitor_metafile_ready
    at nautilus-shell-interface-stubs.c line 17
  • #13 metafile_read_mark_done
    at nautilus-metafile.c line 822
  • #14 metafile_read_done
    at nautilus-metafile.c line 1836
  • #15 eel_read_entire_file
    from /usr/lib/libeel-2.so.2
  • #16 dispatch_job_callback
    at gnome-vfs-job.c line 228
  • #17 g_idle_dispatch
    at gmain.c line 3796
  • #18 IA__g_main_context_dispatch
    at gmain.c line 1916
  • #19 g_main_context_iterate
    at gmain.c line 2547
  • #20 IA__g_main_loop_run
    at gmain.c line 2751
  • #21 IA__gtk_main
    at gtkmain.c line 1026
  • #22 main
    at nautilus-main.c line 406
  • #23 __libc_start_main
    from /lib/tls/i686/cmov/libc.so.6
  • #24 _start
    at ../sysdeps/i386/elf/start.S line 119
  • #0 __kernel_vsyscall

Comment 1 Karsten Bräckelmann 2006-07-04 19:58:06 UTC
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.
Comment 2 Andreas Kling 2006-08-16 10:51:06 UTC
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.
Comment 3 Andreas Kling 2006-08-16 16:20:59 UTC
This appears to be the same as bug 350452, by the way.
Comment 4 Jonathon Jongsma 2006-08-21 14:43:28 UTC
*** Bug 352212 has been marked as a duplicate of this bug. ***
Comment 5 Jonathon Jongsma 2006-08-24 02:16:01 UTC
*** Bug 352558 has been marked as a duplicate of this bug. ***
Comment 6 André Klapper 2006-10-05 09:22:30 UTC
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.
Comment 7 Christian Neumair 2006-10-05 09:40:48 UTC
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.
Comment 8 André Klapper 2006-10-05 09:46:20 UTC
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. :-)
Comment 9 Christian Neumair 2006-10-05 09:55:34 UTC
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.
Comment 10 Fabio Bonelli 2006-10-15 17:30:08 UTC
*** Bug 362396 has been marked as a duplicate of this bug. ***
Comment 11 Karsten Bräckelmann 2006-10-15 21:40:38 UTC
*** Bug 362465 has been marked as a duplicate of this bug. ***
Comment 12 Alexander Larsson 2006-10-16 12:31:29 UTC
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.
Comment 13 Alexander Larsson 2006-10-16 12:35:00 UTC
*** Bug 350975 has been marked as a duplicate of this bug. ***
Comment 14 Alexander Larsson 2006-10-16 12:39:47 UTC
*** Bug 350452 has been marked as a duplicate of this bug. ***
Comment 15 Alexander Larsson 2006-10-16 12:41:48 UTC
The return_val_if_fail case would have given some output on stdout. Has anyone seen that when reproducing this bug?
Comment 16 André Klapper 2006-10-16 13:04:20 UTC
thanks for taking a look at this...
Comment 17 Alexander Larsson 2006-10-16 13:48:17 UTC
*** Bug 335114 has been marked as a duplicate of this bug. ***
Comment 18 Alexander Larsson 2006-10-16 14:26:08 UTC
*** Bug 339605 has been marked as a duplicate of this bug. ***
Comment 19 Alexander Larsson 2006-10-16 15:17:44 UTC
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?


Comment 20 André Klapper 2006-10-16 15:26:22 UTC
*** Bug 362624 has been marked as a duplicate of this bug. ***
Comment 21 Sebastien Bacher 2006-10-16 19:32:02 UTC
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"
Comment 22 Alexander Larsson 2006-10-17 06:24:05 UTC
Ah, that confirms my suspicion that the g_return_val_if_fail fails, thanks!

Comment 23 Elijah Newren 2006-10-17 06:33:27 UTC
*** Bug 362781 has been marked as a duplicate of this bug. ***
Comment 24 Sebastien Bacher 2006-10-17 08:58:20 UTC
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
...

Thread 1 (Thread -1226045760 (LWP 17480))

  • #0 __kernel_vsyscall
  • #1 raise
    from /lib/tls/i686/cmov/libc.so.6
  • #2 abort
    from /lib/tls/i686/cmov/libc.so.6
  • #3 IA__g_logv
    at gmessages.c line 497
  • #4 IA__g_log
    at gmessages.c line 517
  • #5 IA__g_return_if_fail_warning
    at gmessages.c line 532
  • #6 nautilus_file_get_uri
    at nautilus-file.c line 2835
  • #7 get_link_files
    at nautilus-file.c line 1354
  • #8 nautilus_file_emit_changed
    at nautilus-file.c line 5401
  • #9 nautilus_directory_emit_change_signals
    at nautilus-directory.c line 762
  • #10 emit_change_signals_for_all_files
    at nautilus-directory.c line 265
  • #11 corba_metafile_ready
    at nautilus-directory-metafile-monitor.c line 110
  • #12 ORBit_c_stub_invoke
    from /usr/lib/libORBit-2.so.0
  • #13 Nautilus_MetafileMonitor_metafile_ready
    at nautilus-shell-interface-stubs.c line 17
  • #14 metafile_read_mark_done
    at nautilus-metafile.c line 822
  • #15 metafile_read_done
    at nautilus-metafile.c line 1836
  • #16 eel_read_entire_file
    from /usr/lib/libeel-2.so.2
  • #17 gnome_vfs_job_get_count
    from /usr/lib/libgnomevfs-2.so.0
  • #18 g_idle_dispatch

I will attach the backtrace from gdb."
Comment 25 Alexander Larsson 2006-10-17 09:05:36 UTC
Created attachment 74858 [details] [review]
Possible fix

This patch might fix this issue, if you can reproduce this bug, please test it.
Comment 26 André Klapper 2006-10-17 23:18:55 UTC
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!
Comment 27 Andrew D. 2006-10-18 02:36:05 UTC
I've applied the patch and it seems to be working well for now. :) I'll reply again if it isn't working later.
Comment 28 Sebastien Bacher 2006-10-18 13:44:35 UTC
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
Comment 29 André Klapper 2006-10-19 11:54:25 UTC
*** Bug 363389 has been marked as a duplicate of this bug. ***
Comment 30 André Klapper 2006-10-19 12:20:11 UTC
*** Bug 363395 has been marked as a duplicate of this bug. ***
Comment 31 André Klapper 2006-10-19 12:21:52 UTC
*** Bug 363396 has been marked as a duplicate of this bug. ***
Comment 32 André Klapper 2006-10-19 14:51:03 UTC
*** Bug 363425 has been marked as a duplicate of this bug. ***
Comment 33 André Klapper 2006-10-19 17:58:08 UTC
*** Bug 363470 has been marked as a duplicate of this bug. ***
Comment 34 André Klapper 2006-10-19 19:39:11 UTC
*** Bug 363487 has been marked as a duplicate of this bug. ***
Comment 35 André Klapper 2006-10-19 21:44:05 UTC
*** Bug 363508 has been marked as a duplicate of this bug. ***
Comment 36 André Klapper 2006-10-19 23:08:25 UTC
*** Bug 363535 has been marked as a duplicate of this bug. ***
Comment 37 André Klapper 2006-10-20 00:43:07 UTC
*** Bug 363543 has been marked as a duplicate of this bug. ***
Comment 38 André Klapper 2006-10-20 00:44:03 UTC
*** Bug 363545 has been marked as a duplicate of this bug. ***
Comment 39 André Klapper 2006-10-20 09:07:13 UTC
*** Bug 363605 has been marked as a duplicate of this bug. ***
Comment 40 André Klapper 2006-10-20 09:08:39 UTC
*** Bug 363583 has been marked as a duplicate of this bug. ***
Comment 41 André Klapper 2006-10-20 09:10:59 UTC
*** Bug 363553 has been marked as a duplicate of this bug. ***
Comment 42 Christian Kirbach 2006-10-21 14:06:52 UTC
*** Bug 363905 has been marked as a duplicate of this bug. ***
Comment 43 Christian Kirbach 2006-10-21 14:09:16 UTC
*** Bug 363928 has been marked as a duplicate of this bug. ***
Comment 44 André Klapper 2006-10-21 14:55:49 UTC
*** Bug 363931 has been marked as a duplicate of this bug. ***
Comment 45 André Klapper 2006-10-25 10:35:55 UTC
*** Bug 364933 has been marked as a duplicate of this bug. ***
Comment 46 Karsten Bräckelmann 2006-10-25 15:32:27 UTC
*** Bug 365020 has been marked as a duplicate of this bug. ***
Comment 47 Fabio Bonelli 2006-10-27 13:19:49 UTC
*** Bug 365536 has been marked as a duplicate of this bug. ***
Comment 48 Fabio Bonelli 2006-10-28 10:56:11 UTC
*** Bug 366166 has been marked as a duplicate of this bug. ***
Comment 49 Fabio Bonelli 2006-10-28 14:30:45 UTC
*** Bug 366262 has been marked as a duplicate of this bug. ***
Comment 50 André Klapper 2006-10-29 23:13:11 UTC
*** Bug 367235 has been marked as a duplicate of this bug. ***
Comment 51 André Klapper 2006-10-30 00:19:48 UTC
*** Bug 367285 has been marked as a duplicate of this bug. ***
Comment 52 André Klapper 2006-11-01 09:05:55 UTC
*** Bug 368410 has been marked as a duplicate of this bug. ***
Comment 53 André Klapper 2006-11-01 10:40:46 UTC
*** Bug 368774 has been marked as a duplicate of this bug. ***
Comment 54 André Klapper 2006-11-01 13:07:00 UTC
*** Bug 368805 has been marked as a duplicate of this bug. ***
Comment 55 André Klapper 2006-11-02 10:57:51 UTC
*** Bug 369273 has been marked as a duplicate of this bug. ***
Comment 56 André Klapper 2006-11-03 03:59:03 UTC
*** Bug 369793 has been marked as a duplicate of this bug. ***
Comment 57 André Klapper 2006-11-05 13:15:45 UTC
*** Bug 370953 has been marked as a duplicate of this bug. ***
Comment 58 André Klapper 2006-11-06 10:21:54 UTC
*** Bug 371445 has been marked as a duplicate of this bug. ***
Comment 59 Germán Poo-Caamaño 2006-11-29 12:43:39 UTC
*** Bug 380434 has been marked as a duplicate of this bug. ***
Comment 60 Susana 2007-01-02 18:42:31 UTC
*** Bug 391846 has been marked as a duplicate of this bug. ***
Comment 61 palfrey 2007-01-18 18:36:12 UTC
*** Bug 397972 has been marked as a duplicate of this bug. ***
Comment 62 Bruno Boaventura 2007-01-27 12:18:54 UTC
*** Bug 401266 has been marked as a duplicate of this bug. ***
Comment 63 Christian Kirbach 2007-03-05 20:18:06 UTC
*** Bug 414935 has been marked as a duplicate of this bug. ***
Comment 64 palfrey 2007-05-21 23:25:44 UTC
*** Bug 440214 has been marked as a duplicate of this bug. ***
Comment 65 palfrey 2007-05-28 12:55:07 UTC
*** Bug 441668 has been marked as a duplicate of this bug. ***
Comment 66 palfrey 2007-06-01 14:18:32 UTC
*** Bug 442893 has been marked as a duplicate of this bug. ***
Comment 67 palfrey 2007-09-05 15:40:07 UTC
*** Bug 473889 has been marked as a duplicate of this bug. ***