Crash when showing yearly statistics

Miika Turkia miika.turkia at gmail.com
Sat Nov 30 04:43:44 UTC 2013


On Sat, Nov 30, 2013 at 1:45 PM, Robert C. Helling <helling at atdotde.de>wrote:

>
> On 30 Nov 2013, at 11:50, Robert C. Helling <helling at atdotde.de> wrote:
>
> I am on it.
>
>
> Hmm, turns out I don’t understand C++ well enough.
>
> The problem seems to occur when there is no trip among the dives. For
> example, you can trigger it with
>
> ./subsurface dives/test1.xml
>
> Then in the statistics, below the row for the only year with dives (2011
> in that case) there is another line, not in bold face,
> where YearStatisticsItem::data is called with a bogus value of
> stats_interval. This in turn is a private member of that class. This is how
> far I got. Unfortunately, I don’t really understand where that method is
> called and how stats_interval is supposed to be set, git grep
> stats_interval did not help.
>

I just sent a patch for this. It turned out that the header line is
printed, even if there are no trips at all. And we get a division by zero
in this case as the stats_interval.selection_size is 0.

miika
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20131130/92e16e21/attachment.html>


More information about the subsurface mailing list