CSV import crash

Dirk Hohndel dirk at hohndel.org
Thu Jan 29 12:44:58 PST 2015


On Thu, Jan 29, 2015 at 08:47:30PM +0100, Robert Helling wrote:
> Hi,
> 
> > On 29 Jan 2015, at 20:01, Dirk Hohndel <dirk at hohndel.org <mailto:dirk at hohndel.org>> wrote:
> > 
> > And it doesn't crash on my Mac, either.
> > 
> > Can you give more data? Which git version of Subsurface? How did you build
> > it (i.e., which Qt, what tool chain)? Can you reproduce this with the
> > daily binaries from this morning?
> 
> it does crash for me. The last subsurface code on the stack is line 437 of divelogimportdialog.cpp
> 
> 			headers.replace(CSVApps[value].time, tr("Sample time"));

That's not line 437 in master... that's 473

> I have no idea, what this is but I can tell CSCApps is != NULL, value == 3  and there the assertion
>     Q_ASSERT_X(i >= 0 && i < p.size(), "QList<T>::replace", "index out of range");

Yes, we are accessing elements outside of the string list.

> of the replace method fails with „index out of range“ as headers has only one item.

I don't understand why this doesn't fail for me, but I know how to fix it.

/D


More information about the subsurface mailing list