Summary: | Segfault after hiding reconciled transactions | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | Dawid Wróbel <me> |
Component: | general | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | RESOLVED WORKSFORME | ||
Severity: | crash | CC: | ralf.habacker |
Priority: | NOR | ||
Version First Reported In: | git (master) | ||
Target Milestone: | --- | ||
Platform: | macOS (DMG) | ||
OS: | macOS | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Backtrace with QTimer event involved |
Description
Dawid Wróbel
2023-05-24 19:53:31 UTC
Should we keep this open since you cannot reproduce the problem or simply close it? (In reply to Dawid Wróbel from comment #0) > LedgerSortProxyModel::setHideReconciledTransactions(bool) + 4 In KTagsView::showEvent() there is a connect between changed settings event and this method as target: connect(LedgerViewSettings::instance(), &LedgerViewSettings::settingsChanged, this, [&]() { Q_D(KTagsView); d->m_transactionFilter->setHideReconciledTransactions(LedgerViewSettings::instance()->hideReconciledTransactions()); d->m_transactionFilter->setHideTransactionsBefore(LedgerViewSettings::instance()->hideTransactionsBefore()); It crashes when d->m_transactionFilter is null. I didn't see any disconnection in the constructor. If the mentioned event is triggered after this object has already been destroyed, this can happen. A similar pattern is also used in the KPayeesView and LedgerViewPage classes. (In reply to Ralf Habacker from comment #2) > It crashes when d->m_transactionFilter is null. I didn't see any disconnection in the constructor. S/constructor/destructor Connections are automatically removed when either the sender or the receiver object gets destroyed. Also, as a side note, it seems that the private data pointed to by d gets deleted prior to filter object pointed to by m_transactionFilter. Since the connection is only setup when d and m_transactionFilter are not null I don't see a problem here. The original BT shows that something happened due to a QTimer event. Created attachment 172575 [details]
Backtrace with QTimer event involved
This backtrace is generated after switching the state of the "view"->"hide reconciled transaction" menu entry.
How can I duplicate/provoke this problem? I tried a few things but never got a crash. It always works for me, so there must be something I am missing / doing different. 🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME. For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging. Thank you for helping us make KDE software even better for everyone! 🐛🧹 This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME. |