Bug 294408 - crash when editing split transaction
Summary: crash when editing split transaction
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: git (master)
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
: 272861 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-02-19 08:34 UTC by MK
Modified: 2013-09-12 21:30 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot of two editable lines in split transaction (28.36 KB, image/png)
2012-08-25 09:34 UTC, MK
Details
New crash information added by DrKonqi (6.36 KB, text/plain)
2013-09-12 21:06 UTC, Cristian Oneț
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MK 2012-02-19 08:34:30 UTC
Application: kmymoney (4.6.90-da69efb40e)
KDE Platform Version: 4.7.4 (4.7.4)
Qt Version: 4.7.4
Operating System: Linux 3.0.0-16-generic x86_64
Distribution: Ubuntu 11.10

-- Information about the crash:
- What I was doing when the application crashed:

I tried to edit a split transaction, which had been duplicated from a previous entry in the ledger. While re-assigning the categories suddenly two editable lines appeared. I tried to close one of the lines by clicking on the checkbox - then the crash occured.

-- Backtrace:
Application: KMyMoney (kmymoney), signal: Segmentation fault
[KCrash Handler]
#6  0x000000000045d2f8 in QString::isEmpty (this=0x50) at /usr/include/qt4/QtCore/qstring.h:708
#7  0x00000000006f00bf in kMyMoneySplitTable::endEdit (this=0x59e7eb0, keyBoardDriven=false) at /usr/local/src/git_repo/kmymoney/kmymoney/dialogs/kmymoneysplittable.cpp:655
#8  0x00000000006f001b in kMyMoneySplitTable::slotEndEdit (this=0x59e7eb0) at /usr/local/src/git_repo/kmymoney/kmymoney/dialogs/kmymoneysplittable.cpp:640
#9  0x00000000006f2654 in kMyMoneySplitTable::qt_metacall (this=0x59e7eb0, _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0x7fffb4e680c0) at /usr/local/src/git_repo/kmymoney/debug/kmymoney/dialogs/kmymoneysplittable.moc:112
#10 0x00007f5f8ac9aeba in QMetaObject::activate (sender=0x68bbe80, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fffb4e680c0) at kernel/qobject.cpp:3278
#11 0x00007f5f8a42f642 in QAbstractButton::clicked (this=<optimized out>, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:206
#12 0x00007f5f8a1751fe in QAbstractButtonPrivate::emitClicked (this=<optimized out>) at widgets/qabstractbutton.cpp:546
#13 0x00007f5f8a17653b in QAbstractButtonPrivate::click (this=0x689da20) at widgets/qabstractbutton.cpp:539
#14 0x00007f5f8a1767ac in QAbstractButton::mouseReleaseEvent (this=0x68bbe80, e=0x7fffb4e687d0) at widgets/qabstractbutton.cpp:1121
#15 0x00007f5f89e0ecea in QWidget::event (this=0x68bbe80, event=0x7fffb4e687d0) at kernel/qwidget.cpp:8295
#16 0x00007f5f89dbe474 in notify_helper (e=0x7fffb4e687d0, receiver=0x68bbe80, this=0x11da600) at kernel/qapplication.cpp:4486
#17 QApplicationPrivate::notify_helper (this=0x11da600, receiver=0x68bbe80, e=0x7fffb4e687d0) at kernel/qapplication.cpp:4458
#18 0x00007f5f89dc3cbb in QApplication::notify (this=<optimized out>, receiver=0x68bbe80, e=0x7fffb4e687d0) at kernel/qapplication.cpp:4047
#19 0x00007f5f8d261466 in KApplication::notify (this=0x11d0eb0, receiver=0x68bbe80, event=0x7fffb4e687d0) at ../../kdeui/kernel/kapplication.cpp:311
#20 0x00007f5f8ac87afc in QCoreApplication::notifyInternal (this=0x11d0eb0, receiver=0x68bbe80, event=0x7fffb4e687d0) at kernel/qcoreapplication.cpp:787
#21 0x00007f5f89dbf442 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#22 QApplicationPrivate::sendMouseEvent (receiver=0x68bbe80, event=0x7fffb4e687d0, alienWidget=0x68bbe80, nativeWidget=0x5dcf7c0, buttonDown=0x68bbe80, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3146
#23 0x00007f5f89e3e9d5 in QETWidget::translateMouseEvent (this=0x5dcf7c0, event=<optimized out>) at kernel/qapplication_x11.cpp:4571
#24 0x00007f5f89e3d94e in QApplication::x11ProcessEvent (this=0x11d0eb0, event=0x7fffb4e68ff0) at kernel/qapplication_x11.cpp:3693
#25 0x00007f5f89e664a2 in x11EventSourceDispatch (s=0x11d93e0, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#26 0x00007f5f848d2a5d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007f5f848d3258 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#28 0x00007f5f848d3429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007f5f8acb2ed6 in QEventDispatcherGlib::processEvents (this=0x11a9f40, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#30 0x00007f5f89e6610e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#31 0x00007f5f8ac86cf2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#32 0x00007f5f8ac86ef7 in QEventLoop::exec (this=0x7fffb4e693c0, flags=...) at kernel/qeventloop.cpp:201
#33 0x00007f5f8a2752d6 in QDialog::exec (this=0x5739640) at dialogs/qdialog.cpp:552
#34 0x00000000006b7c0e in KSplitTransactionDlg::exec (this=0x5739640) at /usr/local/src/git_repo/kmymoney/kmymoney/dialogs/ksplittransactiondlg.cpp:172
#35 0x00000000006d9105 in StdTransactionEditor::slotEditSplits (this=0x52f7b80) at /usr/local/src/git_repo/kmymoney/kmymoney/dialogs/transactioneditor.cpp:1901
#36 0x00000000006dbd90 in StdTransactionEditor::qt_metacall (this=0x52f7b80, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffb4e69a70) at /usr/local/src/git_repo/kmymoney/debug/kmymoney/dialogs/transactioneditor.moc:314
#37 0x00007f5f8ac9aeba in QMetaObject::activate (sender=0x4de6470, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fffb4e69a70) at kernel/qobject.cpp:3278
#38 0x00007f5f8a42f642 in QAbstractButton::clicked (this=<optimized out>, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:206
#39 0x00007f5f8a1751fe in QAbstractButtonPrivate::emitClicked (this=<optimized out>) at widgets/qabstractbutton.cpp:546
#40 0x00007f5f8a17653b in QAbstractButtonPrivate::click (this=0x4de6c00) at widgets/qabstractbutton.cpp:539
#41 0x00007f5f8a1767ac in QAbstractButton::mouseReleaseEvent (this=0x4de6470, e=0x7fffb4e6a180) at widgets/qabstractbutton.cpp:1121
#42 0x00007f5f89e0ecea in QWidget::event (this=0x4de6470, event=0x7fffb4e6a180) at kernel/qwidget.cpp:8295
#43 0x00007f5f89dbe474 in notify_helper (e=0x7fffb4e6a180, receiver=0x4de6470, this=0x11da600) at kernel/qapplication.cpp:4486
#44 QApplicationPrivate::notify_helper (this=0x11da600, receiver=0x4de6470, e=0x7fffb4e6a180) at kernel/qapplication.cpp:4458
#45 0x00007f5f89dc3cbb in QApplication::notify (this=<optimized out>, receiver=0x4de6470, e=0x7fffb4e6a180) at kernel/qapplication.cpp:4047
#46 0x00007f5f8d261466 in KApplication::notify (this=0x11d0eb0, receiver=0x4de6470, event=0x7fffb4e6a180) at ../../kdeui/kernel/kapplication.cpp:311
#47 0x00007f5f8ac87afc in QCoreApplication::notifyInternal (this=0x11d0eb0, receiver=0x4de6470, event=0x7fffb4e6a180) at kernel/qcoreapplication.cpp:787
#48 0x00007f5f89dbf442 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#49 QApplicationPrivate::sendMouseEvent (receiver=0x4de6470, event=0x7fffb4e6a180, alienWidget=0x4de6470, nativeWidget=0x28d7660, buttonDown=0x4de6470, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3146
#50 0x00007f5f89e3e9d5 in QETWidget::translateMouseEvent (this=0x28d7660, event=<optimized out>) at kernel/qapplication_x11.cpp:4571
#51 0x00007f5f89e3d94e in QApplication::x11ProcessEvent (this=0x11d0eb0, event=0x7fffb4e6a9a0) at kernel/qapplication_x11.cpp:3693
#52 0x00007f5f89e664a2 in x11EventSourceDispatch (s=0x11d93e0, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#53 0x00007f5f848d2a5d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#54 0x00007f5f848d3258 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#55 0x00007f5f848d3429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#56 0x00007f5f8acb2ed6 in QEventDispatcherGlib::processEvents (this=0x11a9f40, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#57 0x00007f5f89e6610e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#58 0x00007f5f8ac86cf2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#59 0x00007f5f8ac86ef7 in QEventLoop::exec (this=0x7fffb4e6ad70, flags=...) at kernel/qeventloop.cpp:201
#60 0x00007f5f8ac8b789 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1064
#61 0x000000000045cce5 in runKMyMoney (a=0x11d0eb0, splash=0x1351340) at /usr/local/src/git_repo/kmymoney/kmymoney/main.cpp:282
#62 0x000000000045b6db in main (argc=2, argv=0x7fffb4e6b9f8) at /usr/local/src/git_repo/kmymoney/kmymoney/main.cpp:181

