#907 ✓ staged
Scott Downe

Bug in teardown check

Reported by Scott Downe | February 3rd, 2012 @ 10:35 PM | in 1.2 (closed)

inside our teardown check, we check for the names of all starts and ends to === the name of the track event to be removed.

      if ( ( byStart[ idx ] && byStart[ idx ]._natives && byStart[ idx ]._natives.type === name ) &&
                ( byEnd[ idx ] && byEnd[ idx ]._natives && byEnd[ idx ]._natives.type === name ) ) {

Problem with this is if the start and ends do not sort in the same positions, it will be skipped over. Example:

  popped.noise({start: 10, end: 21});
  popped.teardown({start: 9, end: 20});

  popped.removePlugin( "teardown" );

teardown will not actually be removed, because the start and end arrays look like this:

start: [ teardown, noise ]
end: [ noise, teardown ]

note: we sort the end from highest to lowest.

So based on the above teardown check, it will only be removed if the start and ends fall on the same index.

I have a unit test of this failing, might explain it better. Will add it in a sec. ( I also have a fix, will add that in two secs )

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Popcorn.js is an HTML5 video framework that lets you bring elements of the web into your videos.

Popcorn.js is a project of Web Made Movies, Mozilla's Open Video Lab.

Shared Ticket Bins

Referenced by

Pages