Bug 419929

Summary: kmail closes after setting trash folder
Product: [Applications] kmail2 Reporter: José Alberto <libre>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: normal CC: david, evgom.sid, libre, martin
Priority: NOR    
Version: 5.13.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: strace log

Description José Alberto 2020-04-10 19:07:44 UTC
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
Comment 1 Erick Osorio 2021-02-20 03:39:13 UTC
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.
Comment 2 Martin Brodbeck 2021-03-05 07:33:25 UTC
(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.
Comment 3 Martin Brodbeck 2021-03-05 07:46:31 UTC
Removing the "local folders" agent (akonadi console) did the trick. But it's a weird bug and alive since at least 2014.
Comment 4 David Larochette 2023-08-24 13:53:49 UTC
Created attachment 161156 [details]
strace log