Version: (using KDE KDE 3.5.2) Installed from: Ubuntu Packages OS: Linux When I launched with the aim quasi-url aim:goim?screenname=EvanHasAIM from BurningDog (gNewSense's rebranding of Firefox 1.5.0.10) Kopete first asks me which account to use. I select one, then it immediately crashes with a SIGSEGV error. My package wasn't compiled with debugging symbols, so I think the backtrace is useless.
Please install the -dbg package for kopete if there is one and try again. IIUC, that should give you usable backtraces. Make sure you have gdb installed or the backtrace tab from Dr. Konqi will be useless anyways. I assume that since you got the account choosing dialog that you have multiple AIM accounts added to Kopete. Is that assumption correct? Also, can you put the actual URL you clicked on or used in quotes so I know exactly what it is (for testing purposes)? Providing this extra information is essential in getting your bug fixed faster. Thanks for your cooperation. :)
There is no -dbg package. The link is: <a href="aim:goim?screenname=EvanHasAIM">EvanHasAIM</a> I do have two AIM accounts. If backtraces would be useful, I will compile kopete with debugging packages. However, I'd appreciate if someone who already had them tested with two accounts first. :)
I can reproduce even with one aim account, I'll fix it.
Thank you. Is it a regression? I've never known this to work, but I think this is my first try.
SVN commit 643048 by rjarosz: Fix bug 143032: Kopete crashes with SIGSEGV when launched with aim quasi-url Also fix the same crash in ICQ and crash when account is offline. Add error messages to improve error feedback. BUG: 143032 M +11 -2 aim/aimprotocol.cpp M +19 -12 icq/icqprotocol.cpp --- branches/KDE/3.5/kdenetwork/kopete/protocols/oscar/aim/aimprotocol.cpp #643047:643048 @@ -17,6 +17,7 @@ #include <qstringlist.h> #include <kgenericfactory.h> +#include <kmessagebox.h> #include <kdebug.h> #include "aimprotocol.h" @@ -166,7 +167,7 @@ chooser->setMainWidget(accSelector); int ret = chooser->exec(); - Kopete::Account *account = accSelector->selectedItem(); + account = accSelector->selectedItem(); delete chooser; if (ret == QDialog::Rejected || account == 0) @@ -179,6 +180,14 @@ Kopete::MetaContact* mc = 0; if ( needContactAddition || realCommand == "addbuddy" ) { + if ( !account->isConnected() ) + { + kdDebug(14152) << k_funcinfo << "Can't add contact, we are offline!" << endl; + KMessageBox::sorry( Kopete::UI::Global::mainWidget(), i18n("You need to be connected to be able to add contacts."), + i18n("AIM") ); + return; + } + if (KMessageBox::questionYesNo(Kopete::UI::Global::mainWidget(), i18n("Do you want to add '%1' to your contact list?").arg(command), QString::null, i18n("Add"), i18n("Do Not Add")) @@ -208,7 +217,7 @@ } - if ( realCommand == "goim" ) + if ( mc && realCommand == "goim" ) { mc->execute(); } --- branches/KDE/3.5/kdenetwork/kopete/protocols/oscar/icq/icqprotocol.cpp #643047:643048 @@ -112,17 +112,6 @@ { QDictIterator<Kopete::Account> it(accounts); account = it.current(); - QString nickuin = nick.isEmpty() ? - i18n("'%1'").arg(uin) : - i18n("'%1' (%2)").arg(nick, uin); - - if (KMessageBox::questionYesNo(Kopete::UI::Global::mainWidget(), - i18n("Do you want to add %1 to your contact list?").arg(nickuin), QString::null, i18n("Add"), i18n("Do Not Add")) - != KMessageBox::Yes) - { - kdDebug(14153) << k_funcinfo << "Cancelled" << endl; - return; - } } else { @@ -134,7 +123,7 @@ chooser->setMainWidget(accSelector); int ret = chooser->exec(); - Kopete::Account *account = accSelector->selectedItem(); + account = accSelector->selectedItem(); delete chooser; if (ret == QDialog::Rejected || account == 0) @@ -144,7 +133,25 @@ } } + if (!account->isConnected()) + { + kdDebug(14153) << k_funcinfo << "Can't add contact, we are offline!" << endl; + KMessageBox::sorry( Kopete::UI::Global::mainWidget(), i18n("You must be online to add a contact."), i18n("ICQ") ); + return; + } + QString nickuin = nick.isEmpty() ? + i18n("'%1'").arg(uin) : + i18n("'%1' (%2)").arg(nick, uin); + + if (KMessageBox::questionYesNo(Kopete::UI::Global::mainWidget(), + i18n("Do you want to add %1 to your contact list?").arg(nickuin), QString::null, i18n("Add"), i18n("Do Not Add")) + != KMessageBox::Yes) + { + kdDebug(14153) << k_funcinfo << "Cancelled" << endl; + return; + } + kdDebug(14153) << k_funcinfo << "Adding Contact; uin = " << uin << ", nick = '" << nick << "', firstname = '" << first << "', lastname = '" << last <<"'" << endl;
I don't know if it was a regression, didin't investigate it.
SVN commit 643069 by rjarosz: Forwardport fix for bug 143032: Kopete crashes with SIGSEGV when launched with aim quasi-url Also fix the same crash in ICQ and crash when account is offline. Add error messages to improve error feedback. CCBUG: 143032 M +10 -2 aim/aimprotocol.cpp M +20 -13 icq/icqprotocol.cpp --- trunk/KDE/kdenetwork/kopete/protocols/oscar/aim/aimprotocol.cpp #643068:643069 @@ -163,7 +163,7 @@ chooser->setMainWidget(accSelector); int ret = chooser->exec(); - Kopete::Account *account = accSelector->selectedItem(); + account = accSelector->selectedItem(); delete chooser; if (ret == QDialog::Rejected || account == 0) @@ -176,6 +176,14 @@ Kopete::MetaContact* mc = 0; if ( needContactAddition || realCommand == "addbuddy" ) { + if ( !account->isConnected() ) + { + kDebug(14152) << k_funcinfo << "Can't add contact, we are offline!" << endl; + KMessageBox::sorry( Kopete::UI::Global::mainWidget(), i18n("You need to be connected to be able to add contacts."), + i18n("AIM") ); + return; + } + if (KMessageBox::questionYesNo(Kopete::UI::Global::mainWidget(), i18n("Do you want to add '%1' to your contact list?", command), QString::null, KGuiItem( i18n("Add") ), KGuiItem( i18n("Do Not Add") )) @@ -205,7 +213,7 @@ } - if ( realCommand == "goim" ) + if ( mc && realCommand == "goim" ) { mc->execute(); } --- trunk/KDE/kdenetwork/kopete/protocols/oscar/icq/icqprotocol.cpp #643068:643069 @@ -92,18 +92,6 @@ if (accounts.count() == 1) { account = accounts.first(); - QString nickuin = nick.isEmpty() ? - i18n("'%1'", uin) : - i18n("'%1' (%2)", nick, uin); - - if (KMessageBox::questionYesNo(Kopete::UI::Global::mainWidget(), - i18n("Do you want to add %1 to your contact list?", nickuin), QString::null, - KGuiItem( i18n("Add") ), KGuiItem( i18n("Do Not Add") )) - != KMessageBox::Yes) - { - kDebug(14153) << k_funcinfo << "Cancelled" << endl; - return; - } } else { @@ -116,7 +104,7 @@ chooser->setMainWidget(accSelector); int ret = chooser->exec(); - Kopete::Account *account = accSelector->selectedItem(); + account = accSelector->selectedItem(); delete chooser; if (ret == QDialog::Rejected || account == 0) @@ -126,7 +114,26 @@ } } + if (!account->isConnected()) + { + kDebug(14153) << k_funcinfo << "Can't add contact, we are offline!" << endl; + KMessageBox::sorry( Kopete::UI::Global::mainWidget(), i18n("You must be online to add a contact."), i18n("ICQ") ); + return; + } + QString nickuin = nick.isEmpty() ? + i18n("'%1'", uin) : + i18n("'%1' (%2)", nick, uin); + + if (KMessageBox::questionYesNo(Kopete::UI::Global::mainWidget(), + i18n("Do you want to add %1 to your contact list?", nickuin), QString::null, + KGuiItem( i18n("Add") ), KGuiItem( i18n("Do Not Add") )) + != KMessageBox::Yes) + { + kDebug(14153) << k_funcinfo << "Cancelled" << endl; + return; + } + kDebug(14153) << k_funcinfo << "Adding Contact; uin = " << uin << ", nick = '" << nick << "', firstname = '" << first << "', lastname = '" << last <<"'" << endl;