SUMMARY STEPS TO REPRODUCE 1. I set the trash folder for an IMAP account to an IMAP folder instead of a local folder. 2. I closed kmail after a long time. OBSERVED RESULT When I opened kmail, I got the following message: The Email program encountered a fatal error and will terminate now. The error was: Could not create collection trash, resourceId 4 and then it closes without letting me do anything. EXPECTED RESULT Not showing any error and not closing. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Linux (x86_64) release 5.4.28-1-lts (available in About System) KDE Plasma Version: 5.18.3-1 KDE Frameworks Version: 5.68.0-1 (not sure) Qt Version: 5.14.1-3 ADDITIONAL INFORMATION When launching kmail from a terminal, I get this messages: org.kde.pim.akonadicore: Failed SpecialCollectionsRequestJob::slotResult "Could not create collection trash, resourceId 4" org.kde.pim.mailcommon: "The Email program encountered a fatal error and will terminate now.\nThe error was:\nCould not create collection trash, resourceId 4" qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 1988, resource id: 117440613, major code: 130 (Unknown), minor code: 3 qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 2008, resource id: 117440613, major code: 130 (Unknown), minor code: 3 qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 2011, resource id: 117440613, major code: 130 (Unknown), minor code: 3
Same problem from long time ago. The bug still in Kmil 20.12.2. Not always happen, but is almost every time, with many accounts configured. Just set trash folder and restart kmail.
(In reply to Erick Osorio from comment #1) > Same problem from long time ago. The bug still in Kmil 20.12.2. > > Not always happen, but is almost every time, with many accounts configured. > Just set trash folder and restart kmail. I've the same problem here with kmail 20.12.3. But how can I set trash folder? While the error message shows up, I can open settings, but I can't configure anything. After closing the message, kmail terminates.
Removing the "local folders" agent (akonadi console) did the trick. But it's a weird bug and alive since at least 2014.
Created attachment 161156 [details] strace log