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 711443 - IMAPX account unread count goes only up, not down
IMAPX account unread count goes only up, not down
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
3.11.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2013-11-04 21:30 UTC by Milan Crha
Modified: 2014-02-20 12:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Receiving Options (63.51 KB, image/png)
2013-11-07 16:57 UTC, Matthew Barnes
Details
Receiving Options (54.05 KB, image/png)
2013-11-08 08:05 UTC, Milan Crha
Details

Description Milan Crha 2013-11-04 21:30:27 UTC
While I read my emails, I mark messages as read, sometimes by selecting couple of them and "mark read" from a context menu, sometimes by clicking the envelope icon in the message list. The folder tree in evolution updates the unread count only up, not down (it adds one when I mark a message unread, but not subtract when marking it as read), while the info label above the folder tree shows correct unread count. The counts can eventually sync when the account does send/receive routine.

I guess this is an issue on eds side, in the imapx provider, thus I fill this in eds.
Comment 1 Matthew Barnes 2013-11-05 15:07:49 UTC
I tried reproducing this, but the unread counts in the folder tree follow my clicking as they should, both increasing and decreasing.

Maybe there's another factor here?
Comment 2 Milan Crha 2013-11-05 18:27:40 UTC
(In reply to comment #1)
> Maybe there's another factor here?

Yeah, there seem to be. Reading my mails today I see correct count changes. I also has some weird slowness on "Scanning folder list on server xxx", which maybe fixed the issue by repopulating store's summary (but there was no message summary redownload for sure). That said, I cannot reproduce it now too.
Comment 3 Matthew Barnes 2013-11-05 18:54:38 UTC
I've noticed an occasional pause while reading IMAP LIST responses from Zimbra for some reason, which can cause a short delay in populating the folder tree in Evolution.  Maybe that's what the weird slowness was?

Dunno what's going on with that yet.  Can't tell if it's actually coming from the server or if it's a local buffering issue somewhere.
Comment 4 Milan Crha 2013-11-06 08:54:50 UTC
Right, I see it with the Zimbra server too. And mainly, basically, as I didn't notice it with pother servers yet.
Comment 5 Milan Crha 2013-11-06 20:17:39 UTC
I found the way:

a) have Edit->Preferences->Mail Preferences
   [ ] Check for new messages on start
b) close evolution, run evolution
c) select any IMAPx folder
d) change unread state of any message

  - it only adds, but does not subtract unread count in the folder tree

e) click Send/Receive and wait till the account is done
   * notice the unread count in the folder tree synchronizes
f) repeat d)

   - it both adds and subtracts, as expected.
Comment 6 Matthew Barnes 2013-11-07 16:57:25 UTC
Created attachment 259202 [details]
Receiving Options

Hmm, still no luck for me after disabling "Check for new messages on start" and restarting Evolution.

Wondering if it might be related to QRESYNC.  I have it enabled for my Zimbra account and when switching to a folder it updates the summary faster than I can click on anything.

Attached is my "Receiving Options" page for Zimbra.  Let's compare.
Comment 7 Milan Crha 2013-11-08 08:05:22 UTC
Created attachment 259241 [details]
Receiving Options

Less options set here. :)
Comment 8 Matthew Barnes 2013-11-08 13:02:39 UTC
Dang it, still no luck.  Matched my settings to yours and restarted Evo.

Dunno what else to try.  Setting this aside for now, but if I see the symptom myself or if you can give any other clues, I'll get back on it.
Comment 9 Milan Crha 2013-11-11 15:00:40 UTC
I change unread state by clicking the icon in the message list,
thus, when it doesn't work, the count is increased here:

  • #0 em_folder_tree_model_user_marked_unread
    at em-folder-tree-model.c line 1445
  • #1 on_click
    at message-list.c line 4795
  • #2 e_marshal_BOOLEAN__INT_POINTER_INT_BOXED
    at e-marshal.c line 260
  • #3 g_closure_invoke
    at gclosure.c line 777
  • #4 signal_emit_unlocked_R
    at gsignal.c line 3584
  • #5 g_signal_emit_valist
    at gsignal.c line 3338
  • #6 g_signal_emit
    at gsignal.c line 3384
  • #7 item_click
    at e-tree.c line 957
  • #0 folder_tree_model_set_unread_count
    at em-folder-tree-model.c line 474
  • #1 ffi_call_unix64
    from /lib64/libffi.so.6
  • #2 ffi_call
    from /lib64/libffi.so.6
  • #3 g_cclosure_marshal_generic_va
    at gclosure.c line 1550
  • #4 _g_closure_invoke_va
    at gclosure.c line 840
  • #5 g_signal_emit_valist
    at gsignal.c line 3234
  • #6 g_signal_emit
    at gsignal.c line 3384
  • #7 mail_folder_cache_update_idle_cb
    at mail-folder-cache.c line 682
  • #8 g_main_dispatch
    at gmain.c line 3054
  • #9 g_main_context_dispatch
    at gmain.c line 3630
  • #10 g_main_context_iterate
    at gmain.c line 3701
  • #11 g_main_loop_run
    at gmain.c line 3895
  • #12 gtk_main
    from /lib64/libgtk-3.so.0
  • #13 main
    at main.c line 681
  • #0 em_folder_tree_model_user_marked_unread
    at em-folder-tree-model.c line 1445
  • #1 on_click
    at message-list.c line 4795
  • #2 e_marshal_BOOLEAN__INT_POINTER_INT_BOXED
    at e-marshal.c line 260
  • #3 g_closure_invoke
    at gclosure.c line 777
  • #4 signal_emit_unlocked_R
    at gsignal.c line 3584
  • #5 g_signal_emit_valist
    at gsignal.c line 3338
  • #6 g_signal_emit
    at gsignal.c line 3384
  • #7 item_click
    at e-tree.c line 957
  • #0 folder_tree_model_set_unread_count
    at em-folder-tree-model.c line 474
  • #1 ffi_call_unix64
    from /lib64/libffi.so.6
  • #2 ffi_call
    from /lib64/libffi.so.6
  • #3 g_cclosure_marshal_generic_va
    at gclosure.c line 1550
  • #4 _g_closure_invoke_va
    at gclosure.c line 840
  • #5 g_signal_emit_valist
    at gsignal.c line 3234
  • #6 g_signal_emit
    at gsignal.c line 3384
  • #7 mail_folder_cache_update_idle_cb
    at mail-folder-cache.c line 682
  • #0 folder_tree_model_set_unread_count
    at em-folder-tree-model.c line 474
  • #1 ffi_call_unix64
    from /lib64/libffi.so.6
  • #2 ffi_call
    from /lib64/libffi.so.6
  • #3 g_cclosure_marshal_generic_va
    at gclosure.c line 1550
  • #4 _g_closure_invoke_va
    at gclosure.c line 840
  • #5 g_signal_emit_valist
    at gsignal.c line 3234
  • #6 g_signal_emit
    at gsignal.c line 3384


from which I believe the MailFolderCache is not properly populated after start with disabled immediate Send/Receive invocation.
Comment 10 Milan Crha 2014-02-20 12:43:06 UTC
The problem was the asynchronous nature of mail_folder_cache_note_store(). While it was running in folder info retrieval, some folders could be opened ("folder-opened" signal emitted for them), but silently ignored, because the corresponding folder info was not found in the mail-folder-cache. Postponing calls of mail_folder_cache_note_folder() for such cases on time when the initial folder info lookup is done fixes the issue.

Created commit d80607d in evo master (3.11.91+) [1]

[1] https://git.gnome.org/browse/evolution/commit/?id=d80607d