An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Topic Options
#25043 - 02/15/13 06:00 PM Volunteers needed :)
artie505 Online


Registered: 08/04/09
I've regularly visit this bookmarked Weather Underground page and this one.

Beginning about two weeks ago, I began experiencing some really wonky behavior from both pages: Instead of counting down from c. 350 to zero, recycling, and counting down again as they've always done when they're animated, they now stick at zero and do a really weird "stuttering" thing.

Running OS X 10.6.8, Safari 5.1.7, and Firefox 18.0.2...
  • They do it invariably in Safari
    • with Extensions enabled,
    • with Extensions disabled,
    • with Java enabled,
    • with Java disabled,
    • and after clearing cache and cookies.
  • They do it, but only almost invariably, in a pristine Firefox.
  • They do it in my boot account.
  • They do it in my test account.
  • The issue has survived a clean reinstall of both OS X and Safari.
  • The Weather Underground tech can't reproduce it. frown
Will a few of you kind people please do some testing and let me know if you experience similar behavior and with what software configurations?

Many thanks. smile
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#25045 - 02/15/13 07:30 PM Re: Volunteers needed :) [Re: artie505]
alternaut Offline

Moderator

Registered: 08/04/09
What's your CPU load when that stuttering is going on?
_________________________
alternaut moderator

Top
#25046 - 02/15/13 08:10 PM Re: Volunteers needed :) [Re: artie505]
alternaut Offline

Moderator

Registered: 08/04/09
OK, let me not keep you in suspense for too long: this looks like some JavaScript issue to me, probably independent of Mac model or browser*. FWIW, I see exactly the same thing as you do, with the CPU maxing out as soon as the countdown reaches zero. When I now disable JavaScript in Safari's prefs, the animation immediately resumes its normal sequence and the CPU load drops below max. Running OS X 10.5. 8 and Safari 5.0.6 on a PPC iMac iSight (temporarily no Intel Macs at hand to test).

*) I'd bet the WU tech is not testing with a Mac. The affected WU functionality was probably caused by changes to the various animation pages around the time you started to notice this. Oh, and if you test the JavaScript effect, make sure to turn it back ON if you want to post the result here... smirk
_________________________
alternaut moderator

Top
#25047 - 02/16/13 03:36 AM Re: Volunteers needed :) [Re: alternaut]
artie505 Online


Registered: 08/04/09
Thanks for the quick, helpful response. smile

First, my bad for forgetting to mention CPU load, which does not max out on my deuced Mac(hina), but does run at about 35%/core...enough to get my fans working overtime.

I also forgot to mention that both Safari's and Safari Web Content's RAM usage go through the roof.

I've now tried disabling JavaScript and gotten essentially the same results you got.

This is interesting: (In Safari)
  • I enable JavaScript.
  • When the timer hits zero and the stuttering starts I disable JavaScript.
  • The animation resumes its normal sequence, but the timer remains at zero.
  • I enable JavaScript and the stuttering resumes, apparently because the timer is stuck at zero.
  • I disable JavaScript and reload the page, and the animation is as expected and the timer is gone.
True confession time: I've read any number of posts that explain Java and JavaScript, but it's all gone in one eye and out the other, so will you please link me to the thread or post you consider definitive on the subject so I can finally (maybe) absorb the info?

Thanks.

Edit: I just let the animations run with JavaScript disabled, and without the timers, the sequences never updated/advanced from their starting times.


Edited by artie505 (02/16/13 04:25 AM)
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#25048 - 02/16/13 06:10 AM Re: Volunteers needed :) [Re: artie505]
alternaut Offline

Moderator

Registered: 08/04/09
Originally Posted By: artie505
- ...CPU load, which does not max out on my deuced Mac(hina), but does run at about 35%/core...enough to get my fans working overtime.
I also forgot to mention that both Safari's and Safari Web Content's RAM usage go through the roof.

- ...will you please link me to the thread or post you consider definitive on the subject so I can finally (maybe) absorb the info?

Interesting. FWIW, once the timer runs out the PPC iMac CPU maxes out or nearly so (perhaps unsurprisingly), while the (moderate) RAM usage remains pretty much the same. Once they reach zero, the countdown on the animation pages remains there after re-enabling JavaScript, just as you noticed. They get reset by a page refresh. As the 'stuttering' of the animation appears to be associated with the timer, that'd be a place to start looking for code mischief.

I don't have a 'definitive' Java vs. JavaScript link at hand, but the homonymous HTML Goodies page you linked to in the Flash Bashing Express thread works well enough. tongue
_________________________
alternaut moderator

Top
#25050 - 02/16/13 06:52 AM Re: Volunteers needed :) [Re: artie505]
joemikeb Offline
Moderator

Registered: 08/04/09
Loc: Fort Worth, Texas
The definitive answer on Java and Javascript is they are totally and completely unrelated to one another. Java was developed as a cross platform programming language by Sun Microsystems. Javascript was developed by Mozilla (formerly Netscape) as an internal scripting system for browsers. The only similarity between Java and Javascript are the four letters J, A, V, A. and a very rudimentary similarity in syntax.
_________________________
joemikeb • moderator

Top
#25052 - 02/16/13 10:33 AM Re: Volunteers needed :) [Re: alternaut]
artie505 Online


Registered: 08/04/09
Thanks for the link, which I'd never have located on my own. tongue

Edit: By the way, why did you guess that the tech may not have been testing with a Mac?


Edited by artie505 (02/16/13 10:48 AM)
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#25053 - 02/16/13 10:46 AM Re: Volunteers needed :) [Re: joemikeb]
artie505 Online


