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 759657 - GtkSeparator can segfault from CSS settings
GtkSeparator can segfault from CSS settings
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkStyleContext
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-12-19 04:32 UTC by Christian Hergert
Modified: 2016-02-24 13:37 UTC
See Also:
GNOME target: 3.20
GNOME version: ---



Description Christian Hergert 2015-12-19 04:32:38 UTC
with gtk+ master, you can cause gtk to crash by pasting this into the inspector CSS view.

separator { padding: 0 0 0 0; }

The error is 

Gtk[6063]: ERROR: GtkBox child GtkSeparator minimum width: -7 < 0 for height 38

Stack trace added for completeness, but probably not necessary.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff24f9573 in _g_log_abort (breakpoint=1) at gmessages.c:324
324	    G_BREAKPOINT ();
(gdb) bt
  • #0 _g_log_abort
    at gmessages.c line 324
  • #1 g_logv
    at gmessages.c line 1079
  • #2 g_log
    at gmessages.c line 1118
  • #3 gtk_box_size_allocate_no_center
    at gtkbox.c line 552
  • #4 gtk_box_allocate_contents
    at gtkbox.c line 1197
  • #5 gtk_css_gadget_allocate
    at gtkcssgadget.c line 569
  • #6 gtk_box_size_allocate
    at gtkbox.c line 1211
  • #7 gtk_widget_size_allocate_with_baseline
    at gtkwidget.c line 6079
  • #8 gtk_event_box_size_allocate
    at gtkeventbox.c line 597
  • #9 gtk_widget_size_allocate_with_baseline
    at gtkwidget.c line 6079
  • #10 gtk_box_size_allocate_no_center
    at gtkbox.c line 807
  • #11 gtk_box_allocate_contents
    at gtkbox.c line 1197
  • #12 gtk_css_gadget_allocate
    at gtkcssgadget.c line 569
  • #13 gtk_box_size_allocate
    at gtkbox.c line 1211
  • #14 gtk_widget_size_allocate_with_baseline
    at gtkwidget.c line 6079
  • #15 gtk_event_box_size_allocate
    at gtkeventbox.c line 597
  • #16 gtk_widget_size_allocate_with_baseline
    at gtkwidget.c line 6079
  • #17 gtk_box_size_allocate_no_center
    at gtkbox.c line 807
  • #18 gtk_box_allocate_contents
    at gtkbox.c line 1197
  • #19 gtk_css_gadget_allocate
    at gtkcssgadget.c line 569
  • #20 gtk_box_size_allocate
    at gtkbox.c line 1211
  • #21 gtk_widget_size_allocate_with_baseline
    at gtkwidget.c line 6079
  • #22 gtk_widget_size_allocate
    at gtkwidget.c line 6160
  • #23 gtk_bin_size_allocate
    at gtkbin.c line 312
  • #24 gtk_widget_size_allocate_with_baseline
    at gtkwidget.c line 6079
  • #25 gtk_widget_size_allocate
    at gtkwidget.c line 6160
  • #26 gtk_paned_child_allocate
    at gtkpaned.c line 1331
  • #27 gtk_paned_allocate
    at gtkpaned.c line 1565
  • #28 gtk_css_gadget_allocate
    at gtkcssgadget.c line 569
  • #29 gtk_paned_size_allocate
    at gtkpaned.c line 1344
  • #30 gtk_widget_size_allocate_with_baseline
    at gtkwidget.c line 6079
  • #31 gtk_widget_size_allocate
    at gtkwidget.c line 6160
  • #32 gtk_bin_size_allocate
    at gtkbin.c line 312
  • #33 ide_layout_grid_size_allocate
    at ide-layout-grid.c line 779
  • #34 gtk_widget_size_allocate_with_baseline
    at gtkwidget.c line 6079
  • #35 gtk_widget_size_allocate
    at gtkwidget.c line 6160
  • #36 gtk_stack_allocate
    at gtkstack.c line 2253
  • #37 gtk_css_gadget_allocate
    at gtkcssgadget.c line 569
  • #38 gtk_stack_size_allocate
    at gtkstack.c line 2198
  • #39 gtk_widget_size_allocate_with_baseline
    at gtkwidget.c line 6079
  • #40 gtk_box_size_allocate_no_center
    at gtkbox.c line 807
  • #41 gtk_box_allocate_contents
    at gtkbox.c line 1197
  • #42 gtk_css_gadget_allocate
    at gtkcssgadget.c line 569
  • #43 gtk_box_size_allocate
    at gtkbox.c line 1211
  • #44 gtk_widget_size_allocate_with_baseline
    at gtkwidget.c line 6079
  • #45 gtk_widget_size_allocate
    at gtkwidget.c line 6160
  • #46 ide_layout_pane_size_allocate
    at ide-layout-pane.c line 146
  • #47 gtk_widget_size_allocate_with_baseline
    at gtkwidget.c line 6079
  • #48 gtk_widget_size_allocate
    at gtkwidget.c line 6160
  • #49 gtk_overlay_child_allocate
    at gtkoverlay.c line 318
  • #50 gtk_overlay_size_allocate
    at gtkoverlay.c line 337
  • #51 ide_layout_size_allocate
    at ide-layout.c line 344
  • #52 gtk_widget_size_allocate_with_baseline
    at gtkwidget.c line 6079
  • #53 gtk_widget_size_allocate
    at gtkwidget.c line 6160
  • #54 gtk_stack_allocate
    at gtkstack.c line 2253
  • #55 gtk_css_gadget_allocate
    at gtkcssgadget.c line 569
  • #56 gtk_stack_size_allocate
    at gtkstack.c line 2198
  • #57 gtk_widget_size_allocate_with_baseline
    at gtkwidget.c line 6079
  • #58 gtk_box_size_allocate_no_center
    at gtkbox.c line 807
  • #59 gtk_box_allocate_contents
    at gtkbox.c line 1197
  • #60 gtk_css_gadget_allocate
    at gtkcssgadget.c line 569
  • #61 gtk_box_size_allocate
    at gtkbox.c line 1211
  • #62 gtk_widget_size_allocate_with_baseline
    at gtkwidget.c line 6079
  • #63 gtk_widget_size_allocate
    at gtkwidget.c line 6160
  • #64 gtk_stack_allocate
    at gtkstack.c line 2253
  • #65 gtk_css_gadget_allocate
    at gtkcssgadget.c line 569
  • #66 gtk_stack_size_allocate
    at gtkstack.c line 2198
  • #67 gtk_widget_size_allocate_with_baseline
    at gtkwidget.c line 6079
  • #68 gtk_widget_size_allocate
    at gtkwidget.c line 6160
  • #69 gtk_bin_size_allocate
    at gtkbin.c line 312
  • #70 gtk_overlay_size_allocate
    at gtkoverlay.c line 330
  • #71 gtk_widget_size_allocate_with_baseline
    at gtkwidget.c line 6079
  • #72 gtk_widget_size_allocate
    at gtkwidget.c line 6160
  • #73 gtk_window_size_allocate
    at gtkwindow.c line 7611
  • #74 gtk_application_window_real_size_allocate
    at gtkapplicationwindow.c line 660
  • #75 g_closure_invoke
    at gclosure.c line 804
  • #76 signal_emit_unlocked_R
    at gsignal.c line 3559
  • #77 g_signal_emit_valist
    at gsignal.c line 3385
  • #78 g_signal_emit
    at gsignal.c line 3441
  • #79 gtk_widget_size_allocate_with_baseline
    at gtkwidget.c line 6077
  • #80 gtk_widget_size_allocate
    at gtkwidget.c line 6160
  • #81 gtk_window_move_resize
    at gtkwindow.c line 9669
  • #82 gtk_window_check_resize
    at gtkwindow.c line 8236
  • #83 _g_closure_invoke_va
    at gclosure.c line 867
  • #84 g_signal_emit_valist
    at gsignal.c line 3294
  • #85 g_signal_emit
    at gsignal.c line 3441
  • #86 gtk_container_idle_sizer
    at gtkcontainer.c line 2026
  • #87 _g_closure_invoke_va
    at gclosure.c line 867
  • #88 g_signal_emit_valist
    at gsignal.c line 3294
  • #89 g_signal_emit_by_name
    at gsignal.c line 3481
  • #90 gdk_frame_clock_paint_idle
    at gdkframeclockidle.c line 408
  • #91 gdk_threads_dispatch
    at gdk.c line 720
  • #92 g_timeout_dispatch
    at gmain.c line 4577
  • #93 g_main_dispatch
    at gmain.c line 3154
  • #94 g_main_context_dispatch
    at gmain.c line 3769
  • #95 g_main_context_iterate
    at gmain.c line 3840
  • #96 g_main_context_iteration
    at gmain.c line 3901
  • #97 g_application_run
    at gapplication.c line 2336
  • #98 main
    at main.c line 68

