Bug Tracker

Ticket #2846 (new bug)

Opened 7 months ago

Last modified 7 months ago

FF2 infinite loop in jQuery animation onComplete

Reported by: zbuffered Assigned to: anonymous
Type: bug Priority: major
Milestone: 1.2.4 Component: fx
Version: 1.2.1 Keywords: animation, onComplete, infinite loop
Cc: Needs: Review

Description

I clicked on a link I had built with jQuery, only to find that my CPU utilization pegged out and the link did not work. I had a difficult time replicating this issue and I think I have enough to submit a bug report on. The link uses jQuery to animate a container open and closed. When it opens or closes the container, the height of the page changes, and I have to run another function to resize other elements on the page to fit. I set this up in a non-ideal way, and as a result, some configurations on our site don't have the function defined. I have solved this but it uncovered a pretty nasty little bug that doesn't appear to exist with IE6 or IE7 or FF3b5.

Description: the onComplete event runs when the animation is complete. If it references a function that doesn't exist, Firefox 2 repeatedly runs the oncomplete code in an infinite loop, whereas other browsers fail gracefully.

I stripped it down to a decent example, sorry I have not had a chance to look through jQuery to see what is specifically going on.

http://runion.cc/files/jQonCompleteBug.html

Attachments

jQonCompleteBug.html (1.1 kB) - added by zbuffered 7 months ago.
simple page showing a Firefox 2 bug in jQuery's animation oncomplete

Change History

Changed 7 months ago by zbuffered

simple page showing a Firefox 2 bug in jQuery's animation oncomplete

Changed 7 months ago by flesler

I suppose it never reaches the clearInterval as it errors while stepping. Maybe we could wrap line 384:

this.options.complete.call( this.elem );

With a try/catch.

Changed 7 months ago by zbuffered

Also, the link appears to crash FF3b5 about every third time it is loaded and run.

A lot of things crash FF3 right now though, so I'm not too concerned

Changed 7 months ago by zbuffered

Priority is probably not 'major', sorry this was my first bug report :)

Note: See TracTickets for help on using tickets.