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 336051 - Expand/contract folder, then double click == crash
Expand/contract folder, then double click == crash
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Navigation
2.14.x
Other All
: High critical
: ---
Assigned To: Christian Neumair
Nautilus Maintainers
: 340912 342016 355758 362012 367040 372161 381814 397202 429511 430854 465090 (view as bug list)
Depends on: 45063
Blocks:
 
 
Reported: 2006-03-26 08:29 UTC by Chris Hubick
Modified: 2007-10-19 22:07 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Proposed patch (868 bytes, patch)
2006-03-27 10:02 UTC, Christian Neumair
none Details | Review

Description Chris Hubick 2006-03-26 08:29:27 UTC
Steps to reproduce:
1. Launch Nautilus in browser (non spatial) mode, so that new folders are opened
in the same window.
2. Expand and then contract a folder.
3. Double click on that same folder to open it will result in an instant crash.


Stack trace:


Other information:
Your documentation on how to retrieve a stack traces does not include
instructions on how to handle something like nautilus, which when called just
spawns a new window from the existing process.  This should be easily
reproducible for a developer anyhow.

It doesn't happen *every* time on my box, but it does almost every time.
Comment 1 Christian Neumair 2006-03-26 11:08:37 UTC
Thanks for your bug report! I'm unable to reproduce this here on my machine.

We still need a stack trace to handle this.

For launching Nautilus in debug mode, you'll have to enter

  gnome-session-remove nautilus
  export NAUTILUS_DEBUG="1"
  nautilus

in a terminal. This will ensure that it doesn't spawn into background.
Comment 2 Chris Hubick 2006-03-26 18:45:12 UTC
Ok, after more testing... it looks like I can only get it to happen when expanding/contracting on an NFS mounted filesystem.  Can you reproduce that?

-------------------------------
[hubick@CHWorkstation ~]$ gnome-session-remove nautilus
Removing 'nautilus' from the session

(gnome-session-remove:16054): GLib-CRITICAL **: g_shell_parse_argv: assertion `command_line != NULL' failed
[hubick@CHWorkstation ~]$ export NAUTILUS_DEBUG="1"
[hubick@CHWorkstation ~]$ nautilus --no-desktop --browser

** (nautilus:16256): CRITICAL **: g_sequence_ptr_get_data: assertion `ptr != NULL' failed
[hubick@CHWorkstation ~]$ nautilus --no-desktop --browser

** (nautilus:16320): CRITICAL **: g_sequence_ptr_get_data: assertion `ptr != NULL' failed
[hubick@CHWorkstation ~]$ nautilus --no-desktop --browser

** (nautilus:16338): CRITICAL **: g_sequence_ptr_get_data: assertion `ptr != NULL' failed
[hubick@CHWorkstation ~]$ nautilus --no-desktop --browser

** (nautilus:16361): WARNING **: file already in tree (parent_ptr: (nil))!!!
** (nautilus:16361): WARNING **: file already in tree (parent_ptr: (nil))!!!
...
** (nautilus:16361): WARNING **: file already in tree (parent_ptr: (nil))!!!
** (nautilus:16361): WARNING **: file already in tree (parent_ptr: 0x8e74ea8)!!!
** (nautilus:16361): CRITICAL **: g_sequence_ptr_get_data: assertion `ptr != NULL' failed
[hubick@CHWorkstation ~]$ nautilus --no-desktop --browser

** (nautilus:16429): CRITICAL **: g_sequence_ptr_get_data: assertion `ptr != NULL' failed
[hubick@CHWorkstation ~]$ nautilus --no-desktop --browser

** (nautilus:16444): WARNING **: file already in tree (parent_ptr: (nil))!!!
** (nautilus:16444): WARNING **: file already in tree (parent_ptr: (nil))!!!
** (nautilus:16444): WARNING **: file already in tree (parent_ptr: (nil))!!!
** (nautilus:16444): WARNING **: file already in tree (parent_ptr: (nil))!!!
** (nautilus:16444): WARNING **: file already in tree (parent_ptr: (nil))!!!
** (nautilus:16444): CRITICAL **: g_sequence_ptr_get_data: assertion `ptr != NULL' failed
[hubick@CHWorkstation ~]$ nautilus --no-desktop --browser

** (nautilus:16490): WARNING **: file already in tree (parent_ptr: (nil))!!!
** (nautilus:16490): CRITICAL **: g_sequence_ptr_get_data: assertion `ptr != NULL' failed
[hubick@CHWorkstation ~]$

