Opened 11 years ago

Closed 11 years ago

#11706 closed defect (worksforme)

Chart incorrectly destroys animations

Reported by: Stefan Bird Owned by: Eugene Lazutkin
Priority: high Milestone: 1.7
Component: Charting Version: 1.5
Keywords: Cc:
Blocked By: Blocking:


If a chart is destroyed while an action is in progress, action2d._Base fails in the following section (around line 72):

df.forIn(this.anim, function(o){

df.forIn(o, function(anim){




It appears the second df.forIn is unnecessary (and incorrect) as o has an action member with a stop method. I'm pretty sure the code should be:

df.forIn(this.anim, function(o){



Attachments (1)

test_animdestroy.html (12.3 KB) - added by cjolif 11 years ago.
tentative test-case (not reproducing)

Download all attachments as: .zip

Change History (8)

comment:1 Changed 11 years ago by Stefan Bird

Mmm, seems I overlooked how the subclasses were using this.anim - sometimes o is an empty object, so the change I suggested is also incorrect :o(

Easiest way (for me) to reproduce the bug is to create a pie chart with a moveslice animation, and have a button nearby that destroys the chart. Move the cursor over a slice then click the button before the slice has had time to return.

comment:2 Changed 11 years ago by Eugene Lazutkin

Milestone: tbd1.6
Status: newassigned

comment:3 Changed 11 years ago by Eugene Lazutkin

Milestone: 1.61.7

Changed 11 years ago by cjolif

Attachment: test_animdestroy.html added

tentative test-case (not reproducing)

comment:4 Changed 11 years ago by cjolif

I tried to reproduce with but was not able. Go to the PieChart? at the bottom, go other a slice, a slow MoveSlice? begins, press 'a' while the animation is going on, this will call Chart.destroy() but I don't have any error...

comment:5 Changed 11 years ago by cjolif

(I tested it on trunk only)

comment:6 Changed 11 years ago by Stefan Bird

I'm still running on 1.5, and because of the refactoring between 1.5 and 1.6 I'm not able to run the test case. For now I guess we can assume that it's already been fixed in trunk; if I encounter the issue again in 1.6 or 1.7 I'll create my own test case and post it here.

comment:7 Changed 11 years ago by Eugene Lazutkin

Resolution: worksforme
Status: assignedclosed

Closing as working in the current trunk. Please reopen, if you find a way to reproduce it.

Note: See TracTickets for help on using tickets.