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 692035 - Since GTK 3.7.2 infinite loop when pressing "add" button in Nautilus searchbar
Since GTK 3.7.2 infinite loop when pressing "add" button in Nautilus searchbar
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: Path Bar
3.7.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-01-18 20:57 UTC by Cosimo Cecchi
Modified: 2013-03-01 21:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Cosimo Cecchi 2013-01-18 20:57:38 UTC
To reproduce:
- open Nautilus, press "Search" on the toolbar
- press the + icon in the searchbar
- 3.7.2 or later hangs, 3.7.0 still used to work fine

Trying a bisect now.
Comment 1 Cosimo Cecchi 2013-01-18 21:22:14 UTC
Bisect reports this is caused by

c98ee1ec396ccd8cb4c87780ee08adad88fdf3e3 is the first bad commit
commit c98ee1ec396ccd8cb4c87780ee08adad88fdf3e3
Author: Benjamin Otte <otte@redhat.com>
Date:   Tue Nov 13 21:51:29 2012 +0100

    sizerequestcache: Make clear_cache clear all the cache

:040000 040000 3511501d1d9c31f56f452e1bf0bbde96f9a91487 75ffa5c8778c31ce050533366b50e6d4ba5eb03e M	gtk
Comment 2 Cosimo Cecchi 2013-01-18 21:31:16 UTC
Backtrace:

