Bug 111859 - search with status: unwanted behaviour
Summary: search with status: unwanted behaviour
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail
Classification: Applications
Component: search (show other bugs)
Version: 1.10.1
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: triaged
: 127465 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-01 04:35 UTC by Baris Metin
Modified: 2015-04-12 10:17 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Baris Metin 2005-09-01 04:35:12 UTC
Version:           1.8.90 (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc (GCC) 3.3.5-20050130 (Pardus Linux 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1) 
OS:                Linux

I started a search for messages that have status "unread" and saved the search with name "unread mails" (using the edit box "Search folder name").

I had over 5000 unread mails, Kmail found all and created a folder under "Searches". But when I clicked on the newly created "unread mails" folder, Kmail jumped to the first entry and marked it as unread, removed it from the list and then jumped the following one immediately.

This process continued for a while (a time/cpu consuming process) and I decided to delete the search to stop Kmail marking all my unread mails as read. But after clicking the delete button Kmail crashed. I've restarted it and tried to delete the search once more, it again crashed.

I was able to delete the search by deleting the corresponding file under ~/.kde/share/apps/kmail/search
Comment 1 S.Çağlar ONUR 2005-09-01 05:17:35 UTC
Same here with 3.4.2, by the way this bug will my favorite one :P
Comment 2 Carsten Burghardt 2005-09-01 08:03:40 UTC
But do you expect from such a search?
Nevertheless it should not crash so we need a backtrace with debug 
information.
Comment 3 Baris Metin 2005-09-01 18:56:31 UTC
I expect it not to mark all my unread messages as read, before I read them. This clearly makes the saved search unusable.

I'll try to reproduce the crash and send a backtrace without ruining my massages' status information. This can take time, sorry.
Comment 4 S.Çağlar ONUR 2005-09-01 19:41:23 UTC
let me state my problem and my story :)

I migrated my mails evo to kmail, yesterday. And i asked a question to Barış for learning is there a "Virtual Folder" concept on kmail or not cause im using this "Unread Mail" Virtual Folder on evo and i dont want to give away this. So he said "Yes, you can store your searches and these searches updated for you"

So i store a search with following rules "if Status is Unread then show in Unread Folder".  

After that whenever i want to check my mails, kmail freezes (no crash, no backtrace on _my_ situation) for about 2-3 minutes, no GUI, no response but with just %100 CPU and disk I/O.

So after some investigation my "Unread Mails" folder enters a loop when i click on it. While its updating itself with unread mails, it also marks these mails as "Read" (it jumps first mail automatically so it's status changed to "Read") and then update itself again because the first mail in list is not "unread" status. This goes until all mails marked as "Read" by "Unread Mails Search Folder"

As a result, kmail neither crashed nor gives any backtrace but freezes for minutes. So i think, disabling to jump first mail automatically while search folder updating itself can solve this problem.
Comment 5 Andreas Gungl 2005-09-01 21:14:49 UTC
> So i think, disabling to jump first mail automatically while
> search folder updating itself can solve this problem.


You should simply disable the option to mark messages as read automatically 
(or provide a high value  to mark it after n seconds). See KMail Settings -> 
Misc page.

What happens is quite easy to explain, but it might be worth having KMail 
detecting such a situation and ask the user about it.
Comment 6 Hanus Adler 2006-07-08 13:42:39 UTC
It would be much more useful if kmail could behave like mutt - when you limit display to only unread mails, then even if you read some of the mails, they still remain on the list (and new incoming messages are added, so it is not completely static).

I wonder how difficult it would be for kmail to behave like mutt - i.e. not to *remove* mails from a search folder even though the search criteria no longer apply.
Comment 7 Jaime Torres 2008-09-18 13:28:56 UTC
In kmail 1.10.1, the easiest way to see non readed mails is using the status filter.
In any case, the problem with the search and the crash, looks also solved, because when the actual element disspaears from the search (being marked as readed), no other mail is selected, therefore only one mail is marked as readed.
Comment 8 Dominik Tritscher 2008-09-20 00:56:21 UTC
I can confirm that the crash is gone in kmail 1.10.1
But the problem, that this kind of search folder isn't usable as the messages are disappearing from the list, isn't fixed, so I wouldn't consider the bug report to be closed.
Of course there are other possibilities like the status filter, but this filter is only helpfull when search a single folder for unread mails.
So i lowered the severity to normal and leave the report itself open.
Comment 9 FiNeX 2008-11-19 20:24:26 UTC
Changed severity to "crash". I hope to have selected only the right bugs (>100) :-)
Comment 10 Dominik Tritscher 2009-01-04 18:12:13 UTC
You selected at least one false bug ;)
As stated in my last comment, kmail doesn't crash anymore when trying to reproduce this bug. There is no loop and no crash when deleting the search folder. I just checked again with kmail 1.10.3
Lowered severity again to normal and adjusted subject.
Comment 11 FiNeX 2009-01-04 23:28:03 UTC
Thanks Dominik!
Comment 12 Björn Ruberg 2009-12-26 00:32:47 UTC
*** Bug 127465 has been marked as a duplicate of this bug. ***
Comment 13 Laurent Montel 2015-04-12 10:17:25 UTC
Thank you for taking the time to file a bug report.

KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2.

We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.