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 709434 - [REGRESSION] clutter_box_layout_allocate: Process /usr/bin/gnome-shell was killed by signal 5 (SIGTRAP)
[REGRESSION] clutter_box_layout_allocate: Process /usr/bin/gnome-shell was ki...
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: general
1.16.x
Other Linux
: Normal critical
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2013-10-04 15:13 UTC by Igor Gnatenko
Modified: 2013-10-07 11:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
table-layout: Fix size request when there are no visible rows/cols (1.65 KB, patch)
2013-10-04 19:48 UTC, Florian Müllner
committed Details | Review
table-layout: Base space calculations on visible children (1.51 KB, patch)
2013-10-04 19:48 UTC, Florian Müllner
committed Details | Review

Comment 2 Florian Müllner 2013-10-04 19:48:29 UTC
Created attachment 256505 [details] [review]
table-layout: Fix size request when there are no visible rows/cols

The calculation (n - 1) * spacing to compute the total spacing is
only correct for n >= 1 - if there are no visible rows/cols, the
required spacing is 0 rather than negative.
Comment 3 Florian Müllner 2013-10-04 19:48:35 UTC
Created attachment 256506 [details] [review]
table-layout: Base space calculations on visible children

This is what we already do in the actual size requests, it makes
sense to do the same in the space calculations.
Comment 4 Florian Müllner 2013-10-04 19:50:46 UTC
The first patch fixes the issue, the seconds is just a drive-by change that looks correct to me.
Reassigning to clutter.
Comment 5 Igor Gnatenko 2013-10-04 20:14:43 UTC
Review of attachment 256505 [details] [review]:

Florian, thank you.

I see that clutter code-style uses:
func [space] (args), but you're using
func(args) and func [space] (args) that weird.
I think you could fix this at commiting..

Please add:
Reported-and-Tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Comment 6 Igor Gnatenko 2013-10-04 20:14:57 UTC
Review of attachment 256506 [details] [review]:

Florian, thank you.

I see that clutter code-style uses:
func [space] (args), but you're using
func(args) and func [space] (args) that weird.
I think you could fix this at commiting..

Please add:
Reported-and-Tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Comment 7 Emmanuele Bassi (:ebassi) 2013-10-07 11:18:39 UTC
Review of attachment 256505 [details] [review]:

looks okay, with minor comments.

::: clutter/clutter-table-layout.c
@@ +1292,3 @@
   columns = (DimensionData *) (void *) priv->columns->data;
 
+  total_min_width = MAX(priv->visible_cols - 1, 0) * (float) priv->col_spacing;

coding style: missing space.

also, this could simply be:

  total_min_width = MAX (((priv->visible_cols - 1) * (float) priv->col_spacing), 0)

as it's pretty much pointless to multiply by 0.

@@ +1332,3 @@
   rows = (DimensionData *) (void *) priv->rows->data;
 
+  total_min_height = MAX (priv->visible_rows - 1, 0) * (float) priv->row_spacing;

same as above, minus the coding style issue.
Comment 8 Emmanuele Bassi (:ebassi) 2013-10-07 11:20:11 UTC
Review of attachment 256506 [details] [review]:

looks good, with minor comments.

::: clutter/clutter-table-layout.c
@@ +884,3 @@
         }
 
+      pref_width += priv->col_spacing * MAX(priv->visible_cols - 1, 0);

coding style: missing space.

@@ +885,3 @@
 
+      pref_width += priv->col_spacing * MAX(priv->visible_cols - 1, 0);
+      min_width += priv->col_spacing * MAX(priv->visible_cols - 1, 0);

same as above.

@@ +1174,3 @@
         }
 
+      pref_height += priv->row_spacing * MAX(priv->visible_rows - 1, 0);

same as above.

@@ +1175,3 @@
 
+      pref_height += priv->row_spacing * MAX(priv->visible_rows - 1, 0);
+      min_height += priv->row_spacing * MAX(priv->visible_rows - 1, 0);

same as above.
Comment 9 Emmanuele Bassi (:ebassi) 2013-10-07 11:22:42 UTC
no need to use Reviewed-by; Tested-by is appreciated, by unnecessary as well: the link to Bugzilla contains all the required information.
Comment 10 Florian Müllner 2013-10-07 11:29:59 UTC
Attachment 256505 [details] pushed as 44b1a80 - table-layout: Fix size request when there are no visible rows/cols
Attachment 256506 [details] pushed as 3435d01 - table-layout: Base space calculations on visible children


(In reply to comment #7)
> also, this could simply be:
> 
>   total_min_width = MAX (((priv->visible_cols - 1) * (float)
> priv->col_spacing), 0)
> 
> as it's pretty much pointless to multiply by 0.

Yeah, I think MAX (cols - 1, 0) is a tad bit more clear, but not that much, so changed.