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 652769 - Reordering/removing hidden children in GtkBox results in 100% CPU
Reordering/removing hidden children in GtkBox results in 100% CPU
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.1.x
Other Linux
: High major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-06-16 18:48 UTC by Cristian Aravena Romero
Modified: 2011-06-30 07:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtkbox: Invalidate order on changes, even if the child is not visible (1.56 KB, patch)
2011-06-28 09:50 UTC, Vincent Untz
committed Details | Review

Description Cristian Aravena Romero 2011-06-16 18:48:49 UTC
Open bug in launchpad.net:
https://bugs.launchpad.net/bugs/798377

"1) Open empathy
2) Connect to network
3) open windows of chat
4) full load empathy-chat"

  • #0 g_source_list_add
    at /build/buildd/glib2.0-2.29.8/./glib/gmain.c line 900
  • #1 g_source_attach_unlocked
    at /build/buildd/glib2.0-2.29.8/./glib/gmain.c line 947
  • #2 g_source_attach
    at /build/buildd/glib2.0-2.29.8/./glib/gmain.c line 994
  • #3 g_idle_add_full
    at /build/buildd/glib2.0-2.29.8/./glib/gmain.c line 4907
  • #4 tp_debug_sender_log_handler
  • #5 g_logv
    at /build/buildd/glib2.0-2.29.8/./glib/gmessages.c line 527
  • #6 g_log
    at /build/buildd/glib2.0-2.29.8/./glib/gmessages.c line 573
  • #7 gtk_style_provider_get_style_property
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkstyleprovider.c line 111
  • #8 _gtk_style_context_peek_style_property
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkstylecontext.c line 2342
  • #9 gtk_widget_style_get_valist
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkwidget.c line 11664
  • #10 gtk_widget_style_get
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkwidget.c line 11702
  • #11 _gtk_scrolled_window_get_scrollbar_spacing
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkscrolledwindow.c line 2081
  • #12 gtk_scrolled_window_get_preferred_size
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkscrolledwindow.c line 2108
  • #13 compute_size_for_orientation
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtksizerequest.c line 350
  • #14 gtk_box_get_size
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkbox.c line 1016
  • #15 compute_size_for_orientation
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtksizerequest.c line 350
  • #16 gtk_paned_get_preferred_size
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkpaned.c line 906
  • #17 compute_size_for_orientation
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtksizerequest.c line 350
  • #18 gtk_widget_size_allocate
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkwidget.c line 4797
  • #19 gtk_box_size_allocate
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkbox.c line 655
  • #20 g_closure_invoke
    at /build/buildd/glib2.0-2.29.8/./gobject/gclosure.c line 771
  • #21 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c line 3186
  • #22 g_signal_emit_valist
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c line 2987
  • #23 g_signal_emit
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c line 3044
  • #24 gtk_widget_size_allocate
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkwidget.c line 4859
  • #25 chat_size_allocate
    at empathy-chat.c line 2928
  • #26 g_closure_invoke
    at /build/buildd/glib2.0-2.29.8/./gobject/gclosure.c line 771
  • #27 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c line 3186
  • #28 g_signal_emit_valist
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c line 2987
  • #29 g_signal_emit
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c line 3044
  • #30 gtk_widget_size_allocate
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkwidget.c line 4859
  • #31 gtk_notebook_size_allocate
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtknotebook.c line 2517
  • #32 g_closure_invoke
    at /build/buildd/glib2.0-2.29.8/./gobject/gclosure.c line 771
  • #33 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c line 3186
  • #34 g_signal_emit_valist
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c line 2987
  • #35 g_signal_emit
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c line 3044
  • #36 gtk_widget_size_allocate
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkwidget.c line 4859
  • #37 gtk_box_size_allocate
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkbox.c line 655
  • #38 g_closure_invoke
    at /build/buildd/glib2.0-2.29.8/./gobject/gclosure.c line 771
  • #39 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c line 3186
  • #40 g_signal_emit_valist
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c line 2987
  • #41 g_signal_emit
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c line 3044
  • #42 gtk_widget_size_allocate
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkwidget.c line 4859
  • #43 gtk_window_size_allocate
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkwindow.c line 5346
  • #44 g_closure_invoke
    at /build/buildd/glib2.0-2.29.8/./gobject/gclosure.c line 771
  • #45 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c line 3186
  • #46 g_signal_emit_valist
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c line 2987
  • #47 g_signal_emit
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c line 3044
  • #48 gtk_widget_size_allocate
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkwidget.c line 4859
  • #49 gtk_container_resize_children
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkcontainer.c line 1841
  • #50 gtk_window_move_resize
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkwindow.c line 7122
  • #51 gtk_window_check_resize
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkwindow.c line 6032
  • #52 gtk_window_check_resize
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkwindow.c line 6025
  • #53 g_closure_invoke
    at /build/buildd/glib2.0-2.29.8/./gobject/gclosure.c line 771
  • #54 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c line 3294
  • #55 g_signal_emit_valist
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c line 2987
  • #56 g_signal_emit
    at /build/buildd/glib2.0-2.29.8/./gobject/gsignal.c line 3044
  • #57 gtk_container_idle_sizer
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkcontainer.c line 1677
  • #58 gdk_threads_dispatch
    at /build/buildd/gtk+3.0-3.1.6/./gdk/gdk.c line 754
  • #59 g_main_dispatch
    at /build/buildd/glib2.0-2.29.8/./glib/gmain.c line 2477
  • #60 g_main_context_dispatch
    at /build/buildd/glib2.0-2.29.8/./glib/gmain.c line 3050
  • #61 g_main_context_iterate
    at /build/buildd/glib2.0-2.29.8/./glib/gmain.c line 3128
  • #62 g_main_loop_run
    at /build/buildd/glib2.0-2.29.8/./glib/gmain.c line 3336
  • #63 gtk_main
    at /build/buildd/gtk+3.0-3.1.6/./gtk/gtkmain.c line 1358
  • #64 g_application_run
    at /build/buildd/glib2.0-2.29.8/./gio/gapplication.c line 1326
  • #65 main
    at empathy-chat.c line 160

