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 755444 - Rename bookmark crashes nautilus
Rename bookmark crashes nautilus
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.17.x
Other Linux
: Normal critical
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-09-22 22:14 UTC by Robert Roth
Modified: 2015-09-24 03:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtkplacessidebar: avoid accesing destroyed popover (3.02 KB, patch)
2015-09-23 14:21 UTC, Carlos Soriano
committed Details | Review

Description Robert Roth 2015-09-22 22:14:48 UTC
Steps to reproduce (Fedora 23, packages updated, nautilus 3.17.91)
1. start nautilus
2. create a bookmark
3. rename the bookmark (right-click and rename)
4. press enter

Expected:
bookmark is renamed

What happens instead:
bookmark is renamed and nautilus crashes

More details:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6f8ffeb in gtk_widget_hide () from /usr/lib64/libgtk-3.so.0
(gdb) backtrace
  • #0 gtk_widget_hide
  • #1 _g_closure_invoke_va
  • #2 g_signal_emit_valist
  • #3 g_signal_emit
  • #4 button_activate_timeout
  • #5 gdk_threads_dispatch
  • #6 g_timeout_dispatch
  • #7 g_main_context_dispatch
  • #8 g_main_context_iterate.isra
  • #9 g_main_context_iteration
  • #10 g_application_run
  • #11 main

Comment 1 Carlos Soriano 2015-09-23 14:21:25 UTC
Created attachment 311949 [details] [review]
gtkplacessidebar: avoid accesing destroyed popover

The row and rename popovers are always relative_to a row.
We also keep a pointer to them so we can interact with them in
callbacks.

However, if the row is destroyed its associated popovers will be
destroyed as well as relative_to destroyes and frees memory of its
associated widget when its relative_to widget is destroyed.
If we, for example, update the places while the popover is shown we are
going to access and invalid widget on the next time.

To avoid that, connect to the destroy signal of the popovers and clean
the sidebar pointers when that happens.
Comment 2 Matthias Clasen 2015-09-23 18:42:28 UTC
Review of attachment 311949 [details] [review]:

a bit ugly, but ok