FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


An interesting bug...





ocalhoun
So, I get a pop-up for new private message... Close the pop-up.
The top of the page now reads 'you have 1 new message'.
I open that link in a new tab so I can read the message.
Then, I get another pop-up saying I have a new private message... Close the pop-up.
And then... it gets weird:

Good thing that's not true, or I would be very busy for a long time!

The next time a page loads, the counter (correctly) goes back to 0, saying I have no new messages.


Not all that important... but still a very weird bug.
Why would it choose that number? The only thing I can think of might be that is the total number of all PM's ever sent on Frihost.

*edit*

Just happened again... Maybe it happens every time I open a new PM?
Nameless
Including zero, 65535 would be the largest possible value that could be stored in a 16 bit value (as 2^16 is 65536). Presumably the software screwed up by giving the you pop-up and trying to subtract from the 'new messages' twice, thus looping it's temporary count from 0 back up to the maximum value.

The More You Know
deanhills
Nameless wrote:
Including zero, 65535 would be the largest possible value that could be stored in a 16 bit value (as 2^16 is 65536). Presumably the software screwed up by giving the you pop-up and trying to subtract from the 'new messages' twice, thus looping it's temporary count from 0 back up to the maximum value.

The More You Know
I'm curious. Does this knowledge come from common sense, or from the study of IT? I'm just totally bowled over when I read something like this that makes sense out of an apparently strange event.
loremar
Nameless wrote:
Including zero, 65535 would be the largest possible value that could be stored in a 16 bit value (as 2^16 is 65536). Presumably the software screwed up by giving the you pop-up and trying to subtract from the 'new messages' twice, thus looping it's temporary count from 0 back up to the maximum value.

The More You Know

I'm calculating your IQ. Damn, it broke!
Nameless
deanhills wrote:
I'm curious. Does this knowledge come from common sense, or from the study of IT?

I did take a basic IT course when I was in high school, but I'm pretty sure my small understanding of integer overflows comes from reading about limits and glitches in old video games. So take that with a grain of salt. Razz
deanhills
Nameless wrote:
deanhills wrote:
I'm curious. Does this knowledge come from common sense, or from the study of IT?

I did take a basic IT course when I was in high school, but I'm pretty sure my small understanding of integer overflows comes from reading about limits and glitches in old video games. So take that with a grain of salt. Razz
Right. But I was really impressed anyway. Particularly after seeing that huge number of messages. There had to be a reason however.
Very Happy
Blaster
You better get to reading... haha

I've never seen this but it is quite a story to tell
ocalhoun
Blaster wrote:
You better get to reading... haha

I've never seen this but it is quite a story to tell

^.^
I should save that image in case I ever need to convince somebody how overly busy moderators are!
Blaster
ocalhoun wrote:
Blaster wrote:
You better get to reading... haha

I've never seen this but it is quite a story to tell

^.^
I should save that image in case I ever need to convince somebody how overly busy moderators are!

Thats not a bad idea... But I think you're just lying... I think you never get messages from users... at least none that you are actually paying attention too... Thats why there is soo many un read Razz
deanhills
Blaster wrote:
Thats not a bad idea... But I think you're just lying... I think you never get messages from users... at least none that you are actually paying attention too... Thats why there is soo many un read Razz
Well spotted! Think Frihost must have missed its own BS Detector, guess that must come from the fire fighting too?
Very Happy
Blaster
Something tells me the frihost staff room is called "The Bar" its where they sit around and talk shit on everyone that can't come in... Razz
ocalhoun
deanhills wrote:
Blaster wrote:
Thats not a bad idea... But I think you're just lying... I think you never get messages from users... at least none that you are actually paying attention too... Thats why there is soo many un read Razz
Well spotted!

I replied to your PM about an hour ago... and replied to a PM from Blaster just a few minutes ago...

*grumble grumble* ungrateful... *grumble*



Blaster wrote:
Something tells me the frihost staff room is called "The Bar" its where they sit around and talk shit on everyone that can't come in... Razz


...It's actually a lot more boring than that.
(Though I will admit, that once I got access to it, it was fun to go back and see what had been said about me. ^.^ ... Including things like "ocalhoun a moderator? That'll never happen!")
Ghost Rider103
ocalhoun wrote:
deanhills wrote:
Blaster wrote:
Thats not a bad idea... But I think you're just lying... I think you never get messages from users... at least none that you are actually paying attention too... Thats why there is soo many un read Razz
Well spotted!

I replied to your PM about an hour ago... and replied to a PM from Blaster just a few minutes ago...

*grumble grumble* ungrateful... *grumble*



