Summary: | crash at request to authorize ICQ contact, then disconnect | ||
---|---|---|---|
Product: | [Applications] kopete | Reporter: | Jens <jens-bugs.kde.org> |
Component: | ICQ and AIM Plugins | Assignee: | Kopete Developers <kopete-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | alex, carsten.schlipf, kde-bugs, patch_linams, patrick.trettenbrein, sts, turbo.brain |
Priority: | NOR | ||
Version: | 0.10 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | solve authorize ICQ contact crash |
Description
Jens
2005-04-05 00:39:57 UTC
*** Bug 99641 has been marked as a duplicate of this bug. *** *** Bug 101286 has been marked as a duplicate of this bug. *** *** Bug 103139 has been marked as a duplicate of this bug. *** I've got additional information: The authorize dialog shows up 3 times with the same message. Seems to be a part of this bug too. Antoher thing is: After starting and watching kopete crashing 5 or more times kopete worked fine till I shut down my machine. Same for me, there were two dialogs requesting authorization for the same user. I granted both (without inserting test), then Kopete crashed. Very annoying. I noticed this only happens when clicking "Cancel" on the dialogs or when no text is entered. When text is entered, it does not crash. Also, I now have a contact where the authorization dialog is shown every time Kopete connects, no matter how often I grant authorization. My backtrace is somewhat shorter: Using host libthread_db library "/lib/tls/libthread_db.so.1". [Thread debugging using libthread_db enabled] [New Thread 1107095648 (LWP 5576)] [KCrash handler] #7 0x00000021 in ?? () #8 0x42a9dac9 in CoreProtocol::wireToTransfer () from /opt/kde3/lib/libkopete_oscar.so.2 #9 0x42a9dced in CoreProtocol::addIncomingData () from /opt/kde3/lib/libkopete_oscar.so.2 #10 0x42a9de6f in ClientStream::bs_readyRead () from /opt/kde3/lib/libkopete_oscar.so.2 #11 0x42a9df3e in ClientStream::qt_invoke () from /opt/kde3/lib/libkopete_oscar.so.2 #12 0x4159c31e in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #13 0x4159cac6 in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #14 0x42a78d0c in ByteStream::readyRead () from /opt/kde3/lib/libkopete_oscar.so.2 #15 0x42a9d3eb in KNetworkByteStream::slotReadyRead () from /opt/kde3/lib/libkopete_oscar.so.2 #16 0x42a9d4c1 in KNetworkByteStream::qt_invoke () from /opt/kde3/lib/libkopete_oscar.so.2 #17 0x4159c31e in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #18 0x4159cac6 in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #19 0x41201663 in KNetwork::KClientSocketBase::readyRead (this=0x82d9bd8) at kclientsocketbase.moc:192 #20 0x41200d0a in KNetwork::KClientSocketBase::slotReadActivity ( this=0x82d9bd8) at /home/tmg/KDE/kdelibs-3.4.0/kdecore/network/kclientsocketbase.cpp:416 #21 0x41209ced in KNetwork::KBufferedSocket::slotReadActivity (this=0x82d9bd8) at /home/tmg/KDE/kdelibs-3.4.0/kdecore/network/kbufferedsocket.cpp:342 #22 0x4120a1de in KNetwork::KBufferedSocket::qt_invoke (this=0x82d9bd8, _id=8, _o=0xbfffed90) at kbufferedsocket.moc:97 #23 0x4159c31e in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #24 0x4159c94d in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #25 0x418eef30 in QSocketNotifier::activated () from /usr/lib/qt3/lib/libqt-mt.so.3 #26 0x415bbf90 in QSocketNotifier::event () from /usr/lib/qt3/lib/libqt-mt.so.3 #27 0x41539baf in QApplication::internalNotify () from /usr/lib/qt3/lib/libqt-mt.so.3 #28 0x4153b773 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3 #29 0x410c9510 in KApplication::notify (this=0xbffff390, receiver=0x82e1640, event=0xbffff110) at /home/tmg/KDE/kdelibs-3.4.0/kdecore/kapplication.cpp:549 #30 0x4152dd26 in QEventLoop::activateSocketNotifiers () from /usr/lib/qt3/lib/libqt-mt.so.3 #31 0x414e7112 in QEventLoop::processEvents () from /usr/lib/qt3/lib/libqt-mt.so.3 #32 0x41551b41 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3 #33 0x41551986 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3 #34 0x4153b63f in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3 #35 0x0807d370 in main () I have the same probleme since a friend tried to add me. 2 Dialogs crashing everytime whatever i do. Created attachment 12368 [details]
solve authorize ICQ contact crash
When showing ICQAuthReplyDialog we can not use exec because we can't block next
transfers.
So ICQAuthReplyDialog uses show and Qt::WDestructiveClose to automatically
delete itself and slotAuthReplyDialogOkClicked to receive Ok signal.
SVN commit 454104 by mattr: Fix bug 103251. Patch by Roman Jarosz. Thanks! BUG: 103251 M +15 -5 icqcontact.cpp M +2 -0 icqcontact.h M +1 -0 ui/icqauthreplydialog.cpp --- branches/work/kopete/dev-0.12/kopete/protocols/oscar/icq/icqcontact.cpp #454103:454104 @@ -212,14 +212,24 @@ if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; - ICQAuthReplyDialog replyDialog; + ICQAuthReplyDialog *replyDialog = new ICQAuthReplyDialog(); - replyDialog.setUser( property( Kopete::Global::Properties::self()->nickName() ).value().toString() ); - replyDialog.setRequestReason( reason ); - if ( replyDialog.exec() ) - mAccount->engine()->sendAuth( contactId(), replyDialog.reason(), replyDialog.grantAuth() ); + connect( replyDialog, SIGNAL( okClicked() ), this, SLOT( slotAuthReplyDialogOkClicked() ) ); + replyDialog->setUser( property( Kopete::Global::Properties::self()->nickName() ).value().toString() ); + replyDialog->setRequestReason( reason ); + replyDialog->setModal( TRUE ); + replyDialog->show(); } +void ICQContact::slotAuthReplyDialogOkClicked() +{ + // Do not need to delete will delete itself automatically + ICQAuthReplyDialog *replyDialog = (ICQAuthReplyDialog*)sender(); + + if (replyDialog) + mAccount->engine()->sendAuth( contactId(), replyDialog->reason(), replyDialog->grantAuth() ); +} + void ICQContact::receivedLongInfo( const QString& contact ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) --- branches/work/kopete/dev-0.12/kopete/protocols/oscar/icq/icqcontact.h #454103:454104 @@ -112,6 +112,8 @@ /** Authorize this contact */ void slotSendAuth(); + void slotAuthReplyDialogOkClicked(); + /** We have received an auth request */ void slotGotAuthRequest( const QString& contact, const QString& reason ); --- branches/work/kopete/dev-0.12/kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp #454103:454104 @@ -33,6 +33,7 @@ if ( !m_wasRequested ) { + this->setWFlags( this->getWFlags() | Qt::WDestructiveClose); m_ui->lblReqReason->hide(); m_ui->lblRequestReason->hide(); } *** Bug 112711 has been marked as a duplicate of this bug. *** *** Bug 115051 has been marked as a duplicate of this bug. *** *** Bug 115772 has been marked as a duplicate of this bug. *** This bug is believed to be fixed. Report here if it can be reproduced with a recent SVN snapshot of Kopete (0.11 or 0.12). Still crashing in Kopete 0.11 (released with KDE 3.5) on Kubuntu... |