Bug 406946

Summary: Akonadi crashes when sending a large attachment
Product: [Applications] kontact Reporter: Aaron Williams <aaronw>
Component: mailAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version: 5.11.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Aaron Williams 2019-04-27 02:53:02 UTC
SUMMARY

I tried to attach a file without realizing that the file was 829MB.  Every time I attempt to attach it kontact crashes.

STEPS TO REPRODUCE
1. Attempt to attach 829MB file to email
2. Watch Kontact crash
3. 

OBSERVED RESULT
Crash

EXPECTED RESULT
Possibly a complaint but otherwise it should succeed.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma:  5.15.4
(available in About System)
KDE Plasma Version: 5.15.4 
KDE Frameworks Version: 19.04.0
Qt Version: 5.12.3

ADDITIONAL INFORMATION
Comment 1 Christophe Marin 2019-04-28 08:42:56 UTC
Do you have a backtrace?
Comment 2 Aaron Williams 2019-04-28 20:36:36 UTC
Unfortunately, I have been unable to get a backtrace. It is very repeatable.
Comment 3 Christoph Feck 2019-05-15 00:13:52 UTC
Base64 encoding will the file grow to 1105 million characters. With Qt's QChar being 16-bit wide, it will need 2210 MB space, but Qt's containers only allow 2147 MB (2^31 bytes).

In other words, the backtrace will most certainly be the same as other backtraces that document failed allocations from QArrayData::allocate().