Bug 459556

Summary: SIGABRT ASSERT:isValid() on Q_EMIT dataChanged(first, last) in JournalModel::resetRowHeightInformation()
Product: [Applications] kmymoney Reporter: Dawid Wróbel <me>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal CC: ralf.habacker
Priority: NOR    
Version: git (master)   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In: 5.1.0
Sentry Crash Report:

Description Dawid Wróbel 2022-09-23 09:32:23 UTC
SUMMARY
This is happening upon application launch in JournalModel::resetRowHeightInformation(). rowCount() is 0, making lastRow equal to -1, which passed to index(lastRow, columnCount() - 1) makes it fail the isValid() assertion.

Not sure why this started to happen all of the sudden, didn't have this issue before and the code changes don't explain it.
Comment 1 Dawid Wróbel 2022-09-23 09:38:22 UTC
Git commit 4bc3685c52e4c0afce519885961ae51f3c7f4a7e by Dawid Wróbel.
Committed on 23/09/2022 at 09:35.
Pushed by wrobelda into branch 'master'.

resetRowHeightInformation(): check index isValid() before Q_EMIT

M  +4    -1    kmymoney/mymoney/storage/journalmodel.cpp

https://invent.kde.org/office/kmymoney/commit/4bc3685c52e4c0afce519885961ae51f3c7f4a7e