Bug 1598587 Comment 1 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Bug 1562158 would have been my first suspect too.
But looking through the code, I can't see anything obviously borked there.

I can't get that line to assert when I run the `composition/test-send-button.js` mozmill test locally (see below for the asserts I do get)

The assert occurs when the number of selected items we get from the selection ranges of a nsITreeSelection differs from the `nsITreeSelection`s `count` attribute.

This could happen if:

1. the nsITreeSelection has elements selected which are out of the view's range (ie non-existent elements)
2. the nsITreeSelection is returning overlapping ranges.

My money is on 1. The nsTreeSelection implementation code aims to cope with merging overlapping ranges and it looks solid. I'm sure it's been well exercised over the years. I think overlapping ranges would have been noticed before. The implementation has a couple of oddities, but overall looks good.

I think things are being selected outside the view. Maybe something's being deleted and the selection hasn't been updated accordingly...

Anyway, I've just added a bunch of asserts for a try run to catch both 1 and 2 above:
https://hg.mozilla.org/try-comm-central/rev/b65b47c9a47990e275f80d1bd2f80c3515c1e57d

try run:
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=afd243cd907b3de75750912b2432dc1cd9c5e013


The asserts I do get on `composition/test-send-button.js`:
```
[36909, Main Thread] ###!!! ASSERTION: Table inline-size is less than the sum of its columns' min inline-sizes: '!(aISizeType == BTLS_FINAL_ISIZE && aISize < guess_min)', file /fast/ben/tb/mozilla/layout/tables/BasicTableLayoutStrategy.cpp, line 760

[36909, Main Thread] ###!!! ASSERTION: didn't subtract all that we added: '(space == 0 || space == nscoord_MAX) && ((l2t == FLEX_PCT_LARGE) ? (-0.001f < basis.f && basis.f < 0.001f) : (basis.c == 0 || basis.c == nscoord_MAX))', file /fast/ben/tb/mozilla/layout/tables/BasicTableLayoutStrategy.cpp, line 987
```
Could conceivably be masking things. I haven't dug into these in detail, but from experience I've noticed treeview widgets tend to use table layouts... so it could be the same bug manifesting differently.
Bug 1562158 would have been my first suspect too.
But looking through the code, I can't see anything obviously borked there.

I can't get that line to assert when I run the `composition/test-send-button.js` mozmill test locally (see below for the asserts I do get)

The assert occurs when the number of selected items we get from the selection ranges of a nsITreeSelection differs from the `nsITreeSelection`s `count` attribute.

This could happen if:

1. the nsITreeSelection has elements selected which are out of the view's range (ie non-existent elements)
2. the nsITreeSelection is returning overlapping ranges.

My money is on 1. The nsTreeSelection implementation code aims to cope with merging overlapping ranges and it looks solid. I'm sure it's been well exercised over the years. I think overlapping ranges would have been noticed before. The implementation has a couple of oddities, but overall looks good.

I think things are being selected outside the view. Maybe something's being deleted and the selection hasn't been updated accordingly...

Anyway, I've just added a bunch of asserts for a try run to catch both 1 and 2 above:
https://hg.mozilla.org/try-comm-central/rev/9f5877ad6f66e63d35894d199e56b9a60059d65f

try run:
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=a6a07fd24a9fc06fa93ba5697504f239cb59e7bb

The asserts I do get on `composition/test-send-button.js`:
```
[36909, Main Thread] ###!!! ASSERTION: Table inline-size is less than the sum of its columns' min inline-sizes: '!(aISizeType == BTLS_FINAL_ISIZE && aISize < guess_min)', file /fast/ben/tb/mozilla/layout/tables/BasicTableLayoutStrategy.cpp, line 760

[36909, Main Thread] ###!!! ASSERTION: didn't subtract all that we added: '(space == 0 || space == nscoord_MAX) && ((l2t == FLEX_PCT_LARGE) ? (-0.001f < basis.f && basis.f < 0.001f) : (basis.c == 0 || basis.c == nscoord_MAX))', file /fast/ben/tb/mozilla/layout/tables/BasicTableLayoutStrategy.cpp, line 987
```
Could conceivably be masking things. I haven't dug into these in detail, but from experience I've noticed treeview widgets tend to use table layouts... so it could be the same bug manifesting differently.

Back to Bug 1598587 Comment 1