Blaster wrote:
Something tells me the frihost staff room is called "The Bar" its where they sit around and talk shit on everyone that can't come in... Razz


...It's actually a lot more boring than that.
(Though I will admit, that once I got access to it, it was fun to go back and see what had been said about me. ^.^ ... Including things like "ocalhoun a moderator? That'll never happen!")


Lol, I do remember reading that.

Never did find much about staff talking about me before I became a moderator. Guess it was just meant to be and didn't need to be discussed. Laughing

But anyways about the bug, can you recreate it and make it happen again?
Blaster
ocalhoun wrote:
deanhills wrote:
Blaster wrote:
Thats not a bad idea... But I think you're just lying... I think you never get messages from users... at least none that you are actually paying attention too... Thats why there is soo many un read Razz
Well spotted!

I replied to your PM about an hour ago... and replied to a PM from Blaster just a few minutes ago...

*grumble grumble* ungrateful... *grumble*



Blaster wrote:
Something tells me the frihost staff room is called "The Bar" its where they sit around and talk shit on everyone that can't come in... Razz


...It's actually a lot more boring than that.
(Though I will admit, that once I got access to it, it was fun to go back and see what had been said about me. ^.^ ... Including things like "ocalhoun a moderator? That'll never happen!")

I'm sure you could read a lot about me... Have fun searching for that...

And Ghost do you just want to feel loved with pms?
deanhills
Blaster wrote:
Something tells me the frihost staff room is called "The Bar" its where they sit around and talk shit on everyone that can't come in... Razz
Excellent description! I'm going to put this in my signature. Or better yet, it may be just the right topic for a blog post. Seeing that blog posts don't seem to be moderated ..... yet ....
Wink
Blaster
deanhills wrote:
Blaster wrote:
Something tells me the frihost staff room is called "The Bar" its where they sit around and talk shit on everyone that can't come in... Razz
Excellent description! I'm going to put this in my signature. Or better yet, it may be just the right topic for a blog post. Seeing that blog posts don't seem to be moderated ..... yet ....
Wink

I do have a few good jokes in me.
adri
ocalhoun wrote:
Why would it choose that number?


Phenomena explained with bits:
You got 1 new message, in 16-bit, 1 is:
00 00 00 00 00 00 00 01

It got substracted twice, so -1. (Calculating with the 2-complement rule)
11 11 11 11 11 11 11 10 (you take the inverse/complement of 1 (aka changing every 1 with a 0 and a 0 with a 1))
+00 00 00 00 00 00 00 01 (add 1 to the complement)
______________________
11 11 11 11 11 11 11 11 (and you get your negative number)

Which means -1 in 16bit if you say that negative numbers start with a 1 and positive with a 0. But probably the software didn't knew that and just calculated the number as followed:
1*2^0 + 1*2^1 + 1*2^2 + 1*2^3 + 1*2^4 + 1*2^5 + 1*2^6 + 1*2^7 + 1*2^8 + 1*2^9 + 1*2^10 + 1*2^11 + 1*2^12 + 1*2^13 + 1*2^14 + 1*2^15 = 65535


adri
rajpk
adri wrote:
ocalhoun wrote:
Why would it choose that number?


Phenomena explained with bits:
You got 1 new message, in 16-bit, 1 is:
00 00 00 00 00 00 00 01

It got substracted twice, so -1. (Calculating with the 2-complement rule)
11 11 11 11 11 11 11 10 (you take the inverse/complement of 1 (aka changing every 1 with a 0 and a 0 with a 1))
+00 00 00 00 00 00 00 01 (add 1 to the complement)
______________________
11 11 11 11 11 11 11 11 (and you get your negative number)

Which means -1 in 16bit if you say that negative numbers start with a 1 and positive with a 0. But probably the software didn't knew that and just calculated the number as followed:
1*2^0 + 1*2^1 + 1*2^2 + 1*2^3 + 1*2^4 + 1*2^5 + 1*2^6 + 1*2^7 + 1*2^8 + 1*2^9 + 1*2^10 + 1*2^11 + 1*2^12 + 1*2^13 + 1*2^14 + 1*2^15 = 65535


adri


hmm very interesting ..good job Very Happy
Related topics
GNOME 2.10 is released!
I have a problem....Mozilla Firefox
AIM Mail
Booting time
Cool things to know
Interesting Books
An interesting test...
Has Firefox 1.5 Beta had any bug?
Interesting IE6 Software Bug...
i find the forum here is interesting.
CNN's leftard bias??? Naaa....
Is it a Bug or Easter Egg?
PHP Hangs On 2.2250738585072011e-308 (on some hardware)
Some interesting Software
Reply to topic    Frihost Forum Index -> General -> Suggestions

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.