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 539780 - Crash when dragging from background capplet to desktop
Crash when dragging from background capplet to desktop
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File and Folder Operations
0.x.x [obsolete]
Other Linux
: Normal major
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-06-23 16:48 UTC by Federico Mena Quintero
Modified: 2008-08-11 16:23 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
suggested fix (1.27 KB, patch)
2008-06-23 17:47 UTC, A. Walton
committed Details | Review

Description Federico Mena Quintero 2008-06-23 16:48:43 UTC
Start gnome-appearance-properties and switch to the Background tab.  Now, repeatedly drag backgrounds from the capplet to the Nautilus desktop.  It will crash here:

  • #8 <signal handler called>
  • #9 strcmp
    from /lib/libc.so.6
  • #10 nautilus_file_operations_copy_move
    at nautilus-file-operations.c line 4798
  • #11 fm_directory_view_move_copy_items
    at fm-directory-view.c line 8288
  • #12 fm_directory_view_handle_uri_list_drop
    at fm-directory-view.c line 8645
  • #13 icon_view_handle_uri_list
    at fm-icon-view.c line 2509
  • #10 nautilus_file_operations_copy_move
    at nautilus-file-operations.c line 4798

because file_scheme = NULL.

This comes from
4795            for (p = location_list_from_uri_list (item_uris); p != NULL; p
= p->next) {
4796                    file_scheme = g_file_get_uri_scheme ((GFile *)p->data);

and item_uris is a single-element list where

(gdb) p (char *) item_uris->data
$8 = 0x878a5b0 "/usr/share/wallpapers/suse103-1920x1200.jpg"

Looks like we could simply use g_file_has_uri_scheme() instead of a manual
strcmp().
Comment 1 Federico Mena Quintero 2008-06-23 16:49:27 UTC
This started as https://bugzilla.novell.com/show_bug.cgi?id=401243
Comment 2 A. Walton 2008-06-23 17:47:35 UTC
Created attachment 113277 [details] [review]
suggested fix

Also fixes the same get_uri_scheme + strcmp just above.

(Note that dragging the file to the desktop is still somewhat silly, since that dialog instantly applies the new background image on-click.)
Comment 3 Sebastien Bacher 2008-07-30 07:45:30 UTC
there is a similar crash when doing rhythmbox artwork dnd described on https://bugs.launchpad.net/ubuntu/+source/rhythmbox/+bug/253153, could somebody consider the patch attached to the bug?
Comment 4 Cosimo Cecchi 2008-07-30 12:59:28 UTC
This looks good to me, but I'm not sure if g_file_get_uri_scheme () is supposed to return NULL, so maybe there's another bug around in glib/gvfs?
Comment 5 A. Walton 2008-08-11 16:23:23 UTC
2008-08-11  A. Walton  <awalton@gnome.org>

	* libnautilus-private/nautilus-file-operations.c
	(nautilus_file_operations_copy_move):
	Use g_file_has_uri_scheme() instead of rolling our own.
	Fixes bug #539780.