Registered: 08/04/09
Thanks. smile

That much I had already absorbed, and what I'd like to do now is try to understand how to recognize the difference between Java and JavaScript, so to that end I'll try to absorb alternaut's linked doc.

This thread, and a bunch of documentation work and back and forth correspondence with "Wunder William," could have been avoided had I had the knowledge for which I'm now looking and tried disabling JavaScript, rather than Java, at the outset.
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#25054 - 02/16/13 03:37 PM Re: Volunteers needed :) [Re: artie505]
joemikeb Offline
Moderator

Registered: 08/04/09
Loc: Fort Worth, Texas
The quick and easy way to tell if a page is using Javascript or Java is to look at the HTML code for the page. If you find a line of code, probably in the header that says something like
Quote:
<SCRIPT LANGUAGE="javascript">
then the page uses the Javascript dialect of ECMAScript. (There are a number of dialects of ECMAScript but Javascript is by far the most common. The ECMAScript/Javascript interpreter is embedded in the browser although all supposedly comply with a version of the ECMAScript standard there can be slight variations from browser to browser.

If you find a statement such as
Quote:
<APPLET CODE="urname.class" WIDTH="250" HEIGHT="22"> </APPLET>
then the page is using Java. If the page is using Java then you must have the Oracle Java Virtual Machine installed on the computer. It is the JVM that actually executes the Java code and that is independent of which browser you are using.

Just in case you think this makes the determination easy, the actual script(s) or applet(s) may not be in the code of the page you are using rather in another page that is called by the host page. It is also possible, although not common, for a page to have both javascript(s) and java applet(s).

One final note. At one time Java applets were far more common than they are today. In today's world you are more likely to find Java servlets running on servers than you are to find Java applets. The main exception to this being online games. On the other hand, it is the unusual page that does not make some use of Javascript scripts.
_________________________
joemikeb • moderator

Top
#25057 - 02/16/13 11:14 PM Re: Volunteers needed :) [Re: joemikeb]
artie505 Online


Registered: 08/04/09
Thanks for that; I'm sure I'll get some mileage from it.

This is interesting: I spaced out for a moment while experimenting with your instructions, forgot that control-click calls up "View Source," and found this, which appears to be pertinent, in Safari's menu bar, but I've got no idea what its actual functionality is; it doesn't appear to do anything when enabled either before loading the maps or after they begin stuttering.

Any ideas?
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#25064 - 02/17/13 02:02 PM Re: Volunteers needed :) [Re: artie505]
joemikeb Offline
Moderator

Registered: 08/04/09
Loc: Fort Worth, Texas
This Apple Knowledge Base article explains the function of all the items in Safari's Developer menu. To save you from wading through all the menu items, the pertinent entry is quoted below:

Originally Posted By: Apple Knowledge Base article PH5057
The Runaway JavaScript Timer interrupts the execution of very slow scripts, so you can regain control of Safari. Disabling it is useful for some types of automated testing.
_________________________
joemikeb • moderator

Top
#25066 - 02/17/13 04:18 PM Re: Volunteers needed :) [Re: joemikeb]
artie505 Online


Registered: 08/04/09
Thanks for the link and excerpt.

(Is my perception skewed, or does "Runaway JavaScript Timer" imply something diametrically opposed to "very slow scripts?")
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#25071 - 02/18/13 07:24 AM Re: Volunteers needed :) [Re: artie505]
joemikeb Offline
Moderator

Registered: 08/04/09
Loc: Fort Worth, Texas
It makes sense to me, it is all a matter of relativity. You are the one who has to decide if your perception is skewed.
_________________________
joemikeb • moderator

Top
#25072 - 02/18/13 11:25 AM Re: Volunteers needed :) [Re: artie505]
tacit Offline


Registered: 08/03/09
Loc: Portland, Oregon, USA
A "runaway" program (like a runaway JavaScript) is a program that starts executing and then keeps on absorbing CPU time without ever producing results, accepting user input, or ending--its code execution runs away with no way to stop it. A runaway program will cause the computer to slow down.

The runaway JavaScript timer is a timer that starts whenever a JavaScript starts. It ends when the JavaScript requests user input, stops running, or otherwise makes itself behave nicely. If a JavaScript runs away, the timer will keep ticking down until it reaches 0, when it forcibly stops the runaway JavaScript.
_________________________
Photo gallery, all about me, and more: www.xeromag.com/franklin.html

Top
#25074 - 02/18/13 11:46 AM Re: Volunteers needed :) [Re: tacit]
artie505 Online


Registered: 08/04/09
Thanks very much for explaining that.

My confusion was rooted in the fact that my issue was more or less a "runaway JavaScript timer."
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#25124 - 02/22/13 04:05 PM Re: Volunteers needed :) [Re: artie505]
artie505 Online


Registered: 08/04/09
Well, we're getting somewhere.

The Wunderground tech gave me a free "no ads" upgrade, because he had a feeling that something in the ads was at the root of my issue...causing a memory leak, and the issue has, in fact, been resolved (with the side benefit of fewer trackers smile ).

I suspect that the tech could not replicate my issue because while his legacy installation is running OS X 10.6.x it is also running Safari 4.0.3, which differs radically from Safari 5.x. I've tried to get him to upgrade his Safari installation (in a clone, at the least), and I'm waiting to see what happens.

Edit: I forgot to mention that the ads were apparently at the root of my issue despite the fact that I had AdBlock blocking them. confused


Edited by artie505 (02/22/13 04:18 PM)
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top

Moderator:  alternaut, dianne, MacManiac