Bug 208691 - KMail crashes with an infinite recursion in KMComposeWin::slotPaste()
Summary: KMail crashes with an infinite recursion in KMComposeWin::slotPaste()
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-27 14:22 UTC by Jonathan Thomas
Modified: 2009-09-27 18:59 UTC (History)
1 user (show)

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 Jonathan Thomas 2009-09-27 14:22:52 UTC
Version:            (using KDE 4.3.1)
OS:                Linux
Installed from:    Ubuntu Packages

Originally reported at https://launchpad.net/bugs/437322

Bears similarities to KDE bug 146545

The backtrace repeats this portion many times:

#0  QApplication::notify (this=0xbffde830, receiver=0x8faaa58, e=0xbf5e04ec)
    at kernel/qapplication.cpp:3531
No locals.
#1  0x004e2f8a in KApplication::notify (this=0xbffde830, receiver=0x8faaa58, 
    event=0xbf5e04ec) at ../../kdeui/kernel/kapplication.cpp:302
No locals.
#2  0x01dc26bb in QCoreApplication::notifyInternal (this=0xbffde830, 
    receiver=0x8faaa58, event=0xbf5e04ec) at kernel/qcoreapplication.cpp:610
	result = false
	cbdata = {0x8faaa58, 0xbf5e04ec, 0xbf5e01cf}
	threadData = (QThreadData *) 0x8653fa8
	returnValue = <value optimized out>
#3  0x01440b92 in QShortcutMap::tryShortcutEvent (this=0x8693dd0, 
    o=0x8faaa58, e=0xbf5e04ec)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:213
	orgType = 6
	identicalMatches = <value optimized out>
	d = <value optimized out>
	wasAccepted = true
	result = <value optimized out>
	stateWasAccepted = <value optimized out>
#4  0x0140e9fd in QApplication::notify (this=0xbffde830, receiver=0x8faaa58, 
    e=0xbf5e04ec) at kernel/qapplication.cpp:3645
	pr = {o = 0xbf5e0478}
	res = <value optimized out>
#5  0x004e2f8a in KApplication::notify (this=0xbffde830, receiver=0x8faaa58, 
    event=0xbf5e04ec) at ../../kdeui/kernel/kapplication.cpp:302
No locals.
#6  0x00c8455f in KMComposeWin::slotPaste (this=0x8e770c0)
    at ../../kmail/kmcomposewin.cpp:3221
	k = {<QInputEvent> = {<QEvent> = {_vptr.QEvent = 0x1c68320, d = 0x0, 
      t = 51, posted = 0, spont = 0, m_accept = 0, reserved = 0}, modState = {
      i = 67108864}}, txt = {static null = {<No data fields>}, 
    static shared_null = {ref = {_q_value = 25292}, alloc = 0, size = 0, 
      data = 0x1eb545a, clean = 0, simpletext = 0, righttoleft = 0, 
      asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, 
    static shared_empty = {ref = {_q_value = 310}, alloc = 0, size = 0, 
      data = 0x1eb546e, clean = 0, simpletext = 0, righttoleft = 0, 
      asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, 
    d = 0x1eb5448, static codecForCStrings = 0x0}, k = 86, c = 1, autor = 0}
	fw = (class QWidget *) 0x8faaa58
#7  0x00cae4d0 in KMComposeWin::qt_metacall (this=0x8e770c0, 
    _c=QMetaObject::InvokeMetaMethod, _id=26, _a=0xbf5e0698)
    at ./kmcomposewin.moc:255
No locals.
#8  0x01dd8253 in QMetaObject::activate (sender=0x90cba68, 
    from_signal_index=5, to_signal_index=6, argv=0xbf5e0698)
    at kernel/qobject.cpp:3113
	c = <value optimized out>
	method = 76
	currentSender = {sender = 0x90cba68, signal = 5, ref = 1}
	previousSender = (QObjectPrivate::Sender *) 0xbf5e0f08
	i = 1
	count = 2
	signal = 5
	empty_argv = {0x0}
	locker = {{mtx = 0x8653fdc, val = 140853212}}
	currentThreadData = <value optimized out>
	connectionLists = (QObjectConnectionListVector *) 0x90cbc28
