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 556729 - Rhythmbox crashes if you try to import a directory which contains directories without execution permission
Rhythmbox crashes if you try to import a directory which contains directories...
Status: RESOLVED OBSOLETE
Product: rhythmbox
Classification: Other
Component: Importing
0.11.x
Other Linux
: Normal critical
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-10-17 13:32 UTC by Pedro Villavicencio
Modified: 2018-05-24 13:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
skip processing a file when g_file_enumerator_next_file fails (632 bytes, patch)
2008-10-28 02:38 UTC, Jason Crain
committed Details | Review

Description Pedro Villavicencio 2008-10-17 13:32:46 UTC
this report has been filed here:

https://bugs.edge.launchpad.net/ubuntu/+source/rhythmbox/+bug/284970

"Rhythmbox from 0.11.6svn20081008 crashes every time I try to import a directory if it contains other directories which haven't got the execution bit set; this is always reproducible until I "chmod +x" any such directories.

Rhythmbox should ignore such directories instead and show a message about the error on the "Failed imports" tab."

stacktrace:

"Thread 8 (Thread 0xb5d53b90 (LWP 13107)):

Thread 6 (Thread 0xb4b90b90 (LWP 13105))

  • #0 IA__g_str_hash
    at /build/buildd/glib2.0-2.18.1/glib/gstring.c line 95
  • #1 IA__g_hash_table_lookup
    at /build/buildd/glib2.0-2.18.1/glib/ghash.c line 118
  • #2 rb_refstring_new
    at rb-refstring.c line 75
  • #3 action_thread_main
    at rhythmdb.c line 2575
  • #4 g_thread_create_proxy
    at /build/buildd/glib2.0-2.18.1/glib/gthread.c line 635
  • #5 start_thread
    from /lib/tls/i686/cmov/libpthread.so.0
  • #6 clone
    from /lib/tls/i686/cmov/libc.so.6

Comment 1 Jason Crain 2008-10-28 02:38:02 UTC
Created attachment 121492 [details] [review]
skip processing a file when g_file_enumerator_next_file fails
Comment 2 Jason Crain 2008-10-28 02:40:07 UTC
Looks like the error is causing rb_refstring_new to be called with child_uri=NULL

from rhythmdb/rhythmdb.c

file_info = g_file_enumerator_next_file (dir_enum, db->priv->exiting, &error);
if (file_info == NULL && error == NULL) {
        /* done */
        break;
}

child = g_file_get_child (dir, g_file_info_get_name (file_info));
child_uri = g_file_get_uri (child);
...
result->real_uri = rb_refstring_new (child_uri);


Attached patch will at least short-circuit that behavior.
Comment 3 Jonathan Matthew 2008-11-08 14:43:47 UTC
I've committed something like your patch, but there's still more to do here.  We should catch this at the directory level by doing an access check rather than at the file level, so we can report a useful error message.
Comment 4 GNOME Infrastructure Team 2018-05-24 13:42:48 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/rhythmbox/issues/647.