Bug 240831 - Crash when deleting numerous transactions
Summary: Crash when deleting numerous transactions
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-05 20:32 UTC by allan
Modified: 2010-06-12 07:48 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 allan 2010-06-05 20:32:21 UTC
Version:           unspecified (using KDE 4.3.5) 
OS:                Linux

After loading a file with a number of transactions, if the last transaction is highlighted, then shift-click on a higher transaction, right click and delete them (more than one).   Then shift right click on the topmost visible or partly visible transaction, and KMM crashes, every time.

I first noticed this after importing a large file and started to delete all transactions.  Also, if the imported file is loaded and KMM saved, the reloaded file still shows the problem.  It does not need to be a large file.  About six transactions will show it.  Delete the two lowest, then shift right click on the top one.

Reproducible: Always

Steps to Reproduce:
as above

Actual Results:  
crash

Expected Results:  
no crash
Comment 1 allan 2010-06-05 23:35:13 UTC
With four transactions displayed, delete the lower two.  Then shift click on either of the remaining two will crash.  With three transactions displayed, delete the lower two, and shift click on the last will do it.
Comment 2 Thomas Baumgart 2010-06-11 11:16:02 UTC
I tried hard to duplicate the problem using current SVN HEAD but to no avail. What are your settings on the ledger view?
Comment 3 allan 2010-06-11 14:09:09 UTC
I'm now on Version 3.98.2-svn1136238 and the problem is still there, but there was an error in my original description.  In the first paragraph, after deleting the first lot of transactions, the second sentence should have started 'Then shift click...' NOT 'Then shift right click'.  Apologies for that, if that's why you can't reproduce the problem.

I now find that it also happens in v1.03.  I imported 33 investment transactions, and deleted all but the top four.  Then I deleted the lower two, and when I shift clicked on one of the remaining two, it crashed.

My Register settings are - display - show grid and use lens.  Sorting is default, data entry is auto-increment number and auto-fill if amount < 10%.  I cleared all except the sorting and the crash still occurs.

I didn't send a BT originally, as it was so reproducible, but hope this one helps.

Application: KMyMoney (kmymoney), signal: Segmentation fault
[Current thread is 1 (Thread 0xb43b6700 (LWP 3209))]

