Summary: | Crash when editing splits in a transaction | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | Ian Neal <iannbugzilla> |
Component: | general | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | ralf.habacker |
Priority: | NOR | Keywords: | drkonqi |
Version First Reported In: | 5.1.2 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 5.2.0 | |
Sentry Crash Report: |
Description
Ian Neal
2022-12-09 19:08:17 UTC
STR 1. Create a scheduled transaction with splits 2. Edit the scheduled transaction 3. On one of the splits alter the amount then hit CR twice very quickly 4. When prompted go back to editing the split 5. Loop back to step 3 for around 15-20 times. Expected result 1. Popup entitled "Enter Split" with message "You need to assign a category to this split before it can be entered." which, when acknowledge, goes back to split transaction screen. Actual result 1. Popup entitled "Enter Split" with message "You need to assign a category to this split before it can be entered." which, when acknowledge, crashes / hangs KMyMoney. I'm not sure if this is due to the number of times the field is being edited or how quickly the enter/CR key is hit. *** Bug 462026 has been marked as a duplicate of this bug. *** Easier STR: 1. Create a scheduled transaction with splits 2. Edit the scheduled transaction 3. On one of the splits alter the amount then hit CR and Enter at the same time (easier than trying to do it twice quickly). Tested using kmymoney-5.1-327-linux-gcc-x86_64.AppImage - that also crashes Ian reported on IRC that he is not able to reproduce it with a version generated from master, so this is a 5.1 problem only. Just for clarification, is this when editing splits in a transaction in the ledger, or when editing splits in a scheduled transaction? (In reply to Jack from comment #6) > Just for clarification, is this when editing splits in a transaction in the > ledger, or when editing splits in a scheduled transaction? I have checked, it crashes both for a scheduled transaction and a transaction that is already in the ledger. I have tested editing a scheduled transaction both in the ledger view and the scheduled transactions view - it crashes in both. (In reply to Ian Neal from comment #0) > [KCrash Handler] > #4 0x00007f1fdb5eb750 in QWidget::setFocus(Qt::FocusReason) () at > /lib64/libQt5Widgets.so.5 > #5 0x000055671ba799e9 in KMyMoneySplitTable::endEdit(bool, bool) () > #6 0x00007f1fd7ad2ec4 in QObject::event(QEvent*) () at > /lib64/libQt5Core.so.5 It looks, that if the edit split is not valid in KMyMoneySplitTable::endEdit(), d->m_editCategory is accessed, which may be unset or zero. if (!isEditSplitValid()) { KMessageBox::information(this, i18n("You need to assign a category to this split before it can be entered."), i18n("Enter split"), "EnterSplitWithEmptyCategory"); d->m_editCategory->setFocus(); return; Changing to if (d->m_editCategory) d->m_editCategory->setFocus(); should solve the crash. The corresponding implementation was revised with version 5.2.0 and the problem should be solved. If it occurs again, please open this ticket again with updated test information. |