Bug 341040

Summary: Crash after clicking Merge while in edit field during split transaction edit
Product: [Applications] kmymoney Reporter: Eduard Sukharev <kraplax>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: crash CC: onet.cristian
Priority: NOR    
Version: 4.7.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
URL: http://imgbin.org/index.php?page=image&id=20948
Latest Commit: Version Fixed In: 4.7.2
Sentry Crash Report:

Description Eduard Sukharev 2014-11-17 08:14:00 UTC
Merge button breaks widgets layout if pressed during split operations edit, which then leads to crash

Reproducible: Always

Steps to Reproduce:
Steps to reproduce:
0. Given that kmymoney account and some categories are setup
1. Go to Ledgers
2. Start adding new
3. Press "Split transaction" button (the one to the right from "Category" dropdown)
4. In split transaction view add to operations with same category, any memo and any amount
4.1 Ensure that "Merge" button became enabled (clickable)
5. Start editing any of the created operations
6. Click "Merge" button while the cursor is in any of the editable fields
6.1 Observe the broken widgets layout (see screenshot linked)
7. Accept operation edits

Actual Results:  
After step 6 widgets layout is broken.
After step 7 KMymoney Crashes

Expected Results:  
Merge button should either be disabled during operation edit or behave correctly.

This can actually be reproduced in 4.7.1 but i couldn't find the corresponding version in bugtracker
Comment 1 Cristian Oneț 2014-11-17 08:21:05 UTC
I can confirm this.
Comment 2 Cristian Oneț 2014-11-22 20:56:28 UTC
Git commit bdfaa51c9e85a642e39822a2a378a87d42941558 by Cristian Oneț.
Committed on 22/11/2014 at 16:37.
Pushed by conet into branch 'master'.

Disable 'Merge' and 'Clear zero' actions while editing splits.

Modifying the split table while it's in edit can cause a crash so
disable these action while in edit.

M  +4    -0    kmymoney/dialogs/kmymoneysplittable.cpp
M  +10   -0    kmymoney/dialogs/kmymoneysplittable.h
M  +15   -4    kmymoney/dialogs/ksplittransactiondlg.cpp
M  +2    -0    kmymoney/dialogs/ksplittransactiondlg.h

http://commits.kde.org/kmymoney/bdfaa51c9e85a642e39822a2a378a87d42941558
Comment 3 Cristian Oneț 2014-11-22 20:57:12 UTC
Git commit ef431608d5fc4a122793c63fb9e863a2191fd739 by Cristian Oneț.
Committed on 22/11/2014 at 16:37.
Pushed by conet into branch '4.7'.

Disable 'Merge' and 'Clear zero' actions while editing splits.

Modifying the split table while it's in edit can cause a crash so
disable these action while in edit.
(cherry picked from commit bdfaa51c9e85a642e39822a2a378a87d42941558)

M  +4    -0    kmymoney/dialogs/kmymoneysplittable.cpp
M  +10   -0    kmymoney/dialogs/kmymoneysplittable.h
M  +15   -4    kmymoney/dialogs/ksplittransactiondlg.cpp
M  +2    -0    kmymoney/dialogs/ksplittransactiondlg.h

http://commits.kde.org/kmymoney/ef431608d5fc4a122793c63fb9e863a2191fd739