Comment 1 Matthias Clasen 2015-12-19 22:44:46 UTC
I think this is the fault of the negative margin trick we're using for paned separators now - if you paste that in the inspector, it overrides the positive padding we have to compensate for the negative margin.
Comment 2 Matthias Clasen 2016-01-08 14:25:55 UTC
still happening
Comment 3 Timm Bäder 2016-02-10 18:28:00 UTC
I can't reproduce this anymore.
Comment 4 Matthias Clasen 2016-02-11 11:07:31 UTC
Here is what I see when I add

paned separator { padding: 0;}

in the inspector:

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug


(lt-gtk3-demo:809): Gtk-CRITICAL **: gtk_widget_queue_draw_area: assertion 'width >= 0' failed
Comment 5 Kai Willadsen 2016-02-14 00:25:59 UTC
The commit fixing this (51af70) has broken a GtkGrid subclass in Meld (DiffGrid in meld/diffgrid.py). I'll be the first to admit that this is an extremely hacky subclass, so I'm happy to believe that it's not GTK+'s fault. However, I can't figure out how this commit is related to the breakage.

The symptom I'm seeing is that all of the children of the GtkGrid subclass get allocations correctly (according to the inspector), but are never painted. Is it possible that this fix has broken backwards compatibility due to some weird interaction between this sizing change and the GtkCssGadget port of GtkGrid?
Comment 6 Yanko Kaneti 2016-02-24 13:37:31 UTC
51af70 also seems to break virt-manager here, specifically the VncDisplay gtk-vnc widget in the vm console view doesn't seem to be painted although its seems to be working (in the blind)