Comment 2 Guillaume Desmottes 2011-06-20 10:34:10 UTC
I can reproduce this with GTK+3 master (but didn't with an older GTK+).
My console is flooded with:


(empathy-chat:16835): Gtk-CRITICAL **: gtk_style_provider_get_style_property: assertion `g_type_is_a (gtk_widget_path_get_object_type (path), pspec->owner_type)' failed


that's probably the issue.
Comment 3 Guillaume Desmottes 2011-06-20 10:36:30 UTC
Gtk-CRITICAL **: gtk_style_provider_get_style_property: assertion `g_type_is_a (gtk_widget_path_get_object_type (path), pspec->owner_type)' failed

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff197b974 in g_logv (log_domain=0x7fffe99cea39 "Gtk", log_level=G_LOG_LEVEL_CRITICAL, 
    format=0x7ffff1a03178 "%s: assertion `%s' failed", args1=0x7fffffffb0c0) at gmessages.c:552
552			G_BREAKPOINT ();




  • #0 g_logv
    at gmessages.c line 552
  • #1 g_log
    at gmessages.c line 573
  • #2 g_return_if_fail_warning
  • #3 gtk_style_provider_get_style_property
    at gtkstyleprovider.c line 111
  • #4 _gtk_style_context_peek_style_property
    at gtkstylecontext.c line 2342
  • #5 gtk_widget_style_get_valist
    at gtkwidget.c line 11665
  • #6 gtk_widget_style_get
    at gtkwidget.c line 11703
  • #7 _gtk_scrolled_window_get_scrollbar_spacing
    at gtkscrolledwindow.c line 2081
  • #8 gtk_scrolled_window_get_preferred_size
    at gtkscrolledwindow.c line 2108
  • #9 gtk_scrolled_window_get_preferred_height
    at gtkscrolledwindow.c line 2258
  • #10 compute_size_for_orientation
    at gtksizerequest.c line 383
  • #11 gtk_widget_get_preferred_height
    at gtksizerequest.c line 574
  • #12 gtk_box_get_size
    at gtkbox.c line 1020
  • #13 gtk_box_get_preferred_height
    at gtkbox.c line 1083
  • #14 compute_size_for_orientation
    at gtksizerequest.c line 383
  • #15 gtk_widget_get_preferred_height
    at gtksizerequest.c line 574
  • #16 get_preferred_size_for_size
    at gtkpaned.c line 886
  • #17 gtk_paned_get_preferred_size
    at gtkpaned.c line 906
  • #18 gtk_paned_get_preferred_height
    at gtkpaned.c line 955
  • #19 compute_size_for_orientation
    at gtksizerequest.c line 383
  • #20 gtk_widget_get_preferred_height
  • #21 gtk_box_get_size
    at gtkbox.c line 1020
  • #22 gtk_box_get_preferred_height
    at gtkbox.c line 1083
  • #23 compute_size_for_orientation
    at gtksizerequest.c line 383
  • #24 gtk_widget_get_preferred_height
    at gtksizerequest.c line 574
  • #25 gtk_widget_size_allocate
    at gtkwidget.c line 4797
  • #26 chat_size_allocate
    at empathy-chat.c line 2928
  • #27 g_cclosure_marshal_VOID__BOXED
    at gmarshal.c line 568
  • #28 g_type_class_meta_marshal
    at gclosure.c line 882
  • #29 g_closure_invoke
    at gclosure.c line 771
  • #30 signal_emit_unlocked_R
    at gsignal.c line 3186
  • #31 g_signal_emit_valist
    at gsignal.c line 2987
  • #32 g_signal_emit
    at gsignal.c line 3044
  • #33 gtk_widget_size_allocate
    at gtkwidget.c line 4860
  • #34 gtk_notebook_size_allocate
    at gtknotebook.c line 2517
  • #35 g_cclosure_marshal_VOID__BOXED
    at gmarshal.c line 568
  • #36 g_type_class_meta_marshal
    at gclosure.c line 882
  • #37 g_closure_invoke
    at gclosure.c line 771
  • #38 signal_emit_unlocked_R
    at gsignal.c line 3186
  • #39 g_signal_emit_valist
    at gsignal.c line 2987
  • #40 g_signal_emit
    at gsignal.c line 3044
  • #41 gtk_widget_size_allocate
    at gtkwidget.c line 4860
  • #42 gtk_box_size_allocate
    at gtkbox.c line 655
  • #43 g_cclosure_marshal_VOID__BOXED
    at gmarshal.c line 568
  • #44 g_type_class_meta_marshal
    at gclosure.c line 882
  • #45 g_closure_invoke
    at gclosure.c line 771
  • #46 signal_emit_unlocked_R
    at gsignal.c line 3186
  • #47 g_signal_emit_valist
    at gsignal.c line 2987
  • #48 g_signal_emit
    at gsignal.c line 3044
  • #49 gtk_widget_size_allocate
    at gtkwidget.c line 4860
  • #50 gtk_window_size_allocate
    at gtkwindow.c line 5328
  • #51 g_cclosure_marshal_VOID__BOXED
    at gmarshal.c line 568
  • #52 g_type_class_meta_marshal
    at gclosure.c line 882
  • #53 g_closure_invoke
    at gclosure.c line 771
  • #54 signal_emit_unlocked_R
    at gsignal.c line 3186
  • #55 g_signal_emit_valist
    at gsignal.c line 2987
  • #56 g_signal_emit
    at gsignal.c line 3044
  • #57 gtk_widget_size_allocate
    at gtkwidget.c line 4860
  • #58 gtk_window_move_resize
    at gtkwindow.c line 6965
  • #59 gtk_window_check_resize
    at gtkwindow.c line 6014
  • #60 g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 79
  • #61 g_type_class_meta_marshal
  • #62 g_closure_invoke
    at gclosure.c line 771
  • #63 signal_emit_unlocked_R
    at gsignal.c line 3294
  • #64 g_signal_emit_valist
    at gsignal.c line 2987
  • #65 g_signal_emit
    at gsignal.c line 3044
  • #66 gtk_container_check_resize
    at gtkcontainer.c line 1767
  • #67 gtk_container_idle_sizer
    at gtkcontainer.c line 1657
  • #68 gdk_threads_dispatch
    at gdk.c line 754
  • #69 g_idle_dispatch
    at gmain.c line 4854
  • #70 g_main_dispatch
    at gmain.c line 2477
  • #71 g_main_context_dispatch
    at gmain.c line 3050
  • #72 g_main_context_iterate
    at gmain.c line 3128
  • #73 g_main_loop_run
    at gmain.c line 3336
  • #74 gtk_main
    at gtkmain.c line 1357
  • #75 gtk_application_run_mainloop
    at gtkapplication.c line 112
  • #76 g_application_run
    at gapplication.c line 1326
  • #77 main
    at empathy-chat.c line 160

Comment 4 Guillaume Desmottes 2011-06-20 10:52:49 UTC
May be related to bug #652990 let's fix that first.
Comment 5 Guillaume Desmottes 2011-06-21 08:47:13 UTC
Don't see to be related to bug #652990 after all (I can still reproduce it while commenting out code raising bug #652990).

This really looks like a Gtk+ 3.1.x regression.
Comment 6 Vincent Untz 2011-06-28 09:50:45 UTC
Created attachment 190845 [details] [review]
gtkbox: Invalidate order on changes, even if the child is not visible

When we build the sibling path for the order, we do not skip hidden
children (since, quoting the comment, "we cannot reliably detect changes
in widget visibility"). So we need to invalidate the order when hidden
children are reordered and removed.
Comment 7 Ken VanDine 2011-06-29 10:43:52 UTC
Thanks, I have confirmed this fixes the bug for me.  I have uploaded the patch to oneiric.
Comment 8 Benjamin Otte (Company) 2011-06-29 19:03:07 UTC
Comment on attachment 190845 [details] [review]
gtkbox: Invalidate order on changes, even if the child is not visible

Looks good, feel free to commit. Or I'll get to it later.