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 661442 - Nautilus crashes when refreshing home folder after modifying ~/.config/user-dirs.dirs
Nautilus crashes when refreshing home folder after modifying ~/.config/user-d...
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other Linux
: Normal critical
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-10-11 09:34 UTC by Damien Gombault
Modified: 2017-10-06 10:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glocalfileinfo: Use g_strcmp0() for some comparisons which might be NULL (1.28 KB, patch)
2017-10-05 12:32 UTC, Philip Withnall
committed Details | Review

Description Damien Gombault 2011-10-11 09:34:25 UTC
Steps to reproduce :

Nautilus is opened in my home directory.

The user-dirs.dirs file contains  :
XDG_DOWNLOAD_DIR="$HOME/Téléchargements/"
XDG_MUSIC_DIR="$HOME/Musique"
XDG_PICTURES_DIR="$HOME/Images"
XDG_VIDEOS_DIR="$HOME/Vidéos"

I added this line in the file then save it :
XDG_DOCUMENTS_DIR="$HOME/Documents/"

I refresh Nautilus home folder with F5 key.

I get the Nautilus crash.

I use Nautilus 3.2.0 on Archlinux 64 bits.

Trace :

Thread 1 (Thread 0x7fa4d0d458c0 (LWP 7991))

  • #0 raise
    from /lib/libc.so.6
  • #1 abort
    from /lib/libc.so.6
  • #2 ??
    from /lib/libc.so.6
  • #3 __assert_fail
    from /lib/libc.so.6
  • #4 cairo_pattern_reference
    from /usr/lib/libcairo.so.2
  • #5 gdk_window_set_background_pattern
    from /usr/lib/libgdk-3.so.0
  • #6 gtk_style_context_set_background
    from /usr/lib/libgtk-3.so.0
  • #7 ??
    from /usr/lib/libgtk-3.so.0
  • #8 ??
    from /usr/lib/libgtk-3.so.0
  • #9 g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 85
  • #10 g_type_class_meta_marshal
    at gclosure.c line 885
  • #11 g_closure_invoke
    at gclosure.c line 774
  • #12 signal_emit_unlocked_R
    at gsignal.c line 3202
  • #13 g_signal_emit_valist
    at gsignal.c line 3003
  • #14 g_signal_emit
    at gsignal.c line 3060
  • #15 ??
    from /usr/lib/libgtk-3.so.0
  • #16 g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 85
  • #17 g_closure_invoke
    at gclosure.c line 774
  • #18 signal_emit_unlocked_R
    at gsignal.c line 3272
  • #19 g_signal_emit_valist
    at gsignal.c line 3003
  • #20 g_signal_emit
    at gsignal.c line 3060
  • #21 gtk_style_context_invalidate
    from /usr/lib/libgtk-3.so.0
  • #22 gtk_widget_get_style_context
    from /usr/lib/libgtk-3.so.0
  • #23 ??
    from /usr/lib/libgtk-3.so.0
  • #24 g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 85
  • #25 g_type_class_meta_marshal
    at gclosure.c line 885
  • #26 g_closure_invoke
    at gclosure.c line 774
  • #27 signal_emit_unlocked_R
    at gsignal.c line 3202
  • #28 g_signal_emit_valist
    at gsignal.c line 3003
  • #29 g_signal_emit
    at gsignal.c line 3060
  • #30 gtk_widget_realize
    from /usr/lib/libgtk-3.so.0
  • #31 ??
    from /usr/lib/libgtk-3.so.0
  • #32 g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 85
  • #33 g_type_class_meta_marshal
    at gclosure.c line 885
  • #34 g_closure_invoke
    at gclosure.c line 774
  • #35 signal_emit_unlocked_R
    at gsignal.c line 3202
  • #36 g_signal_emit_valist
    at gsignal.c line 3003
  • #37 g_signal_emit
    at gsignal.c line 3060
  • #38 gtk_widget_show
    from /usr/lib/libgtk-3.so.0
  • #39 ??
    from /usr/lib/libgtk-3.so.0
  • #40 ??
    from /usr/lib/libgtk-3.so.0
  • #41 gtk_drag_get_data
    from /usr/lib/libgtk-3.so.0
  • #42 ??
  • #43 ??
    from /usr/lib/libgtk-3.so.0
  • #44 g_type_class_meta_marshal
    at gclosure.c line 885
  • #45 g_closure_invoke
    at gclosure.c line 774
  • #46 signal_emit_unlocked_R
    at gsignal.c line 3310
  • #47 g_signal_emit_valist
    at gsignal.c line 3013
  • #48 g_signal_emit_by_name
    at gsignal.c line 3097
  • #49 ??
    from /usr/lib/libgtk-3.so.0
  • #50 ??
    from /usr/lib/libgtk-3.so.0
  • #51 gtk_main_do_event
    from /usr/lib/libgtk-3.so.0
  • #52 ??
    from /usr/lib/libgdk-3.so.0
  • #53 g_main_dispatch
    at gmain.c line 2441
  • #54 g_main_context_dispatch
    at gmain.c line 3011
  • #55 g_main_context_iterate
    at gmain.c line 3089
  • #56 g_main_loop_run
    at gmain.c line 3297
  • #57 gtk_main
    from /usr/lib/libgtk-3.so.0
  • #58 main