#9  0x01dd86c8 in QMetaObject::activate (sender=0x90cba68, m=0x1c67e48, 
    from_local_signal_index=1, to_local_signal_index=2, argv=0xbf5e0698)
    at kernel/qobject.cpp:3207
	offset = <value optimized out>
	from_signal_index = -1073878992
	to_signal_index = -1073878992
#10 0x013ff9a1 in QAction::triggered (this=0x90cba68, _t1=false)
    at .moc/release-shared/moc_qaction.cpp:236
	_a = {0x0, 0xbf5e068c}
#11 0x01400f22 in QAction::activate (this=0x90cba68, event=QAction::Trigger)
    at kernel/qaction.cpp:1160
	guard = (class QObject *) 0x90cba68
#12 0x01403a08 in QAction::event (this=0xbffde830, e=0xbffde830)
    at kernel/qaction.cpp:1079
No locals.
#13 0x003fbce3 in KAction::event (this=0x90cba68, event=0xbf5e0ae8)
    at ../../kdeui/actions/kaction.cpp:88
No locals.
#14 0x01405f44 in QApplicationPrivate::notify_helper (this=0x8693d30, 
    receiver=0x90cba68, e=0xbf5e0ae8) at kernel/qapplication.cpp:4056
	consumed = <value optimized out>
#15 0x0140d66c in QApplication::notify (this=0xbffde830, receiver=0x90cba68, 
    e=0xbf5e0ae8) at kernel/qapplication.cpp:3603
	res = true
#16 0x004e2f8a in KApplication::notify (this=0xbffde830, receiver=0x90cba68, 
    event=0xbf5e0ae8) at ../../kdeui/kernel/kapplication.cpp:302
No locals.
#17 0x01dc26bb in QCoreApplication::notifyInternal (this=0xbffde830, 
    receiver=0x90cba68, event=0xbf5e0ae8) at kernel/qcoreapplication.cpp:610
	result = false
	cbdata = {0x90cba68, 0xbf5e0ae8, 0xbf5e0a8f}
	threadData = (QThreadData *) 0x8653fa8
	returnValue = <value optimized out>
#18 0x0143edcd in QShortcutMap::dispatchEvent (this=0x8693dd0, e=0xbf5e0e1c)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:213
	current = <value optimized out>
	i = <value optimized out>
	enabledShortcuts = <value optimized out>
	se = {<QEvent> = {_vptr.QEvent = 0x1c68108, d = 0x0, t = 117, 
    posted = 0, spont = 0, m_accept = 1, reserved = 6123}, sequence = {
    d = 0x906b8f8}, ambig = false, sid = -593}
	d = <value optimized out>
	curKey = <value optimized out>
	next = (const QShortcutEntry *) 0x90cbb40
#19 0x01440c4e in QShortcutMap::tryShortcutEvent (this=0x8693dd0, 
    o=0x8faaa58, e=0xbf5e0e1c) at kernel/qshortcutmap.cpp:369
	identicalMatches = 1
	d = (QShortcutMapPrivate * const) 0xbffde830
	wasAccepted = <value optimized out>
	result = <value optimized out>
	stateWasAccepted = <value optimized out>

The full, repeating backtrace can be found at http://launchpadlibrarian.net/32495761/Stacktrace.txt
Comment 1 Martin Koller 2009-09-27 17:49:05 UTC
I can reproduce it:
- put something into the clipboard
- open a mail composer window
- click on the "Select..." button to the right of the "To" address
- close the address selection window with the X
- CTRL-V
- crash

This is due to void KMComposeWin::slotPaste() calls qApp->notify() when the composer editor does not have the focus.

I'm checking how to solve this.
Comment 2 Martin Koller 2009-09-27 18:59:14 UTC
SVN commit 1028579 by mkoller:

BUG: 208691

avoid recursion when handling copy/paste actions


 M  +16 -4     kmcomposewin.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1028579