Bug 151443

Summary: random crash in dcc send
Product: [Applications] konversation Reporter: Bernd Buschinski <b.buschinski>
Component: generalAssignee: Konversation Developers <konversation-devel>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: konversation dcc cancel fix

Description Bernd Buschinski 2007-10-27 22:55:18 UTC
Version:           svn (using KDE KDE 3.5.8)
Installed from:    Gentoo Packages
Compiler:          4.2.2 -march=athlon64 -O2 -pipe -fomit-frame-pointer -fweb
OS:                Linux

The current svn version crashes randomly while I am getting a dcc send.
Mostly while having more than one at the same time.
Additional, I am in some weird channels where guys send fake dcc with 0.0.0.0 as IP and I have auto accept on.(maybe it tries to read the 0.0.0.0 stream?)
Version 1.0.1 works fine for me and never crashed like this.


Using host libthread_db library "/lib/libthread_db.so.1".
[KCrash handler]
#5  DccTransferRecv::connectionFailed (this=0x2b3c350, errorCode=16)
    at dcctransferrecv.cpp:584
#6  0x00000000004de4d4 in DccTransferRecv::qt_invoke (this=0x2b3c350, _id=17, 
    _o=0x7ffffb8c1700) at dcctransferrecv.moc:152
#7  0x00002b7bb227cf41 in QObject::activate_signal ()
   from /usr/qt/3/lib64/libqt-mt.so.3
#8  0x00002b7bb227dac2 in QObject::activate_signal ()
   from /usr/qt/3/lib64/libqt-mt.so.3
#9  0x00002b7bb0e98605 in KNetwork::KClientSocketBase::readBlock ()
   from /usr/kde/3.5/lib64/libkdecore.so.4
#10 0x00000000004dc2a2 in DccTransferRecv::readData (this=0x2b3c350)
    at dcctransferrecv.cpp:591
#11 0x00000000004de4e6 in DccTransferRecv::qt_invoke (this=0x2b3c350, _id=18, 
    _o=0x7ffffb8c18e0) at dcctransferrecv.moc:153
#12 0x00002b7bb227ce18 in QObject::activate_signal ()
   from /usr/qt/3/lib64/libqt-mt.so.3
#13 0x00002b7bb227dd3d in QObject::activate_signal ()
   from /usr/qt/3/lib64/libqt-mt.so.3
#14 0x00002b7bb0e98de2 in KNetwork::KClientSocketBase::qt_invoke ()
   from /usr/kde/3.5/lib64/libkdecore.so.4
#15 0x00002b7bb0e9a6d0 in KNetwork::KStreamSocket::qt_invoke ()
   from /usr/kde/3.5/lib64/libkdecore.so.4
#16 0x00002b7bb227ce18 in QObject::activate_signal ()
   from /usr/qt/3/lib64/libqt-mt.so.3
#17 0x00002b7bb227dac2 in QObject::activate_signal ()
   from /usr/qt/3/lib64/libqt-mt.so.3
#18 0x00002b7bb267b62c in QSocketNotifier::activated ()
   from /usr/qt/3/lib64/libqt-mt.so.3
#19 0x00002b7bb22a30f4 in QSocketNotifier::event ()
   from /usr/qt/3/lib64/libqt-mt.so.3
#20 0x00002b7bb220683a in QApplication::internalNotify ()
   from /usr/qt/3/lib64/libqt-mt.so.3
#21 0x00002b7bb220878d in QApplication::notify ()
   from /usr/qt/3/lib64/libqt-mt.so.3
#22 0x00002b7bb0d8a0ce in KApplication::notify ()
   from /usr/kde/3.5/lib64/libkdecore.so.4
#23 0x0000000000471c9d in QApplication::sendEvent (receiver=0x31, event=0xb)
    at /usr/qt/3/include/qapplication.h:496
#24 0x00002b7bb21f7044 in QEventLoop::activateSocketNotifiers ()
   from /usr/qt/3/lib64/libqt-mt.so.3
#25 0x00002b7bb21a23b5 in QEventLoop::processEvents ()
   from /usr/qt/3/lib64/libqt-mt.so.3
#26 0x00002b7bb222511b in QEventLoop::enterLoop ()
   from /usr/qt/3/lib64/libqt-mt.so.3
#27 0x00002b7bb2224e07 in QEventLoop::exec ()
   from /usr/qt/3/lib64/libqt-mt.so.3
#28 0x00002b7bb2208492 in QApplication::exec ()
   from /usr/qt/3/lib64/libqt-mt.so.3
#29 0x00000000004c86b0 in main (argc=7, argv=<value optimized out>)
    at main.cpp:112
Comment 1 Bernd Buschinski 2007-10-30 16:16:43 UTC
Created attachment 21947 [details]
konversation dcc cancel fix

Well, it was not a random crash and easy to reproduce.
When someone sends something to you, and he cancels it after a while your
konversation crashed.
This patch fixes it, the SLOT is already connected at this point, so there is
no need to connect it again.
Comment 2 Peter Simonsson 2007-10-30 17:59:49 UTC
SVN commit 731079 by psn:

Fix bug 151443: random crash in dcc send, thanks go to Bernd Buschinski for initial patch.
* Move the connect so we don't connect twice to the same slot.
BUG: 151443


 M  +2 -1      dcctransferrecv.cpp  


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