Comment 1 Damien Gombault 2011-10-11 09:37:33 UTC
Oops, the trace 228745 was wrong.

The right trace :

Thread 6 (Thread 0x7f0e3ef1e700 (LWP 7189))

  • #0 _g_local_file_info_get
    at glocalfileinfo.c line 1557
  • #1 g_local_file_query_info
    at glocalfile.c line 1178
  • #2 g_file_query_info
    at gfile.c line 1106
  • #3 query_info_async_thread
    at gfile.c line 4833
  • #4 run_in_thread
    at gsimpleasyncresult.c line 843
  • #5 io_job_thread
    at gioscheduler.c line 180
  • #6 g_thread_pool_thread_proxy
    at gthreadpool.c line 319
  • #7 g_thread_create_proxy
    at gthread.c line 1962
  • #8 start_thread
    from /lib/libpthread.so.0
  • #9 clone
    from /lib/libc.so.6
  • #10 ??

Thread 3 (Thread 0x7f0e5c4388e0 (LWP 7178))

  • #0 gdk_visual_get_screen
    at gdkvisual.c line 466
  • #1 gdk_window_get_screen
    at gdkwindow.c line 2133
  • #2 tooltips_enabled
    at gtktooltip.c line 1465
  • #3 _gtk_tooltip_handle_event
    at gtktooltip.c line 1485
  • #4 gtk_main_do_event
    at gtkmain.c line 1934
  • #5 _gdk_event_emit
    at gdkevents.c line 71
  • #6 gdk_event_source_dispatch
    at gdkeventsource.c line 360
  • #7 g_main_dispatch
    at gmain.c line 2441
  • #8 g_main_context_dispatch
    at gmain.c line 3011
  • #9 g_main_context_iterate
    at gmain.c line 3089
  • #10 g_main_loop_run
    at gmain.c line 3297
  • #11 gtk_main
    at gtkmain.c line 1362
  • #12 gtk_application_run_mainloop
    at gtkapplication.c line 115
  • #13 g_application_run
    at gapplication.c line 1323
  • #14 main
    at nautilus-main.c line 102

Thread 1 (Thread 0x7f0e3e51c700 (LWP 7186))

  • #0 strcmp
    from /lib/libc.so.6
  • #1 _g_local_file_info_get
    at glocalfileinfo.c line 1609
  • #2 g_local_file_query_info
    at glocalfile.c line 1178
  • #3 g_file_query_info
    at gfile.c line 1106
  • #4 query_info_async_thread
    at gfile.c line 4833
  • #5 run_in_thread
    at gsimpleasyncresult.c line 843
  • #6 io_job_thread
    at gioscheduler.c line 180
  • #7 g_thread_pool_thread_proxy
    at gthreadpool.c line 319
  • #8 g_thread_create_proxy
    at gthread.c line 1962
  • #9 start_thread
    from /lib/libpthread.so.0
  • #10 clone
    from /lib/libc.so.6
  • #11 ??

Comment 2 Damien Gombault 2011-10-30 19:48:10 UTC
I have reproduced this bug on Fedora 16.

Downstream bug : https://bugzilla.redhat.com/show_bug.cgi?id=750089

I get this trace :

