[PATCH] Use long instead of int when retrieving DIVE_DATE via gtk_tree_model_get

Dirk Hohndel dirk at hohndel.org
Wed Sep 19 16:21:03 PDT 2012


Excellent detective work, Lubomir!

I hope we can verify that with this the mysterious crashes are gone...

As to the other bug you had reported, I have root caused it and have a 
fix that needs some more tlc before I'm ready to commit it. It changes 
the way we try to find the best matching trip in rather subtle ways and 
I want to make sure there are no unintended side effects... Basically 
you found a dataset that managed to confuse the existing algorithm with 
the result that the trip data structure was no longer in chronological 
order. And that is a property that we heavily rely on...

/D
--
Sent from my phone. Please excuse brevity and text prediction errors.



On September 19, 2012 5:53:58 PM "Lubomir I. Ivanov" 
<neolit123 at gmail.com> wrote:
> ^ this patch is a replacement to the recent:
> [PATCH] Use gtk_tree_model_get_value() to get the index and date of a dive
>
> dirk i hope you see now what i meant by "varargs are usually less safer" :-).
>
> what i did to debug this one was pretty much stare at GTK and GLib's
> sources (ubuntu 12.04) for a couple of hours finding no bugs, other
> than that their code is not very pretty, with mixed indentations and
> also that GLib has huge macros in headers that will certainly bloat.
> the solution on the other hand was at a very obvious location...
>
> why this bug was local to only one x64 OS, i believe was due to a
> memory "issue", rather than a different glib implementation e.g. of
> G_VALUE_LCOPY, which is one of many examples how not to write macros
> as a C programmer, was the same all around.
>
> lubomir
> --




More information about the subsurface mailing list