Bug 467456 - Crash while attempting to edit a transaction
Summary: Crash while attempting to edit a transaction
Status: RESOLVED WORKSFORME
Alias: None
Product: kmymoney
Classification: Applications
Component: ux-ui (show other bugs)
Version: git (master)
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-16 19:44 UTC by Dawid Wróbel
Modified: 2024-05-08 03:46 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dawid Wróbel 2023-03-16 19:44:33 UTC
SUMMARY

qt.core.qabstractitemmodel.checkindex: Index QModelIndex(-1,-1,0x0,QObject(0x0)) is not valid (expected valid)
ASSERT: "checkIndex(index, CheckIndexOption::IndexIsValid)" in file /Users/cromo/Documents/Sourcecode/vcpkg/buildtrees/qt5-base/src/5.15.7-84bc9f0b01.clean/src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp, line 192

Full stack trace: 

2   libsystem_c.dylib             	       0x19b4fa2c8 abort + 180
3   kmymoney                      	       0x10705e120 qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&) + 28 (qlogging.cpp:1914)
4   kmymoney                      	       0x1076bac9c QMessageLogger::fatal(char const*, ...) const + 128 (qlogging.cpp:893)
5   kmymoney                      	       0x1076ba960 qt_assert(char const*, char const*, int) + 96 (qglobal.cpp:3366)
6   kmymoney                      	       0x10727f91c QConcatenateTablesProxyModel::data(QModelIndex const&, int) const + 128 (qconcatenatetablesproxymodel.cpp:192)
7   kmymoney                      	       0x107290458 QSortFilterProxyModel::data(QModelIndex const&, int) const + 152 (qsortfilterproxymodel.cpp:2259)
8   kmymoney                      	       0x106930000 QComboBoxPrivate::itemIcon(QModelIndex const&) const + 64 (qcombobox.cpp:1929)
9   kmymoney                      	       0x10692c4cc QComboBox::itemIcon(int) const + 136 (qcombobox.cpp:2390)
10  kmymoney                      	       0x10692b9f8 QComboBoxPrivate::updateLineEditGeometry() + 188 (qcombobox.cpp:1311)
11  kmymoney                      	       0x10692b914 QComboBoxPrivate::_q_modelReset() + 100 (qcombobox.cpp:294)
12  kmymoney                      	       0x10693733c QComboBox::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) + 812 (moc_qcombobox.cpp:311)
13  kmymoney                      	       0x1073108f0 void doActivate<false>(QObject*, int, void**) + 1916 (qobject.cpp:3931)
14  kmymoney                      	       0x10730f690 QMetaObject::activate(QObject*, QMetaObject const*, int, void**) + 112 (qobject.cpp:3979)
15  kmymoney                      	       0x107262430 QAbstractItemModel::modelReset(QAbstractItemModel::QPrivateSignal) + 92 (moc_qabstractitemmodel.cpp:648)
16  kmymoney                      	       0x1072623bc QAbstractItemModel::endResetModel() + 396 (qabstractitemmodel.cpp:3304)
17  kmymoney                      	       0x10728fdac QSortFilterProxyModel::setSourceModel(QAbstractItemModel*) + 2636 (qsortfilterproxymodel.cpp:2151)
18  kmymoney                      	       0x105564af0 KTagContainer::setModel(QAbstractItemModel*) + 60 (ktagcontainer.cpp:175)
19  kmymoney                      	       0x104ebf890 NewTransactionEditor::NewTransactionEditor(QWidget*, QString const&) + 1824 (newtransactioneditor.cpp:774)
20  kmymoney                      	       0x104ec3acc NewTransactionEditor::NewTransactionEditor(QWidget*, QString const&) + 44 (newtransactioneditor.cpp:712)
21  kmymoney                      	       0x104e89998 JournalDelegate::createEditor(QWidget*, QStyleOptionViewItem const&, QModelIndex const&) const + 1356 (journaldelegate.cpp:358)
22  kmymoney                      	       0x10501b720 DelegateProxy::createEditor(QWidget*, QStyleOptionViewItem const&, QModelIndex const&) const + 96 (delegateproxy.cpp:109)
23  kmymoney                      	       0x106ac7edc QAbstractItemViewPrivate::editor(QModelIndex const&, QStyleOptionViewItem const&) + 144 (qabstractitemview.cpp:4245)
24  kmymoney                      	       0x106ac5b74 QAbstractItemViewPrivate::openEditor(QModelIndex const&, QEvent*) + 220 (qabstractitemview.cpp:4430)
25  kmymoney                      	       0x106ac5718 QAbstractItemView::edit(QModelIndex const&, QAbstractItemView::EditTrigger, QEvent*) + 708 (qabstractitemview.cpp:2696)
26  kmymoney                      	       0x104e77578 LedgerView::edit(QModelIndex const&, QAbstractItemView::EditTrigger, QEvent*) + 432 (ledgerview.cpp:690)
27  kmymoney                      	       0x106ac261c QAbstractItemView::mouseDoubleClickEvent(QMouseEvent*) + 404 (qabstractitemview.cpp:1967)
28  kmymoney                      	       0x104e7a860 LedgerView::mouseDoubleClickEvent(QMouseEvent*) + 32 (ledgerview.cpp:955)
29  kmymoney                      	       0x10684354c QWidget::event(QEvent*) + 504 (qwidget.cpp:8673)
30  kmymoney                      	       0x106909d04 QFrame::event(QEvent*) + 76 (qframe.cpp:550)
31  kmymoney                      	       0x10690d158 QAbstractScrollArea::viewportEvent(QEvent*) + 288 (qabstractscrollarea.cpp:1095)
32  kmymoney                      	       0x106ac0e98 QAbstractItemView::viewportEvent(QEvent*) + 1000 (qabstractitemview.cpp:1747)
33  kmymoney                      	       0x104e78e5c LedgerView::viewportEvent(QEvent*) + 2892 (ledgerview.cpp:841)
34  kmymoney                      	       0x10690e6d0 QAbstractScrollAreaPrivate::viewportEvent(QEvent*) + 44 (qabstractscrollarea_p.h:111)
35  kmymoney                      	       0x10690e530 QAbstractScrollAreaFilter::eventFilter(QObject*, QEvent*) + 72 (qabstractscrollarea_p.h:122)
36  kmymoney                      	       0x1072bc894 QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) + 300 (qcoreapplication.cpp:1190)
37  kmymoney                      	       0x1067f21b0 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 420 (qapplication.cpp:3631)
38  kmymoney                      	       0x1067f459c QApplication::notify(QObject*, QEvent*) + 2744 (qapplication.cpp:3081)
39  kmymoney                      	       0x1072bc30c QCoreApplication::notifyInternal2(QObject*, QEvent*) + 320 (qcoreapplication.cpp:1064)
40  kmymoney                      	       0x1072bcffc QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) + 68 (qcoreapplication.cpp:1474)
41  kmymoney                      	       0x1067f31f4 QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) + 1060 (qapplication.cpp:2619)
42  kmymoney                      	       0x106869ea0 QWidgetWindow::handleMouseEvent(QMouseEvent*) + 3452 (qwidgetwindow.cpp:683)
43  kmymoney                      	       0x10686859c QWidgetWindow::event(QEvent*) + 636 (qwidgetwindow.cpp:300)
44  kmymoney                      	       0x1067f21e8 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 476 (qapplication.cpp:3637)
45  kmymoney                      	       0x1067f3f64 QApplication::notify(QObject*, QEvent*) + 1152 (qapplication.cpp:2977)
46  kmymoney                      	       0x1072bc30c QCoreApplication::notifyInternal2(QObject*, QEvent*) + 320 (qcoreapplication.cpp:1064)
47  kmymoney                      	       0x1072bcffc QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) + 68 (qcoreapplication.cpp:1474)
48  kmymoney                      	       0x1063a72fc QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) + 3452 (qguiapplication.cpp:2329)
49  kmymoney                      	       0x1063a5f10 QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) + 76 (qguiapplication.cpp:2005)
50  kmymoney                      	       0x1063910a8 QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 212 (qwindowsysteminterface.cpp:1169)
51  kmymoney                      	       0x106c68388 QCocoaEventDispatcherPrivate::processPostedEvents() + 332 (qcocoaeventdispatcher.mm:905)
52  kmymoney                      	       0x106c68e94 QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) + 84 (qcocoaeventdispatcher.mm:927)
53  CoreFoundation                	       0x19b6a1a08 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
54  CoreFoundation                	       0x19b6a199c __CFRunLoopDoSource0 + 176
55  CoreFoundation                	       0x19b6a170c __CFRunLoopDoSources0 + 244
56  CoreFoundation                	       0x19b6a0310 __CFRunLoopRun + 836
57  CoreFoundation                	       0x19b69f878 CFRunLoopRunSpecific + 612
58  HIToolbox                     	       0x1a4d7ffa0 RunCurrentEventLoopInMode + 292
59  HIToolbox                     	       0x1a4d7fc30 ReceiveNextEventCommon + 236
60  HIToolbox                     	       0x1a4d7fb2c _BlockUntilNextEventMatchingListInModeWithFilter + 72
61  AppKit                        	       0x19e92584c _DPSNextEvent + 632
62  AppKit                        	       0x19e9249dc -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728
63  AppKit                        	       0x19e918e0c -[NSApplication run] + 464
64  kmymoney                      	       0x106c6716c QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 924 (qcocoaeventdispatcher.mm:437)
65  kmymoney                      	       0x1072b76a4 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 128 (qeventloop.cpp:139)
66  kmymoney                      	       0x1072b789c QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 468 (qeventloop.cpp:232)
67  kmymoney                      	       0x1072bcc1c QCoreApplication::exec() + 388 (qcoreapplication.cpp:1375)
68  kmymoney                      	       0x1063a57c8 QGuiApplication::exec() + 20 (qguiapplication.cpp:1870)
69  kmymoney                      	       0x1067f3978 QApplication::exec() + 12 (qapplication.cpp:2829)
70  kmymoney                      	       0x104b40adc runKMyMoney(QApplication&, QUrl const&, bool) + 1052 (main.cpp:384)
71  kmymoney                      	       0x104b3f5cc main + 4764 (main.cpp:293)
72  dyld                          	       0x19b297e50 start + 2544


