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 546972 - unread message counts decrement but never increment, and will go negative (signed int problem)
unread message counts decrement but never increment, and will go negative (si...
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
2.24.x (obsolete)
Other All
: Normal normal
: ---
Assigned To: Bharath Acharya
Evolution QA team
evolution[disk-summary]
Depends on:
Blocks: 543389
 
 
Reported: 2008-08-08 17:39 UTC by Olegario Craig
Modified: 2013-09-13 00:58 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
post-startup, 2 emails actually unread (177.52 KB, image/png)
2008-08-08 17:40 UTC, Olegario Craig
  Details
unread goes negative (125.38 KB, image/png)
2008-08-08 17:41 UTC, Olegario Craig
  Details
zero mails _actually_ unread, but unread count is decrementing... (150.50 KB, image/png)
2008-08-08 17:43 UTC, Olegario Craig
  Details
new mail arrived, but unread count did not increment (129.33 KB, image/png)
2008-08-08 17:44 UTC, Olegario Craig
  Details
read the new mail, unread count decremented again (117.14 KB, image/png)
2008-08-08 17:44 UTC, Olegario Craig
  Details
Exchange patch (5.96 KB, patch)
2008-09-12 06:48 UTC, Bharath Acharya
committed Details | Review

Description Olegario Craig 2008-08-08 17:39:25 UTC
Please describe the problem:
Not sure whether this is a bug in evo proper or in the exchange connector, but my "unread message" counts start at 0 when I sync; they don't get incremented when new mail arrives, but they then go negative when I mark previously-unread mail as read. (See screenshots, I'll attach as soon as bug is filed.) This also affects the bolding of folders that have unread mail in the mailbox summary pane.

Steps to reproduce:
1. start evolution
2. observe read/unread counts for each subscribed folder
3. receive new mail, observe unread count does not increment
4. read mail, observe unread count goes negative

Actual results:


Expected results:
unread mail should increment when new mail arrives and decrement when unread mail is read, but unread count should never go negative

Does this happen every time?
yes

Other information:
Note that the bold folder summary line is not exactly in sync with the unread count (nor does it seem to be offset precisely, either.) The screenshots are in chronological order, with the first one taken just after evo startup.

~x86 gentoo, using local ebuilds to get devel version of evolution and associated libs:

evolution-exchange-2.23.6
evolution-data-server-2.23.6
evolution-2.23.6
gtkhtml-3.23.6
libsoup-2.23.6
Comment 1 Olegario Craig 2008-08-08 17:40:56 UTC
Created attachment 116167 [details]
post-startup, 2 emails actually unread
Comment 2 Olegario Craig 2008-08-08 17:41:52 UTC
Created attachment 116168 [details]
unread goes negative
Comment 3 Olegario Craig 2008-08-08 17:43:31 UTC
Created attachment 116170 [details]
zero mails _actually_ unread, but unread count is decrementing...
Comment 4 Olegario Craig 2008-08-08 17:44:05 UTC
Created attachment 116171 [details]
new mail arrived, but unread count did not increment
Comment 5 Olegario Craig 2008-08-08 17:44:40 UTC
Created attachment 116172 [details]
read the new mail, unread count decremented again
Comment 6 André Klapper 2008-08-10 12:48:41 UTC
Which EXACT version do you use? .5, .6, svn trunk?
Comment 7 Olegario Craig 2008-08-10 18:17:49 UTC
(In reply to comment #6)
> Which EXACT version do you use? .5, .6, svn trunk?
> 

That would be .6...

(from initial bug text)
> evolution-exchange-2.23.6
> evolution-data-server-2.23.6
> evolution-2.23.6
> gtkhtml-3.23.6
> libsoup-2.23.6

    
    Thanks,
        Ole
Comment 8 Srinivasa Ragavan 2008-08-11 04:34:47 UTC
Thanks Olegario Craig. Im looking into it and will fix it.
Comment 9 Srinivasa Ragavan 2008-08-12 07:35:58 UTC
Exchange code, isn't fully adapted to disk summary. 

Bharath: are you finishing it for 2.23.90 ?
Comment 10 Srinivasa Ragavan 2008-09-11 05:38:37 UTC
Exchange counts will be broken till Bharath fixes it.
Comment 11 Bharath Acharya 2008-09-11 05:48:56 UTC
Yup onto it now. 
Comment 12 Bharath Acharya 2008-09-12 06:48:47 UTC
Created attachment 118561 [details] [review]
Exchange patch

Added SYNC_COUNT to sync up counts on the operations needed. Any operations that need syncing could just update the counts from mfld-> counts maintained at the mail side. So Camel could just pick it up from there. Attached patch fixes it.
Comment 13 Kandepu Prasad 2008-09-12 06:52:16 UTC
Tested the patch on the latest trunk for the basic operations and it worked fine.
Comment 14 Srinivasa Ragavan 2008-09-12 07:03:32 UTC
+		mail_stub_return_data (stub, CAMEL_STUB_RETVAL_RESPONSE,
+				       CAMEL_STUB_ARG_UINT32, unread_count,
+				       CAMEL_STUB_ARG_END);

Add visible count also and commit to trunk. Thanks
Comment 15 Srinivasa Ragavan 2008-09-12 07:03:53 UTC
just change and commit.
Comment 16 Bharath Acharya 2008-09-12 08:08:50 UTC
Changed and committed to trunk as r1792