Crash when planning CCR dive

Paul Sargent paul.lionseye at icloud.com
Tue Dec 16 04:55:34 PST 2014


> On 15 Dec 2014, at 08:25, Robert C. Helling <helling at atdotde.de> wrote:
> 
> Paul,
> 
> unless I hear otherwise I would currently assume this issue is there for your binary/your build only. Could you make sure you are indeed building the latest master and nothing else? Perhaps do a make distclean and git reset —hard origin/master first and then start again with make.


Cleaned, reset, rebuilt, still getting it. Haven’t pulled today yet.

When I wrote the original mail I though this would be easy to reproduce and fix for people with better knowledge of the code Seeing as nobody else was able to replicate it, I decided to dig deeper. Maybe it’s something to do with my preferences or user setup, so best debugged on my machine. I could use some help understanding what I’m seeing though. (Tried on IRC, but my time zone is probably too early for people)

> Hmm, unless this is originating from uninitialized memory, a cylinder number -1 could only come from dive->oxygen_cylinder_index (or the corresponding function get_cylinder_idx_by_use() if no oxygen cylinder is defined. In the place you quote, however, since commit 13934b0f this should have been caught a few lines above. Are you sure you have that commit?

It is coming from that function (get_cylinder_idx_by_use), but it looks like it’s happening when it’s looking for a diluent in explicit_first_cylinder(). As the only gas in the gas list is listed as an "OC-gas”, it can’t find a diluent. Hence a -1 return value, which then gets populated into the plot_info by check_gas_change_events.

The only way I can spot of getting a gas set as DILUENT is by reading a file. I wonder if, as I’ve read no files, nothing is set as DILUENT. Either that or I’ve missed a code path.

Does any of that make sense?

Oh, and… 


> On 15 Dec 2014, at 15:22, Dirk Hohndel <dirk at hohndel.org> wrote:
> 
>> I am running without any other dives in the system. Starting Subsurface doesn’t load any dives automatically for me. I think that’s because I don’t save my dives in the default location as I have them in a synced folder across machines.
> 
> So simply edit the preferences and point them at the XML file in that
> folder...


I wasn’t really stating that as a problem (whilst testing things I prefer to not load my real dive log), just something that might be related to the crash. I’ll let the other response I got slide.

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20141216/a0d108d2/attachment-0001.html>


More information about the subsurface mailing list