Hello Frase,

Thanks a lot for clarification!

>> Hope it's not a show-stopper for you.
Of course it's not a show-stopper.

I've played a little bit with firebug and here is what it's writing on the 
msgDepth page

TypeError: stats.get(...) is undefined
while ((stats.get(i)[TIMESTAMP] < minimumTimestamp) && (i < limit)) i++;


I've debugged a little bit and found the following:

1. msgDepth stats is not a rate stats

var isRate = (description == "msgDepth") ? false : true

2. Next limit=size for a not rate stats

var limit = isRate ? size - 1 : size

3.  Then if we look at

while ((stats.get(i)[TIMESTAMP] < minimumTimestamp) && (i < limit)) i++;

the first part of the while loop condition will be executed twice (i=0, i=1) 
for limit=size=1 and i=0
so, for i=1 and size=1, stats.get(i) is undefined

What we have to do is to reorder the while loop conditions and everything will 
be fine, i.e.

while ((i < limit) && (stats.get(i)[TIMESTAMP] < minimumTimestamp)) i++;


Best Regards,
Sergey

-----Original Message-----
From: Fraser Adams [mailto:fraser.ad...@blueyonder.co.uk] 
Sent: Wednesday, February 06, 2013 11:58 PM
To: users@qpid.apache.org
Subject: Re: We've got an App for that .... Qpid Web Based GUI - and more - 
just released.


>>> Is it just msgDepth or do you see the same for msgTotalEnqueues 
>>> msgTotalDequeues too
> msgDepth only (event with 1.1 version). All the other pages work pretty fine.
>
>
> Best Regards,
> Sergey
>
>
Thanks for the clarification I've got a hunch about it..... In the graphs page 
JavaScript there's a line that goes:

while((stats.get(i)[TIMESTAMP] < minimumTimestamp) && (i < limit)) i++;

ISTR having intermittent issues with that a while back, though TBH it was 
*really* infrequent on my set up so I forgot about it. I'd be willing to bet 
it's that line that's the cause of the problem you're seeing, though given the 
infrequency for me quite the scenario that causes that condition I'm less sure 
on, I'll spend a bit of time trying to consistently break it.

I could put a bit more defensive code around it, almost certainly it's
get(...) returning with null, but I'd rather figure out the cause first than 
just defend against the symptom.

I *hate* bugs like that, it's like it'll take me ten minutes to fix after I've 
spent two days trying to reproduce it :-) c'est la vie

Hope it's not a show-stopper for you.

Frase.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional 
commands, e-mail: users-h...@qpid.apache.org


_______________________________________________________
CONFIDENTIALITY NOTICE: This email and any files attached to it may be 
confidential. If you are not the intended recipient you are notified that 
using, copying, distributing or taking any action in reliance on the contents 
of this information is strictly prohibited. If you have received this email in 
error please notify the sender and delete this email. 

Reply via email to