-------------------------------

[hubick@CHWorkstation ~]$ gdb nautilus
GNU gdb Red Hat Linux (6.3.0.0-1.122rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) run  --no-desktop --browser
Starting program: /usr/bin/nautilus --no-desktop --browser
Reading symbols from shared object read from target memory...(no debugging symbols found)...done.
Loaded system supplied DSO at 0x495000
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
...
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1208714720 (LWP 16283)]
(no debugging symbols found)
(no debugging symbols found)
...
(no debugging symbols found)
[New Thread -1235035232 (LWP 16286)]
(no debugging symbols found)
...
(no debugging symbols found)
(no debugging symbols found)
[New Thread 26602400 (LWP 16287)]
[New Thread 37092256 (LWP 16288)]
[New Thread 79285152 (LWP 16289)]
[New Thread 47582112 (LWP 16290)]
[New Thread 68762528 (LWP 16291)]
[New Thread 127163296 (LWP 16292)]

Program received signal SIG33, Real-time event 33.
[Switching to Thread 127163296 (LWP 16292)]
0x00495402 in __kernel_vsyscall ()
(gdb) cont
Continuing.
[Thread 127163296 (LWP 16292) exited]

Program received signal SIG33, Real-time event 33.
[Switching to Thread 68762528 (LWP 16291)]
0x00495402 in __kernel_vsyscall ()
(gdb) cont
Continuing.

Program received signal SIG33, Real-time event 33.
[Switching to Thread 47582112 (LWP 16290)]
0x00495402 in __kernel_vsyscall ()
(gdb) cont
Continuing.
[Thread 47582112 (LWP 16290) exited]

Program received signal SIG33, Real-time event 33.
[Switching to Thread 79285152 (LWP 16289)]
0x00495402 in __kernel_vsyscall ()
(gdb) cont
Continuing.
[Thread 79285152 (LWP 16289) exited]
[Thread 68762528 (LWP 16291) exited]

Program received signal SIG33, Real-time event 33.
[Switching to Thread 37092256 (LWP 16288)]
0x00495402 in __kernel_vsyscall ()
(gdb) cont
Continuing.

Program received signal SIG33, Real-time event 33.
[Switching to Thread 26602400 (LWP 16287)]
0x00495402 in __kernel_vsyscall ()
(gdb) cont
Continuing.
[Thread 26602400 (LWP 16287) exited]

Program received signal SIG33, Real-time event 33.
[Switching to Thread -1235035232 (LWP 16286)]
0x00495402 in __kernel_vsyscall ()
(gdb) cont
Continuing.
[Thread 37092256 (LWP 16288) exited]
-------------------------------

At this point gdb just sits there, but no window comes up

If I hit Ctrl+C I then get:

-------------------------------
Program received signal SIGINT, Interrupt.

Thread NaN (LWP 16283)

  • #0 __kernel_vsyscall
  • #1 __nptl_setxid
    from /lib/libpthread.so.0
  • #2 seteuid
    from /lib/libc.so.6
  • #3 gnome_vfs_get_daemon_volume_monitor_type
    from /usr/lib/libgnomevfs-2.so.0
  • #4 gnome_vfs_transform_get
    from /usr/lib/libgnomevfs-2.so.0
  • #5 gnome_vfs_uri_new_private
    from /usr/lib/libgnomevfs-2.so.0
  • #6 gnome_vfs_uri_new
    from /usr/lib/libgnomevfs-2.so.0
  • #7 POA_Nautilus_MetafileMonitor__init
  • #8 POA_Nautilus_MetafileMonitor__init
  • #9 g_type_create_instance
    from /usr/lib/libgobject-2.0.so.0
  • #10 g_object_set
    from /usr/lib/libgobject-2.0.so.0
  • #11 g_object_newv
    from /usr/lib/libgobject-2.0.so.0
  • #12 g_object_new_valist
    from /usr/lib/libgobject-2.0.so.0
  • #13 gtk_widget_new
    from /usr/lib/libgtk-x11-2.0.so.0
  • #14 POA_Nautilus_MetafileMonitor__init
  • #15 POA_Nautilus_MetafileMonitor__init
  • #16 POA_Nautilus_MetafileMonitor__init
  • #17 ORBit_c_stub_invoke
    from /usr/lib/libORBit-2.so.0
  • #18 ??
  • #19 POA_Nautilus_MetafileMonitor__init
  • #20 POA_Nautilus_MetafileMonitor__init
  • #21 __libc_start_main
    from /lib/libc.so.6
  • #22 ??

