[BUG] Default sorting order and deleting a trip, while switching sorting orders

Linus Torvalds torvalds at linux-foundation.org
Tue Feb 19 10:33:11 PST 2013


On Tue, Feb 19, 2013 at 10:20 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
>
> This has no SOB... do you want me to apply it?

I re-sent with a SOB and commit message (but maybe you want to expand on that)

> What's your confidence level on "solves bug" vs. "causes possible new
> ones"?

It definitely solves a bug, and the bug behavior is actually very
nasty - dives just disappear from the list as Lubomir noted.

It's possible that the bug could be fixed by fixing whatever was wrong
in the gtk tree model walker, but I couldn't understand it, and I
don't really think it's even fixable (removing a trip will "free" all
the dives in that trip, but now those free'd dives need to be sorted
wrt *other* dives and trips that existed before outside that trip, and
doing that with the gtk list sounds basically impossible.

So I think the patch is needed.

As to whether it could expose new bugs - sure. That said, it really
does simplify the code a lot, and the whole pattern of "let's just
change our data structures and then re-create the whole dive list" is
something we already depend on working in other places. So there may
certainly be bugs there, but I don't think they'd be new bugs per se,
perhaps just exposing existing bugs by making them easier to trigger..

And the gtk tree model walking really cannot work. See the other patch
that converted the "remove dive from trip" case, which had similar
issues: removing a dive isn't just moving it to the top level, you
have to re-order things wrt that new top-level setup etc..

            Linus


More information about the subsurface mailing list