Thread 4 (Thread 0xb7779880 (LWP 2269))

  • #0 __kernel_vsyscall
  • #1 __lll_unlock_wake
    at ../nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S line 387
  • #2 _L_unlock_622
    from /lib/libpthread-2.14.90.so
  • #3 __pthread_mutex_unlock_usercnt
    at pthread_mutex_unlock.c line 53
  • #4 g_async_queue_unlock
    at gasyncqueue.c line 260
  • #5 g_thread_pool_push
    at gthreadpool.c line 561
  • #6 g_io_scheduler_push_job
    at gioscheduler.c line 258
  • #7 g_simple_async_result_run_in_thread
    at gsimpleasyncresult.c line 888
  • #8 g_file_real_query_info_async
    at gfile.c line 4862
  • #9 g_file_query_info_async
    at gfile.c line 1144
  • #10 file_info_start
    at nautilus-directory-async.c line 3511
  • #11 start_or_stop_io
    at nautilus-directory-async.c line 4539
  • #12 nautilus_directory_async_state_changed
    at nautilus-directory-async.c line 4605
  • #13 nautilus_directory_async_state_changed
    at nautilus-directory-async.c line 4587
  • #14 nautilus_directory_force_reload_internal
    at nautilus-directory-async.c line 2316
  • #15 vfs_force_reload
    at nautilus-vfs-directory.c line 127
  • #16 nautilus_directory_force_reload
    at nautilus-directory.c line 1580
  • #17 begin_location_change
    at nautilus-window-manage-views.c line 760
  • #18 nautilus_window_slot_reload
    at nautilus-window-manage-views.c line 1991
  • #19 g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 85
  • #20 g_type_class_meta_marshal
    at gclosure.c line 885
  • #21 g_closure_invoke
    at gclosure.c line 774
  • #22 signal_emit_unlocked_R
    at gsignal.c line 3310
  • #23 g_signal_emitv
    at gsignal.c line 2907
  • #24 gtk_binding_entry_activate
    at gtkbindings.c line 652
  • #25 binding_activate
    at gtkbindings.c line 1524
  • #26 gtk_bindings_activate_list
    at gtkbindings.c line 1585
  • #27 gtk_bindings_activate_event
    at gtkbindings.c line 1670
  • #28 gtk_widget_real_key_press_event
    at gtkwidget.c line 5785
  • #29 gtk_window_key_press_event
    at gtkwindow.c line 5866
  • #30 gtk_window_key_press_event
    at gtkwindow.c line 5850
  • #31 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 85
  • #32 g_type_class_meta_marshal
    at gclosure.c line 885
  • #33 g_closure_invoke
    at gclosure.c line 774
  • #34 signal_emit_unlocked_R
    at gsignal.c line 3310
  • #35 g_signal_emit_valist
    at gsignal.c line 3013
  • #36 g_signal_emit
    at gsignal.c line 3060
  • #37 gtk_widget_event_internal
    at gtkwidget.c line 6132
  • #38 gtk_propagate_event
    at gtkmain.c line 2588
  • #39 gtk_main_do_event
    at gtkmain.c line 1889
  • #40 _gdk_event_emit
    at gdkevents.c line 71
  • #41 gdk_event_source_dispatch
    at gdkeventsource.c line 360
  • #42 g_main_dispatch
    at gmain.c line 2425
  • #43 g_main_context_dispatch
    at gmain.c line 2995
  • #44 g_main_context_iterate
    at gmain.c line 3073
  • #45 g_main_loop_run
    at gmain.c line 3281
  • #46 gtk_main
    at gtkmain.c line 1362
  • #47 gtk_application_run_mainloop
    at gtkapplication.c line 115
  • #48 g_application_run
    at gapplication.c line 1323
  • #49 main
    at nautilus-main.c line 102

Comment 3 William Jon McCann 2012-09-04 23:59:51 UTC
I actually can't reproduce this with those instructions but there do seem to be some cases where the code in gio/glocalfileinfo.c can crash due to a NULL strcmp. Not sure how you are triggering that with this though.
Comment 4 Philip Withnall 2017-10-05 12:32:12 UTC
Created attachment 360959 [details] [review]
glocalfileinfo: Use g_strcmp0() for some comparisons which might be NULL

The return value from g_get_user_special_dir() might be NULL. Safest to
use g_strcmp0() uniformly everywhere.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Comment 5 Emmanuele Bassi (:ebassi) 2017-10-06 09:56:24 UTC
Review of attachment 360959 [details] [review]:

Comment 6 Philip Withnall 2017-10-06 10:19:09 UTC
Attachment 360959 [details] pushed as 0a10f73 - glocalfileinfo: Use g_strcmp0() for some comparisons which might be NULL