Possible bug in Yahoo's "panel" Javascript

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Possible bug in Yahoo's "panel" Javascript

Rodney Gitzel
I'm still plugging away at getting HtmlUnit to grok OPS, and seemed to hit a deadlock (c.f. http://www.nabble.com/Javascript-error-when-using-HtmlUnit-to16153154.html#a16153154) but it's turned out to be an infinite loop!   I was able to use tracing from the HtmlUnit Javascript processing code to figure out what particular Javascript was being executed over and over, and I finally found the problem.

Note that this is using OPS 3.6.  The bug seems to still be in 3.7, but the Yahoo files have been restructured, so these references won't apply.

The culprit is in container.js at line 3327, namely a function called YAHOO.widget.Panel.prototype.configzIndex.   At 1411, this function is set to handle any change events on the given panel object, and what I found is that this handler was being called over and over, at roughly 15ms intervals.

In that handler, at line 3339, setProperty() is called without specifying the "silent" parameter... and thus setProperty() manually fires the event handler!   Yet we are already *in* the event handler.   So it keeps triggering itself.   When I added the third argument of "true" the problem stopped.

Now, the odd thing is browsers are probably ALSO stuck in this loop, but I suspect they use multiple threads, and so you don't really notice.   If someone has a setup for debugging the Yahoo libraries in a live browser, I'd be interested to see if they could use a stub or a breakpoint to determine if they see the same behaviour.

I know this isn't an OPS issue, but... I thought this would be the place to start.   Meanwhile, anyone have a link to the Yahoo folks responsible for this library?  I can report it there, too.

Cheers!

rodney

p.s.  Sadly, once I got past this, HtmlUnit still doesn't seem to work with OPS, but at least it takes me back to where I was before upgrading HtmlUnit...


Reply | Threaded
Open this post in threaded view
|

Re: Possible bug in Yahoo's "panel" Javascript

Rodney Gitzel
I've reported it to the YUI folks:  http://sourceforge.net/tracker/index.php?func=detail&aid=1948103&group_id=165715&atid=836476

Cheers!

rodney


Rodney Gitzel wrote
I know this isn't an OPS issue, but... I thought this would be the place to start.   Meanwhile, anyone have a link to the Yahoo folks responsible for this library?  I can report it there, too.