<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 13 July 2015 at 22:49, Dirk Hohndel <span dir="ltr"><<a href="mailto:dirk@hohndel.org" target="_blank">dirk@hohndel.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Jul 13, 2015 at 10:40:53PM +1000, Rick Walsh wrote:<br>
> We only use three levels of taxonomy, but we were attempting to free memory<br>
> for seven.  This led to some fun invalid point crashes.<br>
><br>
> Please check I'm not way off the mark, but it definitely appears to fix the<br>
> crashes I was getting.<br>
<br>
</span>I'm surprised this fixes your crashes.<br>
We actually store as many levels as we get back from the service - we just<br>
SHOW only three levels. And the other pointers SHOULD be NULL and<br>
therefore freeing them should be no problem.<br>
<br>
So I think your patch is wrong in that it will leak memory. </blockquote><div><br>I hoped the cause was as simple as I thought, but a leaky fix to hide a problem isn't all that helpful.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">But since we<br>
are already tracking how many entries we have, we might as well use that<br>
to limit how many pointers we free. I'll make a similar commit in a moment<br>
and would like you to test if that fixes your problem as well.<br>
<br>
Thanks for working on tracking this down.<br>
<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div>I just tried the latest master, including your fix.  I have bridge foundations to design so haven't taken the time to understand how it works, and how that differs from before, but I can say that it appears to have fixed the problem. I.e. I can use the up/down arrows to scroll through my entire dive list, whereas previously it would semi-reliably crash after ~20 dives.<br><br></div><div>Thanks,<br><br></div><div>Rick<br></div></div><br></div></div>