<div dir="ltr">Hi Robert,<div><br></div><div>We are calling this with i= -1</div><div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">     </span><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">i</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">index</span><span style="color:rgb(0,0,0)">.</span><span style="color:rgb(0,0,0)">row</span><span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">     </span><span style="color:rgb(128,0,128)">gasmix</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">oldgas</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">divepoints</span><span style="color:rgb(0,0,0)">[</span><span style="color:rgb(0,0,0)">i</span><span style="color:rgb(0,0,0)">].</span><span style="color:rgb(128,0,0)">gasmix</span><span style="color:rgb(0,0,0)">;</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">When testing for -1 and returning if true, you can set the gas mix to all other</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">divepoints but never to this one, hence I dont beleive that</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">if ( i < 0 ) return;</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#000000">would do a proper job.</font></pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#000000"><br></font></pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#000000">You want me to investigate further and provide a patch if I can ?</font></pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#000000"><br></font></pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#000000">It's my birthday to day, so this would have to wait till Monday :-)</font></pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#000000"><br></font></pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#000000">Have all a great weekend.</font></pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#000000"><br></font></pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#000000">G.</font></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)"><br></span></pre></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-11 16:00 GMT+02:00 Robert Helling <span dir="ltr"><<a href="mailto:helling@atdotde.de" target="_blank">helling@atdotde.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><blockquote type="cite"><div>On 11.09.2015, at 12:07, Guido Lerch <<a href="mailto:guido.lerch@gmail.com" target="_blank">guido.lerch@gmail.com</a>> wrote:</div><br><div><div dir="ltr"><span><image.png></span><span class=""><br><div>If I click EAN, crash ...</div><div><br></div><div>I run this in debug more from QT Creator</div></span><div><span><image.png></span><br></div></div></div></blockquote></div><div><br></div>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.<div><br></div><div>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.</div><div><br></div><div>So here is a patch that prevents offering a gas change there.</div><div><br></div><div>Best</div><span class="HOEnZb"><font color="#888888"><div>Robert</div><div><br></div><div></div></font></span></div><br><div style="word-wrap:break-word"><div><br><div>
<div style="color:rgb(0,0,0);font-family:Menlo;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);font-family:Menlo;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);font-family:Menlo;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);font-family:Menlo;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><br>-- <br>.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO<br>Robert C. Helling     Elite Master Course Theoretical and Mathematical Physics<br>                      Scientific Coordinator<br>                      Ludwig Maximilians Universitaet Muenchen, Dept. Physik<br>                      Phone: <a href="tel:%2B49%2089%202180-4523" value="+498921804523" target="_blank">+49 89 2180-4523</a>  Theresienstr. 39, rm. B339<br>                      <a href="http://www.atdotde.de" target="_blank">http://www.atdotde.de</a></div><div style="color:rgb(0,0,0);font-family:Menlo;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><br></div><div style="color:rgb(0,0,0);font-family:Menlo;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">Enhance your privacy, use cryptography! My PGP keys have fingerprints</div><div style="color:rgb(0,0,0);font-family:Menlo;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">A9D1 A01D 13A5 31FA 6515  BB44 0820 367C 36BC 0C1D    and</div><div style="color:rgb(0,0,0);font-family:Menlo;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">DCED 37B6 251C 7861 270D  5613 95C7 9D32 9A8D 9B8F</div><div style="color:rgb(0,0,0);font-family:Menlo;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><br></div></div></div><br></div><br><br>
</div>
<br></div></div><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Best regards,<div>Guido</div></div></div>
</div>