Bug 358430

Summary: Consecutive quotes make message extremely long, which in turn makes KMail freeze when replying.
Product: [Applications] kmail2 Reporter: Angelos Skembris <a.skembris>
Component: composerAssignee: kdepim bugs <kdepim-bugs>
Status: CONFIRMED ---    
Severity: normal CC: alci, morten, thomas
Priority: NOR    
Version: 5.1   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Message that causes freexing in Composer window

Description Angelos Skembris 2016-01-23 16:28:30 UTC
I exchanged a few messages with one of my clients, each a few lines long. The first message they sent me had an attachment but the rest of them didn't.

After a few messages where exchanged, the quoted messages got longer and longer. To make a long story short, after about seven messages, the quoted lines exceeded 5500 lines (I copied and pasted the message on KWrite), most of them empty. Needless to say, the exchanged text was nowhere near as long, more like a hundred lines at most.

Problem is, when I last replied to this message KMail started freezing. It would take up a whole core of the processor for about 30 seconds, and become totally unresponsive. Then, it would unfreeze for a few seconds and then start again. 

Also, selecting this message from the message list view causes KMail to freeze again, albeit for only a few seconds in that case (and it happens only once, the program then behaves normally).

In general, I think there is something iffy about the quoting process. Quoted messages tend to end up with considerable more lines than they originally contained. I will attach the last message so that you can verify that something is wrong with the quoting process.

Copying and pasting the (5000 line long) message in a new composer window seems to reproduce the behaviour.

I don't mind the message bloat so much, but the freezing is extremely annoying.

Using version 5.1.1 and openSUSE rpms. At your disposal for further testing.

Reproducible: Always

Steps to Reproduce:
1. Create a new message or reply to an old message with a large amount of quoted lines (not sure but more than 5000?)


Actual Results:  
Kmail freezes for 30 seconds every few seconds.

Expected Results:  
Kmail should behave normally
Comment 1 Angelos Skembris 2016-01-23 16:30:50 UTC
Created attachment 96800 [details]
Message that causes freexing in Composer window
Comment 2 Angelos Skembris 2016-01-23 16:33:44 UTC
Sorry, forgot to add that I have two system that I use for email correspondence. Both of them run OpenSUSE KDE (one of them is Tumbleweed), but they are both on the same version of KMail.

The redundant line addition problem when quoting was present in previous versions, and I have encountered this behaviour in other extremely long messages as well.
Comment 3 Vincenzo Reale 2017-08-24 20:55:06 UTC
I can confirm it. 
Exchanging some messages, the body becomes too long and the composer freezes all the time.
The same behavior is still present on KMail 5.6 on Archlinux, Plasma 5.10.5, KDE Frameworks 5.37 and KDE Applications 17.08.
Comment 4 thomas 2022-04-27 20:04:35 UTC
Seems to be an issue still, I have a few emails which lead to similar freezing as described here.
Operating System: Arch Linux
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Kernel Version: 5.17.4-arch1-1 (64-bit)
Graphics Platform: X11
Comment 5 Franck Routier (alci) 2022-06-22 19:15:26 UTC
Probably similar to this one: https://bugs.kde.org/show_bug.cgi?id=334469