Bug 379262 - crash while deleting multiple entries in outbox list
Summary: crash while deleting multiple entries in outbox list
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.8.0
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2017-04-26 18:28 UTC by MK
Modified: 2019-08-29 16:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.1,5.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MK 2017-04-26 18:28:36 UTC
Application: kmymoney (4.8.0)
KDE Platform Version: 4.14.22
Qt Version: 4.8.7
Operating System: Linux 4.4.0-72-generic x86_64
Distribution: Ubuntu 16.04.2 LTS

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

I selected several entries in the outbox list (kbanking plugin) and pressed "remove" button. KMM 4.8.0 crashed.

-- Backtrace:
Application: KMyMoney (kmymoney), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f25917e6900 (LWP 3140))]

Thread 3 (Thread 0x7f2563f06700 (LWP 3484)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f2577eb6e2a in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#2  0x00007f2577eb6e59 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#3  0x00007f25875606ba in start_thread (arg=0x7f2563f06700) at pthread_create.c:333
#4  0x00007f258b8f782d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7f257585a700 (LWP 3141)):
#0  0x00007f258b8ebb5d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f258707938c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f258707949c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f258cadf23e in QEventDispatcherGlib::processEvents (this=0x7f25700008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:452
#4  0x00007f258caad13f in QEventLoop::processEvents (this=this@entry=0x7f2575859c80, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f258caad4a5 in QEventLoop::exec (this=this@entry=0x7f2575859c80, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f258c99c549 in QThread::exec (this=this@entry=0x203fc20) at thread/qthread.cpp:538
#7  0x00007f258ca8d1d3 in QInotifyFileSystemWatcherEngine::run (this=0x203fc20) at io/qfilesystemwatcher_inotify.cpp:265
#8  0x00007f258c99ee3c in QThreadPrivate::start (arg=0x203fc20) at thread/qthread_unix.cpp:352
#9  0x00007f25875606ba in start_thread (arg=0x7f257585a700) at pthread_create.c:333
#10 0x00007f258b8f782d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f25917e6900 (LWP 3140)):
[KCrash Handler]
#6  0x00007f258b826428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#7  0x00007f258b82802a in __GI_abort () at abort.c:89
#8  0x00007f258c993f15 in qt_message_output (msgType=msgType@entry=QtFatalMsg, buf=0x680e598 "ASSERT: \"m_jobIdList.count() > row\" in file /usr/local/src/kmymoney-4.8.0/kmymoney/models/onlinejobmodel.cpp, line 226") at global/qglobal.cpp:2447
#9  0x00007f258c994371 in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=msgType@entry=QtFatalMsg, msg=0x7f258cb169e0 "ASSERT: \"%s\" in file %s, line %d", ap=ap@entry=0x7ffdf572d390) at global/qglobal.cpp:2493
#10 0x00007f258c994c91 in qFatal (msg=<optimized out>) at global/qglobal.cpp:2676
#11 0x000000000083fb8e in onlineJobModel::removeRows (this=0x265ab40, row=59, count=1, parent=...) at /usr/local/src/kmymoney-4.8.0/kmymoney/models/onlinejobmodel.cpp:226
#12 0x0000000000569746 in QAbstractItemModel::removeRow (this=0x265ab40, arow=59, aparent=...) at /usr/include/qt4/QtCore/qabstractitemmodel.h:319
#13 0x0000000000568728 in KOnlineJobOutbox::slotRemoveJob (this=0x263f870) at /usr/local/src/kmymoney-4.8.0/kmymoney/views/konlinejoboutbox.cpp:133
#14 0x00000000005728e4 in KOnlineJobOutbox::qt_static_metacall (_o=0x263f870, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0x7ffdf572d740) at /usr/local/src/kmymoney-4.8.0/debug/kmymoney/views/moc_konlinejoboutbox.cpp:76
#15 0x00007f258cac2f80 in QMetaObject::activate (sender=sender@entry=0x265b290, m=m@entry=0x7f258dfd9f60 <QAbstractButton::staticMetaObject>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7ffdf572d740) at kernel/qobject.cpp:3567
#16 0x00007f258db64382 in QAbstractButton::clicked (this=this@entry=0x265b290, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:219
#17 0x00007f258d899963 in QAbstractButtonPrivate::emitClicked (this=this@entry=0x265b3a0) at widgets/qabstractbutton.cpp:548
#18 0x00007f258d89ad14 in QAbstractButtonPrivate::click (this=this@entry=0x265b3a0) at widgets/qabstractbutton.cpp:541
#19 0x00007f258d89ae24 in QAbstractButton::mouseReleaseEvent (this=0x265b290, e=0x7ffdf572dcb0) at widgets/qabstractbutton.cpp:1123
#20 0x00007f258d5158d0 in QWidget::event (this=0x265b290, event=0x7ffdf572dcb0) at kernel/qwidget.cpp:8775
#21 0x00007f258d4befdc in QApplicationPrivate::notify_helper (this=this@entry=0x17d0000, receiver=receiver@entry=0x265b290, e=e@entry=0x7ffdf572dcb0) at kernel/qapplication.cpp:4570
#22 0x00007f258d4c60d6 in QApplication::notify (this=this@entry=0x17c1490, receiver=receiver@entry=0x265b290, e=e@entry=0x7ffdf572dcb0) at kernel/qapplication.cpp:4113
#23 0x00007f258e2256ba in KApplication::notify (this=0x17c1490, receiver=0x265b290, event=0x7ffdf572dcb0) at /build/kde4libs-jMGaqq/kde4libs-4.14.22/kdeui/kernel/kapplication.cpp:311
#24 0x00007f258caae8bd in QCoreApplication::notifyInternal (this=0x17c1490, receiver=receiver@entry=0x265b290, event=event@entry=0x7ffdf572dcb0) at kernel/qcoreapplication.cpp:955
#25 0x00007f258d4c56dd in QCoreApplication::sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#26 QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x265b290, event=event@entry=0x7ffdf572dcb0, alienWidget=alienWidget@entry=0x265b290, nativeWidget=nativeWidget@entry=0x263f870, buttonDown=buttonDown@entry=0x7f258dfeb368 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3178
#27 0x00007f258d5433f2 in QETWidget::translateMouseEvent (this=this@entry=0x263f870, event=event@entry=0x7ffdf572e010) at kernel/qapplication_x11.cpp:4638
#28 0x00007f258d542c83 in QApplication::x11ProcessEvent (this=0x17c1490, event=event@entry=0x7ffdf572e010) at kernel/qapplication_x11.cpp:3626
#29 0x00007f258d56c542 in x11EventSourceDispatch (s=0x17cf830, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#30 0x00007f2587079197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007f25870793f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007f258707949c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007f258cadf21e in QEventDispatcherGlib::processEvents (this=0x1792cf0, flags=...) at kernel/qeventdispatcher_glib.cpp:450
#34 0x00007f258d56c616 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#35 0x00007f258caad13f in QEventLoop::processEvents (this=this@entry=0x7ffdf572e3f0, flags=...) at kernel/qeventloop.cpp:149
#36 0x00007f258caad4a5 in QEventLoop::exec (this=this@entry=0x7ffdf572e3f0, flags=...) at kernel/qeventloop.cpp:204
#37 0x00007f258cab3469 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1227
#38 0x00000000004b2add in runKMyMoney (a=0x17c1490, splash=0x18c9390) at /usr/local/src/kmymoney-4.8.0/kmymoney/main.cpp:283
#39 0x00000000004b1492 in main (argc=1, argv=0x7ffdf572ee98) at /usr/local/src/kmymoney-4.8.0/kmymoney/main.cpp:182

Reported using DrKonqi
Comment 1 Thomas Baumgart 2017-04-30 15:44:34 UTC
I just tried to duplicate this with current 4.8 head and was unable to do so with 12 stored transactions using different selection patterns.

Can you duplicate the problem and send an anonymized screenshot how you do that? That would be very helpful.
Comment 2 MK 2017-04-30 18:59:30 UTC
Hi Thomas!

I delete all transfers (~50) except of two. In this list of two I
_first_ select the _lower_ entry, then the _entry above_. I right click
to get the context menu. I keep the right mouse button pressed, go down
to "remove" and release the button -> crash.

KMM banking plugin works perfectly without a crash if I select the
_first_ entry _first_ and then the second entry before removing. Funny.

Took me a while to figure out the cause of this once random crash :-)

