<p dir="ltr">Sure, I'll give it a go and get back to you. It'll have to be after work though. </p>
<p dir="ltr">Paul</p>
<div class="gmail_quote">On 15 Dec 2014 08:25, "Robert C. Helling" <helling@atdotde.de> wrote:<br type='attribution'><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Paul,</div><div><br /></div><div>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.</div><br /><div><blockquote><div>On 14.12.2014, at 15:39, Paul Sargent <<a href="mailto:paul.lionseye@icloud.com">paul.lionseye@icloud.com</a>> wrote:</div><br /><div></div></blockquote></div></div><div style="word-wrap:break-word">This is on the current head (9fe458ea2e30), running on Mac OS 10.10.1.<div><br /></div><div>What I did was:</div><div><br /></div><div><div><font face="Inconsolata"># make clean</font></div><div><font face="Inconsolata"># qmake INCLUDEPATH+="/usr/local/include /usr/local/Cellar/sqlite/3.8.7.1/include" LIBS+="-L/usr/local/Cellar/sqlite/3.8.7.1/lib -L/usr/local/lib" -config debug</font></div></div><div><font face="Inconsolata"># make</font></div><div><font face="Inconsolata"># open Subsurface.app</font></div></div><div><br /></div><div>BTW, in my Mac build directories, I created a soft link <span style="font-size:11px">subsurface -> Subsurface.app/Contents/MacOS/Subsurface so I can run the binary as</span></div><div><span style="font-size:11px"><br /></span></div><div><span style="font-size:11px">./subsurface</span></div><div><span style="font-size:11px"><br /></span></div><div><span style="font-size:11px">which gives me STDOUT/STDERR on the terminal (which opening the Subsurface.app doesn’t). The disadvantage is that this runs it without an icon and the window opens in the back rather than in the front.</span></div><br /><blockquote><div style="word-wrap:break-word"><div>Attaching the debugger gave:</div><div><br /></div><div><div><font face="Inconsolata">* thread #1: tid = 0x7eef0, 0x00000001084e41c3 subsurface`fill_missing_tank_pressures(dive=0x00038a4008774e80, pi=0x00007fff5774eef8, track_pr=0x00007fff5774ec20, o2_flag=false) + 675 at gaspressures.c:301, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)</font></div><div><font face="Inconsolata">    frame #0: 0x00000001084e41c3 subsurface`fill_missing_tank_pressures(dive=0x00038a4008774e80, pi=0x00007fff5774eef8, track_pr=0x00007fff5774ec20, o2_flag=false) + 675 at gaspressures.c:301</font></div><div><font face="Inconsolata">   298</font></div><div><font face="Inconsolata">   299 <span style="white-space:pre">                     </span>// If there is a valid segment but no tank pressure ..</font></div><div><font face="Inconsolata">   300 <span style="white-space:pre">                 </span>interpolate = get_pr_interpolate_data(segment, pi, i, pressure); // Set up an interpolation structure</font></div><div><font face="Inconsolata">-> 301 <span style="white-space:pre">                     </span>if(dive->cylinder[cyl].cylinder_use == OC_GAS) {</font></div><div><font face="Inconsolata">   302</font></div><div><font face="Inconsolata">   303 <span style="white-space:pre">                               </span>/* if this segment has pressure_time, then calculate a new interpolated pressure */</font></div><div><font face="Inconsolata">   304 <span style="white-space:pre">                            </span>if (interpolate.pressure_time) {</font></div></div><div><font face="Inconsolata"><br /></font></div><div><div><font face="Inconsolata">(lldb) p cyl</font></div><div><font face="Inconsolata">(int) $0 = -1</font></div></div></div></blockquote><div><br /></div><div>Hmm, unless this is originating from uninitialized memory, a cylinder number -1 could only come from <span style="font-size:11px">dive->oxygen_cylinder_index (or the corresponding function </span><b style="color:rgb( 195 , 55 , 32 );font-size:11px">get_cylinder</b><span style="font-size:11px">_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?</span></div><div><span style="font-size:11px"><br /></span></div><div><span style="font-size:11px">Best</span></div><div><span style="font-size:11px">Robert</span></div><div><span style="font-size:11px"><br /></span></div><br /></blockquote></div>