Ticket #2530021 (closed defect)

Reporter


Satyam
Opened: 03/3/11
Last modified: 09/15/11
Status: closed
Type: defect
Resolution: fixed

Owner


Satyen Desai
Target Release: 3.4.1
Priority: P4 (low)
Summary: WidgetAnim fails when host is destroyed
Description:

The code provided in the test information box below fails when the overlay being animated is destroyed. Static method Y.WidgetAnim.ANIMATIONS.fadeIn
contains the following code:


anim.on(DESTROY, function() {
this.get(NODE).setStyle(OPACITY, (Y.UA.ie) ? 1 : EMPTY_STR);
});

At the time of executing the callback function, the node being animated has already been destroyed somewhere along the chain of destructors.

Type: defect Observed in Version: 3.3.0
Component: Widget Severity: S3 (normal)
Assigned To: Satyen Desai Target Release: 3.4.1
Location: Library Code Priority: P4 (low)
Tags: Relates To:
Browsers: N/A
URL:
Test Information:


YUI({filter:'raw'}).use(
'node','overlay','widget-anim',
function(Y) {
"use strict";
Y.on("domready", function () {
var ov = new Y.Overlay({
plugins: [
Y.Plugin.WidgetAnim
],
bodyContent: 'Here I am'
});
ov.render('#bd');
ov.show();
Y.one('#destroy').on('click', function () {
ov.destroy();
});
});
}
);

Attachments

Attachment #1: yui3anim.html (download)

Change History

Satyam

YUI Contributor

Posted: 03/3/11

See also: http://yuilibrary.com/projects/yui3/ticket/2530022

Might it be that the destruction sequence is incorrect? Eric Ferraiolo's Overlay Extras also tries to do access DOM elements that have already been destroyed. (unbound from the YUI Node instance)

Satyen Desai

YUI Developer

Posted: 04/27/11
  • milestone changed to 3.4.0
  • priority changed from P3 (normal) to P4 (low)
  • status changed from new to accepted

Satyen Desai

YUI Developer

Posted: 07/27/11
  • milestone changed from 3.4.0 to 3.5.0

These are backlog bugs which didn't make it into any of the 3.4.0 sprints. Marking as 3.5.0 backlog for evaluation going into 3.5.0 sprint 1

Satyen Desai

YUI Developer

Posted: 08/23/11
  • milestone changed from 3.5.0 to 3.4.1

Satyen Desai

YUI Developer

Posted: 08/23/11
  • estimated changed from 0 to 0.02
  • sprint changed to sprint 1

Satyen Desai

YUI Developer

Posted: 09/13/11
  • resolution changed to fixed
  • status changed from accepted to closed

You're right. It's probably something with the infrastructure order of operations, since plugins should have their "destructors" called before the base Widget destructor is called.

We probably cleaned up something along the way with the destruction flow (I remember fixing something for plugin destruction a little while ago). Can't repro it anymore in 3.4.0. Test case attached. Tried destroy on initial render, after hide/show, after hide with "Break on all Exceptions" enabled - all work fine without throwing exceptions.

Satyen Desai

YUI Developer

Posted: 09/15/11
  • completed changed from 0 to 0.02
  • remaining changed from 0.02 to 0