(gdb) bt
  • #0 magazine_chain_pop_head
    at gslice.c line 529
  • #1 thread_memory_magazine1_alloc
    at gslice.c line 835
  • #2 g_slice_alloc
    at gslice.c line 994
  • #3 g_slist_prepend
    at gslist.c line 267
  • #4 pango_attr_list_insert_internal
    at pango-attributes.c line 1228
  • #5 pango_attr_list_insert
    at pango-attributes.c line 1287
  • #6 shape_ellipsis
    at ellipsize.c line 326
  • #7 update_ellipsis_shape
    at ellipsize.c line 462
  • #8 find_initial_span
    at ellipsize.c line 551
  • #9 _pango_layout_line_ellipsize
    at ellipsize.c line 740
  • #10 pango_layout_line_postprocess
    at pango-layout.c line 5278
  • #11 process_line
    at pango-layout.c line 3709
  • #12 pango_layout_check_lines
    at pango-layout.c line 3974
  • #13 pango_layout_check_lines
    at pango-layout.c line 3847
  • #14 pango_layout_get_extents_internal
    at pango-layout.c line 2534
  • #15 pango_layout_get_extents
    at pango-layout.c line 2729
  • #16 gtk_label_get_preferred_layout_size
    at gtklabel.c line 3524
  • #17 gtk_label_get_preferred_size
    at gtklabel.c line 3561
  • #18 gtk_widget_query_size_for_orientation
    at gtksizerequest.c line 162
  • #19 _gtk_widget_compute_size_for_orientation
    at gtksizerequest.c line 282
  • #20 gtk_box_get_size
    at gtkbox.c line 1024
  • #21 gtk_widget_query_size_for_orientation
    at gtksizerequest.c line 162
  • #22 _gtk_widget_compute_size_for_orientation
    at gtksizerequest.c line 282
  • #23 gtk_button_get_size
    at gtkbutton.c line 2115
  • #24 gtk_widget_query_size_for_orientation
  • #25 _gtk_widget_compute_size_for_orientation
    at gtksizerequest.c line 282
  • #26 nautilus_path_bar_get_preferred_height
    at nautilus-pathbar.c line 397
  • #27 gtk_widget_query_size_for_orientation
    at gtksizerequest.c line 162
  • #28 _gtk_widget_compute_size_for_orientation
    at gtksizerequest.c line 296
  • #29 _gtk_widget_compute_size_for_orientation
    at gtksizerequest.c line 260
  • #30 gtk_box_get_size
    at gtkbox.c line 1024
  • #31 gtk_widget_query_size_for_orientation
    at gtksizerequest.c line 162
  • #32 _gtk_widget_compute_size_for_orientation
    at gtksizerequest.c line 282
  • #33 gtk_widget_query_size_for_orientation
    at gtksizerequest.c line 162
  • #34 _gtk_widget_compute_size_for_orientation
    at gtksizerequest.c line 282
  • #35 gtk_widget_get_preferred_size
    at gtksizerequest.c line 538
  • #36 toolbar_content_size_request
    at gtktoolbar.c line 3393
  • #37 toolbar_content_is_homogeneous
    at gtktoolbar.c line 3417
  • #38 gtk_toolbar_size_request
    at gtktoolbar.c line 976
  • #39 gtk_toolbar_get_preferred_width
    at gtktoolbar.c line 1047
  • #40 gtk_widget_query_size_for_orientation
    at gtksizerequest.c line 129
  • #41 _gtk_widget_compute_size_for_orientation
    at gtksizerequest.c line 282
  • #42 gtk_box_get_size
    at gtkbox.c line 1021
  • #43 gtk_widget_query_size_for_orientation
    at gtksizerequest.c line 129
  • #44 _gtk_widget_compute_size_for_orientation
    at gtksizerequest.c line 282
  • #45 gtk_grid_request_non_spanning
    at gtkgrid.c line 668
  • #46 gtk_grid_request_run
    at gtkgrid.c line 995
  • #47 gtk_grid_get_size
    at gtkgrid.c line 1160
  • #48 gtk_widget_query_size_for_orientation
    at gtksizerequest.c line 129
  • #49 _gtk_widget_compute_size_for_orientation
    at gtksizerequest.c line 282
  • #50 gtk_widget_query_size_for_orientation
    at gtksizerequest.c line 173
  • #51 _gtk_widget_compute_size_for_orientation
    at gtksizerequest.c line 282
  • #52 gtk_bin_get_preferred_height_for_width
    at gtkbin.c line 279
  • #53 gtk_application_window_real_get_preferred_height_for_width
    at gtkapplicationwindow.c line 635
  • #54 gtk_widget_query_size_for_orientation
    at gtksizerequest.c line 184
  • #55 _gtk_widget_compute_size_for_orientation
    at gtksizerequest.c line 282
  • #56 gtk_widget_size_allocate
    at gtkwidget.c line 4862
  • #57 gtk_container_resize_children
    at gtkcontainer.c line 1877
  • #58 gtk_window_move_resize
    at gtkwindow.c line 7336
  • #59 gtk_window_check_resize
    at gtkwindow.c line 6297
  • #60 gtk_window_check_resize
    at gtkwindow.c line 6290
  • #61 _g_closure_invoke_va
  • #62 g_signal_emit_valist
    at gsignal.c line 3225
  • #63 g_signal_emit
    at gsignal.c line 3370
  • #64 gtk_container_idle_sizer
    at gtkcontainer.c line 1687
  • #65 gdk_threads_dispatch
    at gdk.c line 786
  • #66 g_main_dispatch
    at gmain.c line 3048
  • #67 g_main_context_dispatch
    at gmain.c line 3624
  • #68 g_main_context_iterate
    at gmain.c line 3695
  • #69 g_main_context_iteration
    at gmain.c line 3756
  • #70 g_application_run
    at gapplication.c line 1620
  • #71 main
    at nautilus-main.c line 108

Comment 3 Benjamin Otte (Company) 2013-01-20 15:47:00 UTC
The set_label_size_request() function at http://git.gnome.org/browse/nautilus/tree/src/nautilus-pathbar.c?id=id=9a122cb3aa4f85548ff036ea3e6509e0e60387f8#n304 is completely broken. Size requests must not modify widgets.

So what happens is that unsetting ellipsisze will of course queue a resize on the label which in turn will queue a resize on the pathbar. And when you do that during size computation, size computation will cause a resize which will cause a size computation.

I have no idea why it used to work, but I'm convinced that was a lucky accident.

Fwiw, what is that function even trying to do?
Comment 4 Cosimo Cecchi 2013-03-01 21:22:49 UTC
This seems to have been fixed in GTK in the meantime.
That code has quite a long history in the pathbar; it's trying to make the label request size as if it was bold, so that the button doesn't change size when you click it...

Anyway, not a problem anymore. I hope this won't be back at some point :)