Martin
Comment 3 Thomas Baumgart 2017-05-01 12:03:52 UTC
Hi Martin,

after many, many tries I figured out how to duplicate the problem. First I thought it is related to the fact that you keep the RMB pressed to reach the context menu action, but that is unrelated. Also, leaving only two entries in the list is unrelated. I got it to crash with all my entries in the list. The cause is the order of selection. Here's how I duplicated it:

a) select the last entry in the list using LMB
b) holding down Ctrl and select any other entry in the list in addition
c) press the remove button on the right of the dialog with LMB -> Boom

If you select the very same two entries in reverse order everything works fine.

The crash also occurs in KF5 master.
Comment 4 Thomas Baumgart 2017-05-01 12:36:37 UTC
Git commit 39f83117b9291fa5e9bbdb2b007b8ec98402874e by Thomas Baumgart.
Committed on 01/05/2017 at 12:34.
Pushed by tbaumgart into branch 'master'.

Fix crash when removing online jobs

Whenever more than one entry in the list where selected and the last
entry was selected first, the application crashed.
FIXED-IN: 5.0

M  +4    -7    kmymoney/views/konlinejoboutbox.cpp

https://commits.kde.org/kmymoney/39f83117b9291fa5e9bbdb2b007b8ec98402874e
Comment 5 Thomas Baumgart 2017-05-01 12:59:53 UTC
Git commit f66defd9461bf8b763cbb210f642d9acde8d02f9 by Thomas Baumgart.
Committed on 01/05/2017 at 12:56.
Pushed by tbaumgart into branch '4.8'.

Fix crash when removing online jobs

Whenever more than one entry in the list where selected and the last
entry was selected first, the application crashed.
FIXED-IN: 4.8.1

M  +4    -7    kmymoney/views/konlinejoboutbox.cpp

https://commits.kde.org/kmymoney/f66defd9461bf8b763cbb210f642d9acde8d02f9
Comment 6 MK 2017-05-01 13:37:15 UTC
I did not dig that deep :-) Thanks for fixing it!

Martin