planner and dive add should work now

Dirk Hohndel dirk at hohndel.org
Thu May 29 07:16:37 PDT 2014


Hi Henrik,

I'm so happy to see email from you on the mailing list.
Welcome back!

On Thu, May 29, 2014 at 03:23:26PM +0200, Henrik Brautaset Aronsen wrote:
> Dirk Hohndel wrote:
> >I ran Subsurface under Valgrind and that quickly pointed out a few more
> >issues. With the latest changes I pushed I believe add dive and the
> >planner are now functional and random combinations of them no longer crash
> >Subsurface or confuse the dive list.
> >
> >I would really appreciate if people could try HARD to break this... there
> >were some rather subtle yet nasty bugs in the code.
> 
> 
> Nice work everyone!  I stumbled upon a couple of things:

Thanks - and I was assuming you would :-)

> 1) As I planned a dive (10 mins @ 58 meters with 18/45 and 50%) I noticed
> that the MOD, EAD and EADD was wrong:  57, 56 & 56m, while it should be
> something like 68, 23 and 33.  See
> https://dl.dropboxusercontent.com/u/1087529/planner1.png

OOps.

> 2) The background on that plan is red, which leads me to believe that
> something is wrong?  Maybe related to the wrong values in 1)?

As Tomaz said - part of your plan went above the ceiling.
My guess is that this is the discrepancy between the plan using the gases
you entered, but for reasons I haven't figured out, yet, the profile
doesn't.
Hmm, looking again - you do have what looks like a gas change event at the
right depth.
Strange. But since I can reproduce it I'm sure we can figure this out.

> 3) When I save the dive, the values from 1) change.  Still wrong:  18, 32 &
> 60m.   See https://dl.dropboxusercontent.com/u/1087529/planner2.png.  The
> ssrf file is here: https://dl.dropboxusercontent.com/u/1087529/planner.ssrf

Is this an issue of different PO2 assumptions? I thought that this was
reasonably well tested...
No, it seems that the whole dive in the ssrf is shown as if done at EAN50
(which given the depth might be a wee bit fatal). Your max PO2 when
opening the ssrf is 3.35...
 
> 4) 18/45 is nicely shown on the graph when I use that gas, but EAN50 isn't
> shown after the gas switch.

Something is completely wonky with the gas calculations:

  <cylinder size='11.1 l' workpressure='200.0 bar' description='S80' o2='50.0%' start='200.0 bar' end='190486.117 bar' />
  <cylinder size='24.0 l' workpressure='232.0 bar' description='D12' o2='18.0%' he='45.0%' start='232.0 bar' end='232.0 bar' />

Look at the beginning and end pressures...
Robert, can you track this down?
Strangely, for me Subsurface shows this as 200->190bar - which is
creative, but not correct, either.

> 5) I got a crash when planning a second dive, but I haven't been able to
> reproduce it: https://dl.dropboxusercontent.com/u/1087529/plannercrash.txt

This looks like it's in the Qt redraw code. Thiago, does any of this look
familiar?
Henrik, which Qt version? Built it yourself, came from Homebrew or
MacPorts?

As expected, things aren't quite there yet. But now we can test again and
tackle the bugs one by one.

/D


More information about the subsurface mailing list