Summary: | Crash when sending email - error during ssl greeting | ||
---|---|---|---|
Product: | [Unmaintained] trojita | Reporter: | Nicolás Sirolli <nmsirolli> |
Component: | SMTP | Assignee: | Trojita default assignee <trojita-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | critical | ||
Priority: | NOR | ||
Version: | git | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/trojita/3995343662f660bbf3e353cacc1778662ccd0c16 | Version Fixed In: | |
Sentry Crash Report: |
Description
Nicolás Sirolli
2013-06-17 13:40:23 UTC
Thanks, Trojita should definitely not crash :). Could you please provide the following information and reopen this bugreport? - The SMTP settings: hostname, port, connection method, state of the "perform STARTTLS" - Could you also get a proper backtrace? Simply installing the trojita-nightly-debuginfo and running the application from inside `gdb` shall do the trick (run `gdb --ex run trojita`, make it crash, then enter `backtrace` at the gdb prompt and report the result). When you have attached the requested data, please do not forget to reopen this bugreport. My SMTP settings are the following: Hostname: smtp.dm.uba.ar Port: 587 Connection method: Secure SMTP Perform SSTARTTLS: Yes (this option is grey, and can not be changed) Authenticate: Yes Here is the backtrace: (gdb) backtrace #0 0x00007ffff362e3d5 in raise () from /lib64/libc.so.6 #1 0x00007ffff362f858 in abort () from /lib64/libc.so.6 #2 0x00007ffff366e07b in __libc_message () from /lib64/libc.so.6 #3 0x00007ffff3673bf6 in malloc_printerr () from /lib64/libc.so.6 #4 0x00007ffff3674973 in _int_free () from /lib64/libc.so.6 #5 0x00007ffff456c4c2 in QObjectPrivate::deleteChildren() () from /usr/lib64/libQtCore.so.4 #6 0x00007ffff4e1c3cc in QWidget::~QWidget() () from /usr/lib64/libQtGui.so.4 #7 0x0000000000482368 in ?? () #8 0x00000000004823ee in ?? () #9 0x00007ffff456e7a8 in QObject::event(QEvent*) () from /usr/lib64/libQtCore.so.4 #10 0x00007ffff4e2188a in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4 #11 0x00007ffff4dd286c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4 #12 0x00007ffff4dd6ceb in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4 #13 0x00007ffff4559d8e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4 #14 0x00007ffff455d6f1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQtCore.so.4 #15 0x00007ffff4588133 in ?? () from /usr/lib64/libQtCore.so.4 #16 0x00007ffff10ba7d5 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0 #17 0x00007ffff10bab08 in ?? () from /usr/lib64/libglib-2.0.so.0 #18 0x00007ffff10babc4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0 #19 0x00007ffff45882c6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4 #20 0x00007ffff4e72c1e in ?? () from /usr/lib64/libQtGui.so.4 #21 0x00007ffff4558adf in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4 #22 0x00007ffff4558d68 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4 #23 0x00007ffff52869c8 in QDialog::exec() () from /usr/lib64/libQtGui.so.4 #24 0x00007ffff52a7242 in ?? () from /usr/lib64/libQtGui.so.4 #25 0x00007ffff52a730f in QMessageBox::critical(QWidget*, QString const&, QString const&, QFlags<QMessageBox::StandardButton>,---Type <return> to continue, or q <return> to quit--- #7 0x0000000000482368 in ?? () #8 0x00000000004823ee in ?? () lacks interesting section, but crashes for loosing a qobject during a nested eventloop (and usually try deleting it afterwards) -> strategy is QWeakPointer around every "::exec()". Unfortunately, I still cannot reproduce this. Nicolas, please make sure that you have reinstalled both the trojita-nightly and trojita-nightly-debuginfo packages, and try once again. (If you use the non-nightly variant, it's "trojita" and "trojita-debuginfo".) The failure *could* be in the ComposeWidget::gotError, but I'd like to understand how this gets triggered in the first place. The IMAP log also suggests that you're trying to reply to an existing mail. Is that important? Does it crash even when writing a mail "from scratch"? Anyway, there's one more error in the log, the logic wrapping the mail submission proceeds further even though the actual submission failed -- the code should have never proceed to the STATE_UPDATING_FLAGS state. This is due to another bug in the QwwSmtpClient, see https://git.reviewboard.kde.org/r/111073/ for a fix. After that is merged, I'd be interested to know whether it happens to fix the problem for Nicolas. I'm sorry, I was using trojita-nightly and the non-nightly debug package; maybe that was the problem. Here I go again, with both nightly versions: (gdb) backtrace #0 0x00007ffff3677654 in free () from /lib64/libc.so.6 #1 0x00007ffff456c4c2 in QObjectPrivate::deleteChildren() () from /usr/lib64/libQtCore.so.4 #2 0x00007ffff4e1c3cc in QWidget::~QWidget() () from /usr/lib64/libQtGui.so.4 #3 0x0000000000482368 in Gui::ComposeWidget::~ComposeWidget (this=0xefc6f0, __in_chrg=<optimized out>) at ComposeWidget.cpp:141 #4 0x00000000004823ee in Gui::ComposeWidget::~ComposeWidget (this=0xefc6f0, __in_chrg=<optimized out>) at ComposeWidget.cpp:144 #5 0x00007ffff456e7a8 in QObject::event(QEvent*) () from /usr/lib64/libQtCore.so.4 #6 0x00007ffff4e2188a in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4 #7 0x00007ffff4dd286c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4 #8 0x00007ffff4dd6ceb in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4 #9 0x00007ffff4559d8e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4 #10 0x00007ffff455d6f1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQtCore.so.4 #11 0x00007ffff4588133 in ?? () from /usr/lib64/libQtCore.so.4 #12 0x00007ffff10ba7d5 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0 #13 0x00007ffff10bab08 in ?? () from /usr/lib64/libglib-2.0.so.0 #14 0x00007ffff10babc4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0 #15 0x00007ffff45882c6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4 #16 0x00007ffff4e72c1e in ?? () from /usr/lib64/libQtGui.so.4 #17 0x00007ffff4558adf in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4 #18 0x00007ffff4558d68 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4 #19 0x00007ffff52869c8 in QDialog::exec() () from /usr/lib64/libQtGui.so.4 #20 0x00007ffff52a7242 in ?? () from /usr/lib64/libQtGui.so.4 #21 0x00007ffff52a730f in QMessageBox::critical(QWidget*, QString const&, QString const&, QFlags<QMessageBox::StandardButton>, QMessageBox::StandardButton) () from /usr/lib64/libQtGui.so.4 #22 0x0000000000484e1e in Gui::ComposeWidget::gotError (this=0xefc6f0, error=...) at ComposeWidget.cpp:515 I was replying to an existing mail, but that is not important. The log above is from a crash obtained by writing a mail from scratch. @ Nicolas: a) Does the composer widget close? (running in gdb you should be able to see that) b) If so: when? Before or after clicking the dialog? c) Can you compile a patch? I can reproduce this problem now. A few simple steps: - Connect to SMTP using SSL to a port of the plaintext service (e.g. "secure SMTP" to port 25) - Set up the SMTP server so that it has a low timeout - Try sending mail, an error message about SSL pops up immediately. Do *not* click on it. - Wait for another error message when the timeout finally kicks in. A second message box appears, and this is the backtrace: #0 0x00007f90d7bbe533 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87 #1 0x00007f90d8921916 in g_main_context_poll (n_fds=6, fds=0x2944710, timeout=49, context=0x244eb00, priority=<optimized out>) at gmain.c:3440 #2 g_main_context_iterate (context=0x244eb00, block=1, dispatch=1, self=<optimized out>) at gmain.c:3141 #3 0x00007f90d8921a6c in g_main_context_iteration (context=0x244eb00, may_block=1) at gmain.c:3207 #4 0x00007f90d91f389f in QEventDispatcherGlib::processEvents (this=0x2448990, flags=...) at kernel/qeventdispatcher_glib.cpp:424 #5 0x00007f90d9b3b156 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204 #6 0x00007f90d91bbc92 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149 #7 0x00007f90d91bc007 in QEventLoop::exec (this=0x7fff837f67f0, flags=...) at kernel/qeventloop.cpp:204 #8 0x00007f90d9fca66e in QDialog::exec (this=0x7fff837f6890) at dialogs/qdialog.cpp:554 #9 0x00007f90d9ff0698 in showNewMessageBox (parent=<optimized out>, icon=<optimized out>, title=..., text=..., buttons=..., defaultButton=QMessageBox::NoButton) at dialogs/qmessagebox.cpp:1538 #10 0x00007f90d9ff078f in QMessageBox::critical (parent=<optimized out>, title=..., text=..., buttons=..., defaultButton=<optimized out>) at dialogs/qmessagebox.cpp:1670 #11 0x000000000049cf56 in Gui::ComposeWidget::gotError (this=0x350c320, error=...) at ../../../../trojita/src/Gui/ComposeWidget.cpp:515 #12 0x00000000004cf570 in Gui::ComposeWidget::qt_static_metacall (_o=0x350c320, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0x7fff837f6b80) at moc_ComposeWidget.cpp:84 #13 0x00007f90d91d4ec1 in QMetaObject::activate (sender=0x2d85810, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff837f6b80) at kernel/qobject.cpp:3539 #14 0x0000000000618d0f in Composer::Submission::failed (this=0x2d85810, _t1=...) at moc_Submission.cpp:177 #15 0x0000000000615b96 in Composer::Submission::gotError (this=0x2d85810, error=...) at ../../../../trojita/src/Composer/Submission.cpp:289 #16 0x0000000000618a41 in Composer::Submission::qt_static_metacall (_o=0x2d85810, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0x7fff837f6dc0) at moc_Submission.cpp:88 #17 0x00007f90d91d4ec1 in QMetaObject::activate (sender=0x3c1ede0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff837f6dc0) at kernel/qobject.cpp:3539 #18 0x00000000005e7a1f in MSA::AbstractMSA::error (this=0x3c1ede0, _t1=...) at moc_AbstractMSA.cpp:133 #19 0x00000000005e6087 in MSA::SMTP::handleError (this=0x3c1ede0, err=QAbstractSocket::RemoteHostClosedError, msg=...) at ../../../../trojita/src/MSA/SMTP.cpp:63 #20 0x00000000005e7d57 in MSA::SMTP::qt_static_metacall (_o=0x3c1ede0, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0x7fff837f6fa0) at moc_SMTP.cpp:54 #21 0x00007f90d91d4ec1 in QMetaObject::activate (sender=0x30c6e90, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff837f6fa0) at kernel/qobject.cpp:3539 #22 0x00000000005ee1cf in QwwSmtpClient::socketError (this=0x30c6e90, _t1=QAbstractSocket::RemoteHostClosedError, _t2=...) at ./moc_qwwsmtpclient.cpp:251 #23 0x00000000005ee128 in QwwSmtpClientPrivate::onError (this=0x4044d90, e=QAbstractSocket::RemoteHostClosedError) at ../../../../trojita/src/qwwsmtpclient/qwwsmtpclient.cpp:141 #24 0x00000000005f45f7 in QwwSmtpClient::qt_static_metacall (_o=0x30c6e90, _c=QMetaObject::InvokeMetaMethod, _id=16, _a=0x7fff837f7200) at ./moc_qwwsmtpclient.cpp:134 #25 0x00007f90d91d4ec1 in QMetaObject::activate (sender=0x3d71020, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff837f7200) at kernel/qobject.cpp:3539 #26 0x00007f90d9618cc1 in QAbstractSocket::error (this=<optimized out>, _t1=QAbstractSocket::RemoteHostClosedError) at .moc/release-shared/moc_qabstractsocket.cpp:247 #27 0x00007f90d963b7ce in QSslSocketPrivate::_q_errorSlot (this=0x3902510, error=QAbstractSocket::RemoteHostClosedError) at ssl/qsslsocket.cpp:2186 #28 0x00007f90d9641af7 in qt_static_metacall (_a=<optimized out>, _id=<optimized out>, _o=<optimized out>, _c=<optimized out>) at .moc/release-shared/moc_qsslsocket.cpp:97 #29 QSslSocket::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at .moc/release-shared/moc_qsslsocket.cpp:77 #30 0x00007f90d91d4ec1 in QMetaObject::activate (sender=0x30c7040, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff837f73d0) at kernel/qobject.cpp:3539 #31 0x00007f90d9618cc1 in QAbstractSocket::error (this=<optimized out>, _t1=QAbstractSocket::RemoteHostClosedError) at .moc/release-shared/moc_qabstractsocket.cpp:247 #32 0x00007f90d961b101 in QAbstractSocketPrivate::readFromSocket (this=0x34e5a50) at socket/qabstractsocket.cpp:1172 #33 0x00007f90d961b434 in QAbstractSocketPrivate::canReadNotification (this=0x34e5a50) at socket/qabstractsocket.cpp:628 #34 0x00007f90d9624931 in event (this=<optimized out>, e=<optimized out>) at socket/qnativesocketengine.cpp:1151 #35 QReadNotifier::event (this=<optimized out>, e=<optimized out>) at socket/qnativesocketengine.cpp:1148 #36 0x00007f90d9a7b794 in QApplicationPrivate::notify_helper (this=0x244c190, receiver=0x353cff0, e=0x7fff837f79f0) at kernel/qapplication.cpp:4562 #37 0x00007f90d9a8085d in QApplication::notify (this=0x7fff837fa810, receiver=0x353cff0, e=0x7fff837f79f0) at kernel/qapplication.cpp:3944 #38 0x00007f90d91bd70c in QCoreApplication::notifyInternal (this=0x7fff837fa810, receiver=0x353cff0, event=0x7fff837f79f0) at kernel/qcoreapplication.cpp:946 #39 0x00007f90d91f2dc8 in sendEvent (event=0x7fff837f79f0, receiver=<optimized out>) at kernel/qcoreapplication.h:231 #40 socketNotifierSourceDispatch (source=0x244fc80) at kernel/qeventdispatcher_glib.cpp:110 #41 0x00007f90d8921603 in g_main_dispatch (context=0x244eb00) at gmain.c:2539 #42 g_main_context_dispatch (context=0x244eb00) at gmain.c:3075 #43 0x00007f90d8921980 in g_main_context_iterate (context=0x244eb00, block=1, dispatch=1, self=<optimized out>) at gmain.c:3146 #44 0x00007f90d8921a6c in g_main_context_iteration (context=0x244eb00, may_block=1) at gmain.c:3207 #45 0x00007f90d91f391e in QEventDispatcherGlib::processEvents (this=0x2448990, flags=...) at kernel/qeventdispatcher_glib.cpp:426 #46 0x00007f90d9b3b156 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204 #47 0x00007f90d91bbc92 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149 #48 0x00007f90d91bc007 in QEventLoop::exec (this=0x7fff837f7c50, flags=...) at kernel/qeventloop.cpp:204 #49 0x00007f90d9fca66e in QDialog::exec (this=0x7fff837f7cf0) at dialogs/qdialog.cpp:554 #50 0x00007f90d9ff0698 in showNewMessageBox (parent=<optimized out>, icon=<optimized out>, title=..., text=..., buttons=..., defaultButton=QMessageBox::NoButton) at dialogs/qmessagebox.cpp:1538 #51 0x00007f90d9ff078f in QMessageBox::critical (parent=<optimized out>, title=..., text=..., buttons=..., defaultButton=<optimized out>) at dialogs/qmessagebox.cpp:1670 #52 0x000000000049cf56 in Gui::ComposeWidget::gotError (this=0x350c320, error=...) at ../../../../trojita/src/Gui/ComposeWidget.cpp:515 #53 0x00000000004cf570 in Gui::ComposeWidget::qt_static_metacall (_o=0x350c320, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0x7fff837f7fe0) at moc_ComposeWidget.cpp:84 #54 0x00007f90d91d4ec1 in QMetaObject::activate (sender=0x2d85810, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff837f7fe0) at kernel/qobject.cpp:3539 #55 0x0000000000618d0f in Composer::Submission::failed (this=0x2d85810, _t1=...) at moc_Submission.cpp:177 #56 0x0000000000615b96 in Composer::Submission::gotError (this=0x2d85810, error=...) at ../../../../trojita/src/Composer/Submission.cpp:289 #57 0x0000000000618a41 in Composer::Submission::qt_static_metacall (_o=0x2d85810, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0x7fff837f8220) at moc_Submission.cpp:88 #58 0x00007f90d91d4ec1 in QMetaObject::activate (sender=0x3c1ede0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff837f8220) at kernel/qobject.cpp:3539 #59 0x00000000005e7a1f in MSA::AbstractMSA::error (this=0x3c1ede0, _t1=...) at moc_AbstractMSA.cpp:133 #60 0x00000000005e6087 in MSA::SMTP::handleError (this=0x3c1ede0, err=QAbstractSocket::SslHandshakeFailedError, msg=...) at ../../../../trojita/src/MSA/SMTP.cpp:63 #61 0x00000000005e7d57 in MSA::SMTP::qt_static_metacall (_o=0x3c1ede0, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0x7fff837f8400) at moc_SMTP.cpp:54 #62 0x00007f90d91d4ec1 in QMetaObject::activate (sender=0x30c6e90, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff837f8400) at kernel/qobject.cpp:3539 #63 0x00000000005ee1cf in QwwSmtpClient::socketError (this=0x30c6e90, _t1=QAbstractSocket::SslHandshakeFailedError, _t2=...) at ./moc_qwwsmtpclient.cpp:251 #64 0x00000000005ee128 in QwwSmtpClientPrivate::onError (this=0x4044d90, e=QAbstractSocket::SslHandshakeFailedError) at ../../../../trojita/src/qwwsmtpclient/qwwsmtpclient.cpp:141 #65 0x00000000005f45f7 in QwwSmtpClient::qt_static_metacall (_o=0x30c6e90, _c=QMetaObject::InvokeMetaMethod, _id=16, _a=0x7fff837f8650) at ./moc_qwwsmtpclient.cpp:134 #66 0x00007f90d91d4ec1 in QMetaObject::activate (sender=0x3d71020, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff837f8650) at kernel/qobject.cpp:3539 #67 0x00007f90d9618cc1 in QAbstractSocket::error (this=<optimized out>, _t1=QAbstractSocket::SslHandshakeFailedError) at .moc/release-shared/moc_qabstractsocket.cpp:247 #68 0x00007f90d964755f in QSslSocketBackendPrivate::startHandshake (this=0x3902510) at ssl/qsslsocket_openssl.cpp:1281 #69 0x00007f90d9648a06 in QSslSocketBackendPrivate::transmit (this=0x3902510) at ssl/qsslsocket_openssl.cpp:1108 #70 0x00007f90d9641b09 in qt_static_metacall (_a=<optimized out>, _id=<optimized out>, _o=<optimized out>, _c=<optimized out>) at .moc/release-shared/moc_qsslsocket.cpp:98 #71 QSslSocket::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at .moc/release-shared/moc_qsslsocket.cpp:77 #72 0x00007f90d91d4ec1 in QMetaObject::activate (sender=0x30c7040, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3539 #73 0x00007f90d961b66f in QAbstractSocketPrivate::canReadNotification (this=0x34e5a50) at socket/qabstractsocket.cpp:654 #74 0x00007f90d9624931 in event (this=<optimized out>, e=<optimized out>) at socket/qnativesocketengine.cpp:1151 #75 QReadNotifier::event (this=<optimized out>, e=<optimized out>) at socket/qnativesocketengine.cpp:1148 #76 0x00007f90d9a7b794 in QApplicationPrivate::notify_helper (this=0x244c190, receiver=0x353cff0, e=0x7fff837fa130) at kernel/qapplication.cpp:4562 ---Type <return> to continue, or q <return> to quit--- #77 0x00007f90d9a8085d in QApplication::notify (this=0x7fff837fa810, receiver=0x353cff0, e=0x7fff837fa130) at kernel/qapplication.cpp:3944 #78 0x00007f90d91bd70c in QCoreApplication::notifyInternal (this=0x7fff837fa810, receiver=0x353cff0, event=0x7fff837fa130) at kernel/qcoreapplication.cpp:946 #79 0x00007f90d91f2dc8 in sendEvent (event=0x7fff837fa130, receiver=<optimized out>) at kernel/qcoreapplication.h:231 #80 socketNotifierSourceDispatch (source=0x244fc80) at kernel/qeventdispatcher_glib.cpp:110 #81 0x00007f90d8921603 in g_main_dispatch (context=0x244eb00) at gmain.c:2539 #82 g_main_context_dispatch (context=0x244eb00) at gmain.c:3075 #83 0x00007f90d8921980 in g_main_context_iterate (context=0x244eb00, block=1, dispatch=1, self=<optimized out>) at gmain.c:3146 #84 0x00007f90d8921a6c in g_main_context_iteration (context=0x244eb00, may_block=1) at gmain.c:3207 #85 0x00007f90d91f389f in QEventDispatcherGlib::processEvents (this=0x2448990, flags=...) at kernel/qeventdispatcher_glib.cpp:424 #86 0x00007f90d9b3b156 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204 #87 0x00007f90d91bbc92 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149 #88 0x00007f90d91bc007 in QEventLoop::exec (this=0x7fff837fa390, flags=...) at kernel/qeventloop.cpp:204 #89 0x00007f90d91c1c65 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1218 #90 0x000000000044af8e in main (argc=1, argv=0x7fff837fa918) at ../../../../trojita/src/Gui/main.cpp:60 When you close the topmost error message, Trojita crashes. Git commit 3995343662f660bbf3e353cacc1778662ccd0c16 by Jan Kundrát. Committed on 17/06/2013 at 17:50. Pushed by jkt into branch 'master'. SMTP: do not signal success after hitting a failure earlier on OK, this is some ugly code -- but it appears that it makes QwwSmtpClient more or less work. That class is in a bad need for replacement :(. The problem was that the onDisconnected event handler within the QwwSmtpClient simply checked whether there are any pending commands, and if there are none, it proceeded further towards emitting success even though the connection has never succeeded. This is a wrong assumption in the client's code -- signalling success just because the connection was severed before any command had a chance to be queued is not what I would expect when using such component. This code does *not* prevent duplicate signals about success, but I have yet to see a situation where it breaks something. REVIEW: 111073 M +7 -2 src/MSA/SMTP.cpp http://commits.kde.org/trojita/3995343662f660bbf3e353cacc1778662ccd0c16 Git commit 751a809d8fe30a7b4da64d68c32b698e4c47ea34 by Jan Kundrát. Committed on 17/06/2013 at 17:49. Pushed by jkt into branch 'master'. tests: Make sure that a failed mail submission prevents proceeding any further This, unfortunately, does not help with the QwwSmtpClient because it happily emits done(true) even after hitting errors earlier in the process. This will be addressed in the next commit. M +45 -0 tests/tests/test_Composer_Submission/test_Composer_Submission.cpp M +1 -0 tests/tests/test_Composer_Submission/test_Composer_Submission.h http://commits.kde.org/trojita/751a809d8fe30a7b4da64d68c32b698e4c47ea34 You're getting multiple signals because the object is locked in the nested eventloop of ::exec() The crash-cause here should be the (timered... tsss... ;-) delete-on-close-on-sent Therefore I assume: void ComposeWidget::sent() { if (m_sentMail) return; // don't try to close twice when Qt exits a nested event queue // FIXME: move back to the currently selected mailbox m_sentMail = true; QMetaObject::invokeMethod(this, "close", Qt::QueuedConnection); } should do, where QMetaObject::invokeMethod is simply the correct way to say QTimer::singleShot(0, this, SLOT(close())) (QTimer actually catches this statement and avoids creating a timer and calls the above instead, because this "trick" to get a queued call spread so widely around ;-) (In reply to comment #10) > You're getting multiple signals because the object is locked in the nested > eventloop of ::exec() Sort of -- the QwwSmtpClient also happened to emit failure, followed by emitting failure once again, followed by signaling success. That is quote obviously wrong. You are right that the nested event loops brought havoc to this. I wonder if we could get rid of all nested event loops, eventually, but that's for another bugreport. Patches welcome :) Thanks to both of you! Please, let me know if I can be of any help. Nicolas, could you please check whether the updated trojita-nightly (git.1371551157-105.1 or newer) fixes the problem for you? Yes, it does! (In reply to comment #11) > You are right that the nested event loops brought havoc to > this. If it wasn't there the additional signal wasn't mapped because the object was destroyed. But flushing the signals after the nested event loop exits breaks that conceptual protection. (Of course the sender should not signal nonsense in the first place but the crash occurs due to signal handling across nested event loops) > I wonder if we could get rid of all nested event loops, eventually, It is possible, but you've of course to add a slot for every dialog response handling you're currently doing inline (what looses you the original function and eventually object context) The nested eventloops are often used because they provide a very convenient solution here - with the risk of unpredicted state changes interim :-( |