| Summary: | Kopete was left running for several hours (I was afk) and ended whith signal 11 | ||
|---|---|---|---|
| Product: | [Unmaintained] kopete | Reporter: | Renato G. dos Santos <linuxer> |
| Component: | general | Assignee: | Kopete Developers <kopete-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | ||
| Priority: | NOR | ||
| Version First Reported In: | 0.7.1 | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Renato G. dos Santos
2003-08-31 18:30:56 UTC
disable that crappy autoconnect plugin, it just does not work. Does the patch from bug 63717 work for this bug as well? > #31 0x409e171c in KMessageBox::error(QWidget*, QString const&, QString >const&, int) () from /usr/lib/kde3/lib/libkdeui.so.4 > #32 0x41dbfe75 in OscarAccount::slotError(QString, int) () > from /usr/lib/kde3/lib/libkopete_oscar.so.0 >[...] > #64 0x40e5ba48 in QEventLoop::processEvents(unsigned) () >[...] > #67 0x41065f21 in QDialog::exec() () from /usr/lib/qt3/lib/libqt-mt.so.3 > #68 0x409df297 in KWritePermsIcon::status() const () > #69 0x409e171c in KMessageBox::error(QWidget*, QString const&, QString > #70 0x41dbfe75 in OscarAccount::slotError(QString, int) () [...] > #105 0x41065f21 in QDialog::exec() () from /usr/lib/qt3/lib/libqt-mt.so.3 [...] > #107 0x409e171c in KMessageBox::error(QWidget*, QString const&, QString > > #108 0x41ee08d7 in JabberAccount::slotError(Jabber::StreamError const&) () Looks like the connection was broken. hasn't anyone said processEvent is not good? I consider it's a KMessageBox bug. We should have a way to have non-modale error dialog for such as error message box, or even notify ones. (or at least which does not call ProcessEvent) I remember tons of problem i had in MSN. I workarounded with QTimer::sigleShot to show dialog, but that's ugly. Anyway, until we have non-modale MessageBox, we have to do such as workaround in kopete. Subject: Re: [Kopete-devel] Kopete was left running for several hours (I was afk) and ended whith signal 11
On Saturday 13 September 2003 23:20, Olivier Goffart wrote:
> hasn't anyone said processEvent is not good?
Yes, me, but note that this is not qApp->processEvents, this one uses a real
(nested) QEventLoop. That's a lot safer in general. You get a new event loop
whenever you show a modal dialog (i.e. also a message box) and just think
about it, there's no way to avoid besides showing the dialog non-modal, but
then you don't get a result back.
<short-explanation>
int foo = KMessageBox( ... );
This means you can't return from this method until you have a return value.
You need an event loop to handle a LOT of stuff going on before the method
can return in the first place though. The solution used for modal dialogs is
a nested event loop, which since Qt 3.1 introduced the QEventLoop class works
reliably for all cases except when events happening in the nested event loop
delete the objects that were showing the modal dialog in the first place.
I.e., if JabberAccount::slotError shows a dialog, while waiting for input the
JabberAccount is deleted, or variables are changed behind
JabberAccount::slotError's knowing you can get all kinds of funky results
when the message box returns.
Another solution is to use dialogs that are just shown and don't wait for user
input if they only have an ok button, so the normal event loop can be used,
or use async message boxes in general, though that's complicated in the code.
<short-explanation>
Yes, but in that case, you are not exepting any restult from the message box. example on MSN, when i parse a command (i.e. i'm deep into a lot of MSNSocket's functions which parse strings, and exept having some m_buffer or stuff like that) I would like to popup a dialog saying "you have been disconnected because ..... [OK]" This is just before the disconnection. and when the disconneciton occurs, the msnsocket is deleted. Such as message require ugly work around, and some of them are not even yet totaly fixed. For example, in this case, the problem is with OscarSocket. i don't know oscar, so i can't realy says, but maybe the isDisconnected flag is set after the messagebox::error calling. or the m_stuff=0L .... Subject: Re: [Kopete-devel] Kopete was left running for several hours (I was afk) and ended whith signal 11
On Sunday 14 September 2003 14:17, Olivier Goffart wrote:
> example on MSN, when i parse a command (i.e. i'm deep into a lot of
> MSNSocket's functions which parse strings, and exept having some m_buffer
> or stuff like that) I would like to popup a dialog saying "you have been
> disconnected because ..... [OK]"
Yup, I understood that.
Once again David Faure saved the day (on IRC) ;)
We need KMessageBox::queuedMessageBox here. Now we "only" need to identify all
message boxes that fall into this category...
Just committed that queuedMessageBox for oscar. eventually JabberAccount::slotError() needs the same fix but I leave that to Till before I go and break Jabber. Subject: kdenetwork/kopete/protocols/jabber CVS commit by mattr: Finish the fix for 63524 by using queuedMessageBox in Jabber as well. Okayed by Till CCMAIL: 63524-done@bugs.kde.org M +12 -12 jabberaccount.cpp 1.84 |