Reported using DrKonqi
Comment 1 MK 2012-08-25 09:33:43 UTC
> While re-assigning the categories suddenly two editable lines appeared.

You can reproduce the two editable lines by double-clicking a different 
entry with another entry still active. See attached screenshot.

With this situation even the "clear all" button leaves some entries behind! 
And the crash with "empty QString" occurs a short time after that.

Regards,
Martin
Comment 2 MK 2012-08-25 09:34:45 UTC
Created attachment 73454 [details]
Screenshot of two editable lines in split transaction
Comment 3 MK 2012-09-12 19:05:13 UTC
Hi Thomas!

After focus jumped to this "single character category" which is described in bug 306647
https://bugs.kde.org/show_bug.cgi?id=306647 it is possible to select
multiple rows as described above.

This is only possible when all warning dialogue boxes are enabled - especially warning
"you need to assign a category to this split before it can be entered"

"Delete all" doesn't work in this situation anymore and leaves entries behind.

I can reproduce the crash with my build dated Aug 19th. Unfortunately I stripped it of debugging symbols.

Regards
 Martin
Comment 4 MK 2012-10-28 06:52:02 UTC
Hi!

Thomas, could you try the following "foolproof" way to reproduce the problem described above?
If this works for you, my build is somehow broken...

steps:
1. Edit an existing spilt transaction
2. Double click on an empty line below the existing ones in column "category"
3. Select an existing category, and click somewhere on the list to leave entry line
4. Situation: Value is 0,00
5. Double click on value 0,00 to change it
6. Start typing numbers -> cursor focus jumps to category column! (1st bug)
7. Click somewhere on the list to leave entry dialogue
8. Question pops up: "Category doesn't exist. Create?"
9. Answer "No"
10. Question pops up: "You have to assign category before entering"
11. Answer "OK"
12. Second line appears as shown in screenshot (2nd bug)


