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 754310 - Crash when trying to show hidden files
Crash when trying to show hidden files
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Crashers
3.17.x
Other Linux
: Normal normal
: 3.18
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 754288 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-08-30 09:01 UTC by Yosef Or Boczko
Modified: 2015-09-04 21:07 UTC
See Also:
GNOME target: 3.18
GNOME version: ---


Attachments
files-view: take a ref to source object when loading directory (1.78 KB, patch)
2015-09-04 21:03 UTC, Carlos Soriano
committed Details | Review

Description Yosef Or Boczko 2015-08-30 09:01:28 UTC
In the Pictures folder, Ctrl+H cause a crash:

Program received signal SIGSEGV, Segmentation fault.
g_type_check_instance_is_fundamentally_a (
    type_instance=type_instance@entry=0x9ea7f0, 
    fundamental_type=fundamental_type@entry=80) at gtype.c:4028
warning: Source file is more recent than executable.
4028	  node = lookup_type_node_I (type_instance->g_class->g_type);
(gdb) bt
  • #0 g_type_check_instance_is_fundamentally_a
    at gtype.c line 4028
  • #1 g_object_ref
    at gobject.c line 3046
  • #2 g_set_object
  • #3 load_directory
  • #4 nautilus_files_view_set_show_hidden_files
  • #5 action_show_hidden_files
  • #6 g_closure_invoke
    at gclosure.c line 801
  • #7 signal_emit_unlocked_R
    at gsignal.c line 3607
  • #8 g_signal_emit_valist
    at gsignal.c line 3363
  • #9 g_signal_emit
    at gsignal.c line 3419
  • #10 gtk_action_muxer_activate_action
  • #11 accels_activate
    at gtkapplication.c line 301
  • #12 gtk_application_activate_accel
    at gtkapplication.c line 1554
  • #13 gtk_window_activate_key
    at gtkwindow.c line 11443
  • #14 gtk_window_key_press_event
    at gtkwindow.c line 7843
  • #15 nautilus_window_key_press_event
  • #16 _gtk_marshal_BOOLEAN__BOXEDv
    at gtkmarshalers.c line 130
  • #17 _g_closure_invoke_va
  • #18 g_signal_emit_valist
    at gsignal.c line 3272
  • #19 g_signal_emit
    at gsignal.c line 3419
  • #20 gtk_widget_event_internal
    at gtkwidget.c line 7820
  • #21 propagate_event
    at gtkmain.c line 2604
  • #22 gtk_main_do_event
    at gtkmain.c line 1844
  • #23 gdk_event_source_dispatch
    at gdkeventsource.c line 364
  • #24 g_main_dispatch
    at gmain.c line 3154
  • #25 g_main_context_dispatch
    at gmain.c line 3769
  • #26 g_main_context_iterate
    at gmain.c line 3840
  • #27 g_main_context_iteration
    at gmain.c line 3901
  • #28 g_application_run
    at gapplication.c line 2311
  • #29 main


nautilus from git master updated, the same for glib and gtk+.
Comment 1 Matthias Clasen 2015-08-31 17:39:19 UTC
putting nautilus creashes on the blocker list for now
Comment 2 Carlos Soriano 2015-09-04 21:01:48 UTC
*** Bug 754288 has been marked as a duplicate of this bug. ***
Comment 3 Carlos Soriano 2015-09-04 21:03:50 UTC
Created attachment 310683 [details] [review]
files-view: take a ref to source object when loading directory

We were calling load_directory with the current model, but the view
expect to own it's own reference to the model, and the caller to own
it's own one to the source object.
However, when we use that internally, we were just using the current
model withouth taking an aditional reference, which was causing a
use-after-free crash.

To avoid it, if we are going to us public functions internally, take a
reference to the source object like a external client would have.
Comment 4 Carlos Soriano 2015-09-04 21:07:01 UTC
Attachment 310683 [details] pushed as 8117ec0 - files-view: take a ref to source object when loading directory