65534 unreaded messages

Miscellaneous news and views...

Moderator: scott

Post Reply
jonnynet
Aficionado
Aficionado
Posts: 347
Joined: Fri Mar 17, 2006 8:34 pm
Location: Leipzig, Saxony, Germany

65534 unreaded messages

Post by jonnynet »

Since last week the board tells me I had supposedly 65534 unreaded messages. How is that possible and where comes the number from? Only Scott should have a declaration about that...
User avatar
scott
Site Admin
Site Admin
Posts: 1409
Joined: Tue Nov 04, 2003 7:05 am
Location: Colorado
Contact:

Post by scott »

Short answer: I don't know.

Long answer: This has been happening for a few months now to certain users (including myself). I've been fixing it by changing the value back to zero in the database. It is a bug of some sort. I don't know what is causing it and have not found a pattern in who it affects except it seems to affect members who use the board more than others (and that is a wild guess). I will keep an eye on it. I am open to any info from users who hit it as to what might be the related actions that cause it.

Note: the number 65534 is not random since it is one less than the maximum value allowed in that database field (max integer value for user_unread_privmsg).
http://en.wikipedia.org/wiki/65535_(number)

My current wild guess is that somehow instead of incrementing up from the min by one (0 -> 1) it is decrementing down from the max by one in certain cases (65535 -> 65534). I don't know how or why.

That might help me to know: when you first saw that number, did you have a new private message?

Thanks,
Scott
User avatar
jim_mich
Addict
Addict
Posts: 7467
Joined: Sun Dec 07, 2003 12:02 am
Location: Michigan
Contact:

Post by jim_mich »

Scott,

I would guess that something causes the number to decrement below zero. It is obvious that the number is stored as a 4 byte positive integer and it is wrapping around the bottom below zero which causes to to be displayed as a value up near the top end of the range. Decrementing causes the binary bytes to roll around to 65535 (&HFFFF) and then a little lower. Look for whenever the value is decremented, rather than it jumping up to the maximum. If the code checks for the value going below zero after decrementing it will never catch the error of it wrapping back around to the top end.

Just my 2 cents worth based on 28 years of programming experience.


Image
User avatar
scott
Site Admin
Site Admin
Posts: 1409
Joined: Tue Nov 04, 2003 7:05 am
Location: Colorado
Contact:

Post by scott »

A google search for "65534 unread private messages" got 608 hits which reveal that this is a common problem across various forum platforms. The common theme I found is that it seems to occur when a user's PM inbox/outbox/sentbox is too full, and it can be fixed by cleaning up the various boxes by deleting old messages.

Next time it happens, please help me by testing out this theory.

Thanks,
Scott
jonnynet
Aficionado
Aficionado
Posts: 347
Joined: Fri Mar 17, 2006 8:34 pm
Location: Leipzig, Saxony, Germany

re: 65534 unreaded messages

Post by jonnynet »

Thanks for the comments!

Scott, once I saw that number I checked for new messages but there wasn't any new one. I don't think my message box was too full - < 25%. I also tried to delete some messages... Thanks for killing the utopian number.
Post Reply