Summary: | akonadi_resource crash on resume from suspend to RAM | ||
---|---|---|---|
Product: | [Frameworks and Libraries] Akonadi | Reporter: | Andreas Karrenbauer <andreas.karrenbauer> |
Component: | IMAP resource | Assignee: | Kevin Ottens <ervin> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | alex.merry, kdepim-bugs, vkrause |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Andreas Karrenbauer
2010-12-15 23:14:15 UTC
*** Bug 260931 has been marked as a duplicate of this bug. *** commit c6c086a80162d796f3cb2a692f516e092d4faa2c branch master Author: Volker Krause <vkrause@kde.org> Date: Wed Jan 12 16:02:46 2011 +0100 Fix crash when losing network while trying to connect a new session. In this case all already ready sessions disconnect, and with none left, the account object is deleted to prepare the full reconnect. The pending session then fails as well, at which point accessing m_account will crash. BUG: 260009 diff --git a/resources/imap/sessionpool.cpp b/resources/imap/sessionpool.cpp index f541459..e312c1c 100644 --- a/resources/imap/sessionpool.cpp +++ b/resources/imap/sessionpool.cpp @@ -216,10 +216,10 @@ void SessionPool::cancelSessionCreation( KIMAP::Session *session, int errorCode, m_pendingInitialSession = 0; if ( !m_initialConnectDone ) { - emit connectDone( errorCode, - i18n( "Could not connect to the IMAP-server %1.\n%2", - m_account->server(), - errorMessage ) ); + if ( m_account ) + emit connectDone( errorCode, i18n( "Could not connect to the IMAP-server %1.\n%2", m_account->server(), errorMessage ) ); + else // this case can happen when we loose all ready connections while trying to establish a new one for example + emit connectDone( errorCode, i18n( "Cound not connect to the IMAP server.\n%1", errorMessage ) ); disconnect(); killSession( session, LogoutSession ); } else { |