After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 562449 - regression in vfolder functionality with read/deleted messages
regression in vfolder functionality with read/deleted messages
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
2.24.x (obsolete)
Other All
: Normal major
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
evolution[disk-summary]
Depends on:
Blocks: 543389
 
 
Reported: 2008-11-27 13:54 UTC by Brian J. Murrell
Modified: 2009-01-29 15:32 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Don't emit folder changed for vfolders. (1.23 KB, patch)
2009-01-23 08:09 UTC, Srinivasa Ragavan
committed Details | Review

Description Brian J. Murrell 2008-11-27 13:54:36 UTC
Please describe the problem:
Prior to 2.24 when I was reading a vfolder that only viewed unread messages and marked messages either read or deleted, they stayed in the vfolder until I expunged it.

Now as soon as a message is read or deleted it disappears from the vfolder.  While this might seem like the right thing to do, it works counter to the "mark messages read after <n> seconds" feature, making it pretty much useless.

I'd like the old behavior back please.

Steps to reproduce:
1. create a vfolder that matches on unread messages
2. add a folder with unread messages to above vfolder
3. set "mark messages read after <n> seconds" to say, 3 seconds
4. open vfolder and start reading an e-mail


Actual results:
The message disappears while reading it (after 3 seconds).

Expected results:
The message should stick around until I have signaled that I am done reading it, probably by deleting it.

Does this happen every time?
Yes.

Other information:
Comment 1 Srinivasa Ragavan 2008-12-02 14:15:17 UTC
You are with Evolution 2.24.2? If so, can you set 
export CAMEL_DEBUG=vfolderexp 

Start evolution, go to that vfolder and mark a mail as read. Get the log from the console and pasteme.
Comment 2 Brian J. Murrell 2008-12-03 13:38:22 UTC
OK.  There was a ton of crap on the console through starting up evolution, but once it had settled it's start up down, I went to preferences and set the "mark read after <n> seconds" option and then went to a vfolder and clicked on a messages.  after a second or two (n == 1.5) the message disappeared and the next message was selected and after a second or two it disappeared and so on and so on.  This would have continued until the vfolder was empty if I'd have let it.

Here's what evo was saying as it was marking messages read and removing them from the vfolder:

Expression for vfolder 'Unread mail' is ' (or\n  \n     (match-all (not (system-flag  \"Seen\")))\n    \n  \n     (match-all (system-flag  \"Flagged\"))\n    \n  \n     (match-all (not (= (user-tag \"follow-up\") \"\")))\n    \n  )\n'
Expression for vfolder 'Unread mail' is ' (or\n  \n     (match-all (not (system-flag  \"Seen\")))\n    \n  \n     (match-all (system-flag  \"Flagged\"))\n    \n  \n     (match-all (not (= (user-tag \"follow-up\") \"\")))\n    \n  )\n'
Expression for vfolder 'Unread mail' is ' (or\n  \n     (match-all (not (system-flag  \"Seen\")))\n    \n  \n     (match-all (system-flag  \"Flagged\"))\n    \n  \n     (match-all (not (= (user-tag \"follow-up\") \"\")))\n    \n  )\n'
Expression for vfolder 'Unread mail' is ' (or\n  \n     (match-all (not (system-flag  \"Seen\")))\n    \n  \n     (match-all (system-flag  \"Flagged\"))\n    \n  \n     (match-all (not (= (user-tag \"follow-up\") \"\")))\n    \n  )\n'
Expression for vfolder 'Unread mail' is ' (or\n  \n     (match-all (not (system-flag  \"Seen\")))\n    \n  \n     (match-all (system-flag  \"Flagged\"))\n    \n  \n     (match-all (not (= (user-tag \"follow-up\") \"\")))\n    \n  )\n'
Expression for vfolder 'Unread mail' is ' (or\n  \n     (match-all (not (system-flag  \"Seen\")))\n    \n  \n     (match-all (system-flag  \"Flagged\"))\n    \n  \n     (match-all (not (= (user-tag \"follow-up\") \"\")))\n    \n  )\n'
Expression for vfolder 'Unread mail' is ' (or\n  \n     (match-all (not (system-flag  \"Seen\")))\n    \n  \n     (match-all (system-flag  \"Flagged\"))\n    \n  \n     (match-all (not (= (user-tag \"follow-up\") \"\")))\n    \n  )\n'
Expression for vfolder 'Unread mail' is ' (or\n  \n     (match-all (not (system-flag  \"Seen\")))\n    \n  \n     (match-all (system-flag  \"Flagged\"))\n    \n  \n     (match-all (not (= (user-tag \"follow-up\") \"\")))\n    \n  )\n'
Expression for vfolder 'Unread mail' is ' (or\n  \n     (match-all (not (system-flag  \"Seen\")))\n    \n  \n     (match-all (system-flag  \"Flagged\"))\n    \n  \n     (match-all (not (= (user-tag \"follow-up\") \"\")))\n    \n  )\n'
Expression for vfolder 'Unread mail' is ' (or\n  \n     (match-all (not (system-flag  \"Seen\")))\n    \n  \n     (match-all (system-flag  \"Flagged\"))\n    \n  \n     (match-all (not (= (user-tag \"follow-up\") \"\")))\n    \n  )\n'
Expression for vfolder 'Unread mail' is ' (or\n  \n     (match-all (not (system-flag  \"Seen\")))\n    \n  \n     (match-all (system-flag  \"Flagged\"))\n    \n  \n     (match-all (not (= (user-tag \"follow-up\") \"\")))\n    \n  )\n'
Comment 3 Brian J. Murrell 2009-01-19 15:14:44 UTC
I have done as you (Srinivasa Ragavan) asked and a month later there is still no comment or update by you.  It's not really very fair to ask for information from somebody, have them spend the time gathering it and then just ignore it.