Thanks!
Martin
Comment 5 Thomas Baumgart 2012-10-28 07:50:19 UTC
If in step 3 I click somewhere in the list, the entry does not get created. Only if I click on the arrow enter button (the on with the green OK sign) the entry gets created. That is how it should be. Even if I do that, and then continue until step 6 I do not see any focus changing to the category widget. That is tested with 4.6.3 as well as master.
Comment 6 MK 2012-10-28 09:24:47 UTC
Thanks a lot. I will try to rebuild from a clean repo. Could you mark the bug as closed as it works for you?

Martin
Comment 7 Cristian Oneț 2013-09-12 21:06:13 UTC
Created attachment 82301 [details]
New crash information added by DrKonqi

kmymoney (4.6.90-d6570eaab8) on KDE Platform 4.10.5 using Qt 4.8.4

- What I was doing when the application crashed:

Steps to reproduce this:
1. Enter one split
2. While entering the second split rigth click on the first split
3. Observer the strange state of the editor
4. Press the edit accept button of the second split
5. Observe the crash

-- Backtrace (Reduced):
#6  0x0000000000464316 in QString::isEmpty (this=0x50) at /usr/include/qt4/QtCore/qstring.h:705
#7  0x000000000070fea7 in kMyMoneySplitTable::endEdit (this=0x36b0af0, keyBoardDriven=false) at /home/cristi/dezvoltare/kmymoney/kmymoney/dialogs/kmymoneysplittable.cpp:655
#8  0x000000000070fe03 in kMyMoneySplitTable::slotEndEdit (this=0x36b0af0) at /home/cristi/dezvoltare/kmymoney/kmymoney/dialogs/kmymoneysplittable.cpp:640
#9  0x0000000000712450 in kMyMoneySplitTable::qt_static_metacall (_o=0x36b0af0, _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0x7fff825b18f0) at /home/cristi/dezvoltare/kmymoney-build/kmymoney/dialogs/kmymoneysplittable.moc:89
[...]
#11 0x00007f283c108c12 in QAbstractButton::clicked(bool) () from /usr/lib64/qt4/libQtGui.so.4
Comment 8 Cristian Oneț 2013-09-12 21:06:40 UTC
*** Bug 272861 has been marked as a duplicate of this bug. ***
Comment 9 Cristian Oneț 2013-09-12 21:29:10 UTC
Git commit 9f4ee725eda00e5730aa9e077fa1cd8d073a7055 by Cristian Oneț.
Committed on 12/09/2013 at 21:25.
Pushed by conet into branch 'master'.

Fix a crash when editing a split transaction.

When the focus of a row is changed if and edit operation is in
progress end it regardless of the mouse button which was used.

M  +7    -6    kmymoney/dialogs/kmymoneysplittable.cpp

http://commits.kde.org/kmymoney/9f4ee725eda00e5730aa9e077fa1cd8d073a7055
Comment 10 Cristian Oneț 2013-09-12 21:30:08 UTC
Git commit 76e334e1fa86c71cc239d618e93a0d0ea0f487fc by Cristian Oneț.
Committed on 12/09/2013 at 21:25.
Pushed by conet into branch '4.6'.

Fix a crash when editing a split transaction.

When the focus of a row is changed if and edit operation is in
progress end it regardless of the mouse button which was used.
(cherry picked from commit 9f4ee725eda00e5730aa9e077fa1cd8d073a7055)

M  +7    -6    kmymoney/dialogs/kmymoneysplittable.cpp

http://commits.kde.org/kmymoney/76e334e1fa86c71cc239d618e93a0d0ea0f487fc