Thread 2 (Thread 0xae5feb70 (LWP 4284)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb6512d95 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb5d2d750 in wait (time=<value optimized out>, this=<value optimized out>) at thread/qwaitcondition_unix.cpp:87
#3  QWaitCondition::wait (time=<value optimized out>, this=<value optimized out>) at thread/qwaitcondition_unix.cpp:159
#4  0xb4fb9a04 in QHostInfoAgent::run (this=0x87768d8) at kernel/qhostinfo.cpp:260
#5  0xb5d2c623 in QThreadPrivate::start (arg=0x87768d8) at thread/qthread_unix.cpp:188
#6  0xb650e6e5 in start_thread () from /lib/libpthread.so.0
#7  0xb650e600 in ?? () from /lib/libpthread.so.0

Thread 1 (Thread 0xb43b6700 (LWP 3209)):
[KCrash Handler]
#6  0x083b1177 in KMyMoneyRegister::Register::selectItem (this=0x8f64a28, item=0x8764f70, dontChangeSelections=false) at /home/aga/Plugin/kmymoney/kmymoney/widgets/register.cpp:1555
#7  0x083b1809 in KMyMoneyRegister::Register::selectItem (this=0x8f64a28, row=0, col=4) at /home/aga/Plugin/kmymoney/kmymoney/widgets/register.cpp:1433
#8  0x083b2718 in KMyMoneyRegister::Register::qt_metacall (this=0x8f64a28, _c=InvokeMetaMethod, _id=132, _a=0xbf816204) at /home/aga/Plugin/kmymoney/build/kmymoney/widgets/register.moc:147
#9  0xb5e39864 in QMetaObject::activate (sender=0x8f64a28, from_signal_index=98, to_signal_index=98, argv=0xbf816204) at kernel/qobject.cpp:3113
#10 0xb5e3a585 in QMetaObject::activate (sender=0x8f64a28, m=0xb5ccf890, local_signal_index=9, argv=0xbf816204) at kernel/qobject.cpp:3187
#11 0xb5a1d06d in QTableWidget::cellClicked (this=0x8f64a28, _t1=0, _t2=4) at .moc/release-shared/moc_qtablewidget.cpp:268
#12 0xb5a23930 in QTableWidgetPrivate::_q_emitItemClicked (this=0x8f63a38, index=...) at itemviews/qtablewidget.cpp:1617
#13 0xb5a25f90 in QTableWidget::qt_metacall (this=0x8f64a28, _c=InvokeMetaMethod, _id=24, _a=0xbf816388) at .moc/release-shared/moc_qtablewidget.cpp:158
#14 0x083b256a in KMyMoneyRegister::Register::qt_metacall (this=0x8f64a28, _c=InvokeMetaMethod, _id=113, _a=0xbf816388) at /home/aga/Plugin/kmymoney/build/kmymoney/widgets/register.moc:131
#15 0xb5e39864 in QMetaObject::activate (sender=0x8f64a28, from_signal_index=32, to_signal_index=32, argv=0xbf816388) at kernel/qobject.cpp:3113
#16 0xb5e3a585 in QMetaObject::activate (sender=0x8f64a28, m=0xb5ccea24, local_signal_index=1, argv=0xbf816388) at kernel/qobject.cpp:3187
#17 0xb59a4435 in QAbstractItemView::clicked (this=0x8f64a28, _t1=...) at .moc/release-shared/moc_qabstractitemview.cpp:321
#18 0xb59b26c0 in QAbstractItemView::mouseReleaseEvent (this=0x8f64a28, event=0xbf816b90) at itemviews/qabstractitemview.cpp:1660
#19 0x083ad23b in KMyMoneyRegister::Register::mouseReleaseEvent (this=0x0, e=0x0) at /home/aga/Plugin/kmymoney/kmymoney/widgets/register.cpp:1408
#20 0xb54c0bac in QWidget::event (this=0x8f64a28, event=0xbf816b90) at kernel/qwidget.cpp:7554
#21 0xb585dbb5 in QFrame::event (this=0x8f64a28, e=0xbf816b90) at widgets/qframe.cpp:559
#22 0xb58fe12c in QAbstractScrollArea::viewportEvent (this=0x86c7a08, e=0x0) at widgets/qabstractscrollarea.cpp:962
#23 0xb59b5a44 in QAbstractItemView::viewportEvent (this=0x8f64a28, event=0xbf816b90) at itemviews/qabstractitemview.cpp:1476
#24 0xb5900786 in viewportEvent (event=<value optimized out>, this=<value optimized out>) at widgets/qabstractscrollarea_p.h:100
#25 QAbstractScrollAreaFilter::eventFilter (event=<value optimized out>, this=<value optimized out>) at widgets/qabstractscrollarea_p.h:111
#26 0xb5e2250e in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=0x86f1930, receiver=0x8f64a10, event=0xbf816b90) at kernel/qcoreapplication.cpp:726
#27 0xb54698d0 in QApplicationPrivate::notify_helper (this=0x86f1930, receiver=0x8f64a10, e=0xbf816b90) at kernel/qapplication.cpp:4061
#28 0xb5471bbb in QApplication::notify (this=0x8f64a10, receiver=0x8f64a10, e=0xbf816b90) at kernel/qapplication.cpp:3767
#29 0xb69e0521 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#30 0xb5e2332e in QCoreApplication::notifyInternal (this=0x86f1610, receiver=0x8f64a10, event=0xbf816b90) at kernel/qcoreapplication.cpp:610
#31 0xb5470bdc in sendSpontaneousEvent (event=<value optimized out>, receiver=<value optimized out>) at ../../src/corelib/kernel/qcoreapplication.h:216
#32 QApplicationPrivate::sendMouseEvent (event=<value optimized out>, receiver=<value optimized out>) at kernel/qapplication.cpp:2924
#33 0xb54e180a in QETWidget::translateMouseEvent (this=0x8ad5d00, event=0xbf8181bc) at kernel/qapplication_x11.cpp:4409
#34 0xb54e0d7e in QApplication::x11ProcessEvent (this=0x86f1610, event=0xbf8181bc) at kernel/qapplication_x11.cpp:3428
#35 0xb550bb68 in x11EventSourceDispatch (s=0x86f4b70, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#36 0xb49194c2 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#37 0xb491cd98 in ?? () from /usr/lib/libglib-2.0.so.0
#38 0xb491cebe in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#39 0xb5e4f011 in QEventDispatcherGlib::processEvents (this=0x86d6f58, flags=...) at kernel/qeventdispatcher_glib.cpp:407
#40 0xb550b29a in QGuiEventDispatcherGlib::processEvents (this=0x86d6f58, flags=...) at kernel/qguieventdispatcher_glib.cpp:202
#41 0xb5e2198d in QEventLoop::processEvents (this=0xbf818474, flags=) at kernel/qeventloop.cpp:149
#42 0xb5e21dd9 in QEventLoop::exec (this=0xbf818474, flags=...) at kernel/qeventloop.cpp:201
#43 0xb5e24270 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
#44 0xb5469774 in QApplication::exec () at kernel/qapplication.cpp:3525
#45 0x0808f067 in main (argc=3, argv=0xbf8188f4) at /home/aga/Plugin/kmymoney/kmymoney/main.cpp:277
Comment 4 Thomas Baumgart 2010-06-11 19:42:21 UTC
SVN commit 1137117 by tbaumgart:

Ignore the shift and ctrl modifier if no select anchor is available during multiselection of register items.

BUG: 240831

 M  +2 -1      register.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1137117
Comment 5 allan 2010-06-11 23:12:59 UTC
(In reply to comment #4)
> SVN commit 1137117 by tbaumgart:
> 
> Ignore the shift and ctrl modifier if no select anchor is available during
> multiselection of register items.
> 
> BUG: 240831
> 
>  M  +2 -1      register.cpp  
> 
> 
> WebSVN link: http://websvn.kde.org/?view=rev&revision=1137117


Thanks.  Will something similar be needed for v1.x?
Comment 6 Thomas Baumgart 2010-06-12 07:47:30 UTC
Yes, but it's already in place (at least in CVS). Since it was the same fix, it was easy to be done at the same time as this one here.
Comment 7 Thomas Baumgart 2010-06-12 07:48:54 UTC
Yes, but it's already in place (at least in CVS). Since it was the same fix, it was easy to be done at the same time as this one here.