[PATCHES] Re: Problem with VPM-B in master

Rick Walsh rickmwalsh at gmail.com
Sat Aug 22 00:13:50 PDT 2015


Robert,

On 22 August 2015 at 01:32, Robert C. Helling <helling at atdotde.de> wrote:

> Rick,
>
> On 21 Aug 2015, at 10:48, Rick Walsh <rickmwalsh at gmail.com> wrote:
>
> It appears that the error didn't occur with the 100 m profile, but with
> shallow profiles that were calculated after entering gasses, but before
> entering all the depth information.  The red box with error messages wasn't
> visible while the planner was open, but is displayed after saving the plan.
>
>
>
> thanks for catching this! It turned out, this could be triggered by
> opening the planner with VPM-B on an empty log and just changing the gas to
> OXYGEN (in fact any nitrox with >=78% oxygen).
>
> This came about by a numerical instability when applying the Boyle law
> compensation when there is nothing to compensate for.
>
> Here are two patches of which the first should fix the issue (at least it
> does for me). Please test carefully!
>

Thanks for looking into this, but unfortunately, the fix hasn't fixed it
(using the latest master, which includes your fixes).  The second patch
makes it easier to see what works and what doesn't.  It definitely appears
to have something to do with the mix, and it only appears to occur on
shallow dives.  It also occurs when no deco gas is used.

For example, I get this error for a dive to 15 m for 20 min, with a single
gas, being either:
Nitrox >= 54% (N2 <= 46%)
Tx with 18% O2 and >= 41% He (N2 <= 41%)
Tx with 15% O2 and >= 44% He (N2 <= 41%)
Tx with 12% O2 and >= 46% He (N2 <= 42%)
Tx with 8% O2 and >= 49% He (N2 <= 43%)
Heliox of any mix

I also get the error for a dive to 15 m for 20 min, with tx 18/40 backgas,
and switching to >=90% Nitrox.

Note that the errors appear to be via calls to boyles_law from profile.c,
not planner.c, at least that's what's happened when I've picked it up.

Breakpoint 3, solve_cubic (A=1.165, B=-0.35799999999999998,
C=0.0049953556094827645) at /home/rick/src/subsurface/deco.c:342
342                     return 0.0;
(gdb) bt 10
#0  solve_cubic (A=1.165, B=-0.35799999999999998, C=0.0049953556094827645)
at /home/rick/src/subsurface/deco.c:342
#1  0x0000000000691355 in update_gradient (next_stop_pressure=1.165,
first_gradient=3.4473338663020643) at /home/rick/src/subsurface/deco.c:356
#2  0x00000000006914dc in boyles_law (next_stop_pressure=1.165) at
/home/rick/src/subsurface/deco.c:376
#3  0x00000000006bf528 in calculate_deco_information (dive=0xa83240
<displayed_dive>, dc=0xa83540 <displayed_dive+768>, pi=0xfb7540,
print_mode=false)
   at /home/rick/src/subsurface/profile.c:856
#4  0x00000000006c00fd in create_plot_info_new (dive=0xa83240
<displayed_dive>, dc=0xa83540 <displayed_dive+768>, pi=0xfb7540,
fast=false)
   at /home/rick/src/subsurface/profile.c:1083
#5  0x0000000000631770 in ProfileWidget2::plotDive (this=0xfb74d0, d=0x0,
force=true) at
/home/rick/src/subsurface/qt-ui/profile/profilewidget2.cpp:558
#6  0x000000000062ff35 in ProfileWidget2::replot (this=0xfb74d0) at
/home/rick/src/subsurface/qt-ui/profile/profilewidget2.cpp:350
#7  0x000000000065b84f in ProfileWidget2::qt_static_metacall (_o=0xfb74d0,
_c=QMetaObject::InvokeMetaMethod, _id=19, _a=0x7fffffffcf40)
   at /home/rick/src/subsurface/build/moc_profilewidget2.cpp:193
#8  0x00007ffff060115a in QMetaObject::activate(QObject*, int, int, void**)
() from /lib64/libQt5Core.so.5
#9  0x00007ffff067d26c in QAbstractItemModel::dataChanged(QModelIndex
const&, QModelIndex const&, QVector<int> const&) () from
/lib64/libQt5Core.so.5
(More stack frames follow...)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150822/6b192211/attachment-0001.html>


More information about the subsurface mailing list