SOFTWARE/OS VERSIONS
macOS: 13.2.1
KDE Frameworks Version: 5.98
Qt Version: 5.15.7
Comment 1 Dawid Wróbel 2023-03-16 19:49:36 UTC
Immediate error is: 

Model for "G" loaded with 1 items in 0 ms
qt.core.qabstractitemmodel.checkindex: Index QModelIndex(-1,-1,0x0,QObject(0x0)) is not valid (expected valid)
ASSERT: "checkIndex(index, CheckIndexOption::IndexIsValid)" in file /Users/cromo/Documents/Sourcecode/vcpkg/buildtrees/qt5-base/src/5.15.7-84bc9f0b01.clean/src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp, line 192


this is a call from: 

QSortFilterProxyModel::setSourceModel(QAbstractItemModel *) qsortfilterproxymodel.cpp:2151
KTagContainer::setModel(QAbstractItemModel *) ktagcontainer.cpp:175
NewTransactionEditor::NewTransactionEditor(QWidget *, const QString &) newtransactioneditor.cpp:774
NewTransactionEditor::NewTransactionEditor(QWidget *, const QString &) newtransactioneditor.cpp:712

and before that:
d->ui->tagContainer->setModel(file->tagsModel()->modelWithEmptyItem());
Comment 2 Thomas Baumgart 2023-03-18 06:05:22 UTC
Git commit 7ba253659a13bc814b716eab4d0491f8194336eb by Thomas Baumgart.
Committed on 18/03/2023 at 06:04.
Pushed by tbaumgart into branch 'master'.

Try to fix crash due to invalid QModelIndex

Set source model on QComboBox not before the filter source model is set.

M  +4    -1    kmymoney/widgets/ktagcontainer.cpp

https://invent.kde.org/office/kmymoney/commit/7ba253659a13bc814b716eab4d0491f8194336eb
Comment 3 Thomas Baumgart 2024-04-08 17:43:36 UTC
Does this still happen with newer versions?
Comment 4 Bug Janitor Service 2024-04-23 03:47:11 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2024-05-08 03:46:05 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!