Please comment further.
Comment 4 Srinivasa Ragavan 2009-01-20 03:25:38 UTC
Sorry dude. There are more issues that I'm onto and other Novell stuff taking my time. But I'll take care of all the other issues also. Thx for the ping.
Comment 5 Srinivasa Ragavan 2009-01-20 03:28:23 UTC
Are you on 2.24.3? If so, right click on the vfolder and mark that vfolder as 'unread search folder'. This should restore back to normal. Just let me know... but this is a temporary work-around and soon should be killed, once I get back from other issues. Lemme know how it goes.
Comment 6 Brian J. Murrell 2009-01-20 03:41:03 UTC
(In reply to comment #5)
> Are you on 2.24.3? If so, right click on the vfolder and mark that vfolder as
> 'unread search folder'. This should restore back to normal. Just let me know...
> but this is a temporary work-around and soon should be killed, once I get back
> from other issues. Lemme know how it goes.

It's close.  It seems to work for read messages but not deleted messages.  They disappear pretty much immediately.  Given that there is a specific option (View->Hide Deleted Messages) to cause this behavior, it's counter-intuitive that not selecting this option does not disable this behavior on vFolders.

Comment 7 Srinivasa Ragavan 2009-01-20 04:17:59 UTC
Didn't get your point..
What is your current setting? 'Hide deleted is enabled?' if so you can't see deleted messages apart from Trash. 
Comment 8 Brian J. Murrell 2009-01-20 04:21:11 UTC
No, my point was exactly that I don't have "Hide Deleted Messages" enabled, yet in a vFolder, even one marked as an unread search folder, deleted messages disappear right away, the way read messages used to prior to this latest hack.
Comment 9 Brian J. Murrell 2009-01-20 14:46:36 UTC
This also does not work for messages which are marked read after replying to them.  They disappear immediately as well.
Comment 10 Srinivasa Ragavan 2009-01-20 15:08:58 UTC
I would look at it in a couple of days.. sorry for the delay.. have something urgent at hand.
Comment 11 Srinivasa Ragavan 2009-01-20 15:44:25 UTC
I assume, you right-clicked-vfolder to mark as unread vfolder.

I created a vfolder, for unread mails in 3-4 folders.
In that case, when I delete a mail, it stay if I don't have set 'Hide Deleted' 

Is this failing for you? [Sorry trying to be clear, since this case works out for me]
Comment 12 Brian J. Murrell 2009-01-20 15:51:22 UTC
(In reply to comment #11)
> I assume, you right-clicked-vfolder to mark as unread vfolder.

Indeed.

> I created a vfolder, for unread mails in 3-4 folders.
> In that case, when I delete a mail, it stay if I don't have set 'Hide Deleted' 

Interesting.

> Is this failing for you? [Sorry trying to be clear, since this case works out
> for me]

Yes, exactly as you describe above.  My deleted (this is IMAP, so they are marked deleted and then disappear from the vFolder view) mails disappear.
Comment 13 Srinivasa Ragavan 2009-01-20 16:40:13 UTC
Wait, where do you delete them? I did them in the vfolder.
Comment 14 Brian J. Murrell 2009-01-20 17:10:17 UTC
(In reply to comment #13)
> Wait, where do you delete them? I did them in the vfolder.

Yes, indeed.  I am reading and deleting via the vFolder.  If I do the same in the real folder, the deleted message sticks around (showing as deleted and read) until I expunge.  In the vFolder, the deleted message disappears from the Summary immediately.
Comment 15 Srinivasa Ragavan 2009-01-23 08:09:23 UTC
Created attachment 127073 [details] [review]
Don't emit folder changed for vfolders.

This should fix your problem with Delete keys. I was able to reproduce this on trunk not on stable branch.
Comment 16 C de-Avillez 2009-01-23 20:19:46 UTC
*** Bug 567654 has been marked as a duplicate of this bug. ***
Comment 17 C de-Avillez 2009-01-23 20:21:51 UTC
Hey srag,

Indeed this solved bug 567654! Thanks!

I also went ahead and marked the above bug a duplicate of this one, and closed INVALID bug 568750 (which was a result of the wrong patch on 567654).

As usual, you rock!
Comment 18 C de-Avillez 2009-01-28 00:25:11 UTC
There are still some issues lurking here.

1. if I ctrl-K a message in the unread vfolder, the read message stays until the vfolder is refreshed (not that I am against it);

2. deleting a message in the vfolder immediately refreshes, cleaning out any read messages;

3. I ctrl-K a message -- it goes to status read. I then select another folder, and then select the unread vfolder back. The read message is gone, but I get, in the preview area a message stating "Unable to retrieve message [?]".

4. I ctrl-K an unread message, and then leave for a while. There is a very good chance that, when I get back to the machine,  Evo will have died with a SEGV like in bug 568750. For the record, I do *not* have the patch from 568750 applied anymore.
Comment 19 C de-Avillez 2009-01-28 02:10:39 UTC
stacktrace of such a failure:

  • #0 IA__g_str_hash
    at /build/buildd/glib2.0-2.19.5/glib/gstring.c line 95
  • #1 g_hash_table_insert_internal
    at /build/buildd/glib2.0-2.19.5/glib/ghash.c line 268
  • #2 camel_folder_thread_messages_apply
    at ../../../evolution-data-server/camel/camel-folder-thread.c line 679
  • #3 regen_list_exec
    at ../../../evolution/mail/message-list.c line 4168
  • #4 mail_msg_proxy
    at ../../../evolution/mail/mail-mt.c line 520
  • #5 g_thread_pool_thread_proxy
    at /build/buildd/glib2.0-2.19.5/glib/gthreadpool.c line 265
  • #6 g_thread_create_proxy
    at /build/buildd/glib2.0-2.19.5/glib/gthread.c line 635
  • #7 start_thread
    from /lib/libpthread.so.0
  • #8 clone
    from /lib/libc.so.6
  • #9 ??

Comment 20 Srinivasa Ragavan 2009-01-28 02:34:55 UTC
> There are still some issues lurking here.
> 
> 1. if I ctrl-K a message in the unread vfolder, the read message stays until
> the vfolder is refreshed (not that I am against it);

That is perfectly fine.

> 
> 2. deleting a message in the vfolder immediately refreshes, cleaning out any
> read messages;

You have hide-deleted flag enabled? If so then it is correct.

> 
> 3. I ctrl-K a message -- it goes to status read. I then select another folder,
> and then select the unread vfolder back. The read message is gone, but I get,
> in the preview area a message stating "Unable to retrieve message [?]".
>

Perfectly fine. The last selected message for the preview pane is gone, and it  behaved how Evo behaved for years.
 
> 4. I ctrl-K an unread message, and then leave for a while. There is a very good
> chance that, when I get back to the machine,  Evo will have died with a SEGV
> like in bug 568750. For the record, I do *not* have the patch from 568750
> applied anymore.
> 

This seems you crash is still there. What ever we tried to solve the other day, hacking live. I would suggest you don't use this patch [in this bug] and then its more easy to reproduce and just help me out on the g-free stuff. Some one does a g-free instead of unref of pstring. Unfortunately this doesn't happen to me :( and it makes it more difficult to debug.

Comment 21 Srinivasa Ragavan 2009-01-28 05:36:12 UTC
I assume you are using the patch from http://bugzilla.gnome.org/show_bug.cgi?id=567654

Otherwise, it would be a lot worse.
Comment 22 Srinivasa Ragavan 2009-01-29 15:32:45 UTC
Fixed to stable/trunk.