Dive download crash - Qt model issues

Stefan Fuchs sfuchs at gmx.de
Sat Jun 24 11:01:49 PDT 2017


Hi All,

Am 24.06.2017 um 19:24 schrieb Dirk Hohndel:
>
> This is one of the ASSERTs in Qt that are compiled out in production code,
> so I'm pretty sure those with my binaries or who are compiling from source
> using standard Qt libraries won't see it.
>
>> Now, it may be that (once more) this is because I run my self-compiled
>> Qt, and apparently it ends up adding more sanity checks and asserts
>> when built in developer mode. So maybe it's not so reproducible for
>> others as it is for me.
>>
>> The relevant gdb back-trace seems to be:
>>
>> DownloadFromDCWidget::on_downloadCancelRetryButton_clicked() ->
>>  DiveImportedModel::clearTable() ->
>>    QAbstractItemModel::beginRemoveRows()
> That should be easy to fix. In clearTable() do as the first line
>
> if (lastIndex < firstIndex)
> 	return;
>
> and you shouldn't see this crash anymore.
Just as a side note: Dirk and I already fixed s.th. very similar in this
part of the code some time ago:
https://github.com/Subsurface-divelog/subsurface/commit/02e768a61beda2730efff1e84f5e5b7341418acf
https://github.com/Subsurface-divelog/subsurface/issues/332

Best regards
Stefan

-- 

Stefan Fuchs
E-Mail: sfuchs at gmx.de <mailto:sfuchs at gmx.de>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20170624/c728cc18/attachment.html>


More information about the subsurface mailing list