[PATCH] Re: SubSurface Crash When changing a gas in diveplanner graph
Robert Helling
helling at atdotde.de
Fri Sep 11 07:00:25 PDT 2015
> On 11.09.2015, at 12:07, Guido Lerch <guido.lerch at gmail.com> wrote:
>
> <image.png>
> If I click EAN, crash ...
>
> I run this in debug more from QT Creator
> <image.png>
To analyze this further in the debugger I would double click on the line of level 7 in the stack trace (DivePlannerPointsModel::gas change(…) since that is the last line of subsurface code. This brings be into the definition of that method and I can inspect the local variables to see that we are calling with an index -1.
This is because we are trying to change the gas of a non-existing segement as changing the gas via the waypoint context menu means doing a gas change there and thus using the new gas on the following legs. Except for the last waypoint, there are no following legs as those are only inserted by the planner and that handles gases by itself.
So here is a patch that prevents offering a gas change there.
Best
Robert
--
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling Elite Master Course Theoretical and Mathematical Physics
Scientific Coordinator
Ludwig Maximilians Universitaet Muenchen, Dept. Physik
Phone: +49 89 2180-4523 Theresienstr. 39, rm. B339
http://www.atdotde.de
Enhance your privacy, use cryptography! My PGP keys have fingerprints
A9D1 A01D 13A5 31FA 6515 BB44 0820 367C 36BC 0C1D and
DCED 37B6 251C 7861 270D 5613 95C7 9D32 9A8D 9B8F
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150911/d3e3864d/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Don-t-offer-gas-selection-for-the-last-waypoint-in-pla.txt
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150911/d3e3864d/attachment.txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150911/d3e3864d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150911/d3e3864d/attachment.sig>
More information about the subsurface
mailing list