So, now I needinfo on what other info you need, and how I can help get it.  Thanks.
Comment 3 Christian Neumair 2006-03-27 09:28:01 UTC
Confirming. A part of the problem seems to be that subdirectories are added twice (cf. bug 45063).
Comment 4 Christian Neumair 2006-03-27 10:02:52 UTC
Created attachment 62105 [details] [review]
Proposed patch

The problem seems to be that sometimes, a file is added both to the list of changed and the list of the added files. The attached patch should fix this issue. Maybe you could try out whether it reduces/fixes the crashes? There are probably still issues to resolve, but it is a good start.
Comment 5 Christian Neumair 2006-03-27 10:07:29 UTC
Note to myself and other developers: dequeue_pending_idle_callback sometimes refs the file right above the code (in the if file != NULL condition), although it is not added to changed_files. nautilus_directory_find_file_by_name doesn't add a ref, but the additional ref seems to be superfluous and might create leaks.
Comment 6 Martin Wehner 2006-07-11 01:56:29 UTC
Nice catch! It's on HEAD:

	* libnautilus-private/nautilus-directory-async.c:
	(dequeue_pending_idle_callback): Never add a file to both
	the added_files and changed_files lists. Don't ref an existing
	file without adding it to the changed_file list. (#336051)

	Patch from Christian Neumair  <chris@gnome-de.org>
Comment 7 Martin Wehner 2006-08-04 21:56:55 UTC
So it turns out this wasn't such a good idea after all - it caused bug 348097.
It's reverted on HEAD.
Comment 8 Christian Neumair 2006-08-04 22:21:22 UTC
Did you investigate how this happened? From reading attachment 62105 [details] [review] just the inner codepath is relevant for new files, so how could the event be ignored?

Just a wild guess: The subsequent

        if (directory->details->directory_loaded) {

statement removes confirmed files, which seems to be the case when they're added so we miss the last few files.
Comment 9 André Klapper 2006-08-13 21:06:59 UTC
*** Bug 340912 has been marked as a duplicate of this bug. ***
Comment 10 Alexander Larsson 2006-10-18 10:17:13 UTC
I tracked down the reason the initial fix caused problems with adds and fixed it. What happened was that the new file got a changed event instead of an add event when it was first added. This was because the file already existed in the directory when we got to dequeue_pending_idle_callback due to a previous call to nautilus_file_get(). 

I commited this, and I now don't get any warning from the listview about things being added twice. However, I can still reproduce the initially reported crash on expand/contract and then open, so this bug isn't fixed.
Comment 11 Alexander Larsson 2006-10-18 10:44:40 UTC
The real fix was a simple protection against destruction/removal in the change_dummy_row_callback timeout.
Comment 12 Alexander Larsson 2006-10-18 10:48:10 UTC
*** Bug 355758 has been marked as a duplicate of this bug. ***
Comment 13 Alexander Larsson 2006-10-18 10:51:44 UTC
*** Bug 342016 has been marked as a duplicate of this bug. ***
Comment 14 André Klapper 2006-12-13 00:09:47 UTC
*** Bug 372161 has been marked as a duplicate of this bug. ***
Comment 15 André Klapper 2006-12-13 00:09:54 UTC
*** Bug 381814 has been marked as a duplicate of this bug. ***
Comment 16 André Klapper 2007-01-17 00:12:47 UTC
*** Bug 362012 has been marked as a duplicate of this bug. ***
Comment 17 André Klapper 2007-01-17 00:12:55 UTC
*** Bug 397202 has been marked as a duplicate of this bug. ***
Comment 18 palfrey 2007-05-13 16:02:27 UTC
*** Bug 429511 has been marked as a duplicate of this bug. ***
Comment 19 palfrey 2007-05-13 16:02:31 UTC
*** Bug 430854 has been marked as a duplicate of this bug. ***
Comment 20 André Klapper 2007-10-19 22:07:40 UTC
*** Bug 367040 has been marked as a duplicate of this bug. ***
Comment 21 André Klapper 2007-10-19 22:07:49 UTC
*** Bug 465090 has been marked as a duplicate of this bug. ***