Jump to content
Search Community

TimelineLite freezes

Alex Spiridonov test
Moderator Tag

Recommended Posts

Hello guys!

 

In our project we use next timeline to make some animated effect with some DisplayObject:

// clip is DisplayObject    
timeline_ = new TimelineLite({autoRemoveChildren : true, onComplete : 
on_complete_});
const y0 : int = targetY;
clip.alpha = 0;
clip.y = y0-90;
clip.scaleX = clip.scaleY = 0.5;
timeline_.append(new TweenLite(clip, 7.0/35, new TweenLiteVars().
  x(targetX-(targetX-clip.x)/2).y(y0-140).scale(0.6).autoAlpha(1).ease(Linear.easeNone)));    
timeline_.append(new TweenLite(clip, 8.0/35, new TweenLiteVars().
  x(targetX).y(y0).scale(1).ease(Linear.easeNone)));    
timeline_.append(new TweenLite(clip, 3.0/35, new TweenLiteVars().
  y(y0+5).scaleX(1.25).scaleY(0.75).ease(Linear.easeNone)));    
timeline_.append(new TweenLite(clip, 2.0/35, new TweenLiteVars().
  y(y0+1).scale(1).ease(Linear.easeNone)));    
timeline_.append(new TweenLite(clip, 2.0/35, new TweenLiteVars().
  y(y0+1).scale(1).ease(Linear.easeNone)));    
timeline_.append(new TweenLite(clip, 3.0/35, new TweenLiteVars().
  y(y0-8).scaleX(0.9).scaleY(1.1).ease(Linear.easeNone)));    
timeline_.append(new TweenLite(clip, 3.0/35, new TweenLiteVars().
  y(y0).scale(1).ease(Linear.easeNone)));

timeline_.play();

After upgrading greensock up to v12 we starts receiving complaints from our users about freezing of some objects. Following investigation provided next result: from time to time (about 2-3 of 100 runs of this code) the timeline freezes on last tween. In each case this tween stops with different values of time().

 

Can you give me any idea what can be wrong? Where do I have to search the reason of such behavior? What kind of extra information can clarify situation and help to resolve it?

 

Now we on 12.0.15 version of GreenSock and problem is reproducing well.

Link to comment
Share on other sites

Wow, that's odd. I can't imagine what could possibly be causing that - nobody has reported anything similar (that I can remember at least). Maybe you've got an overwriting issue somewhere else in your code? Tough to say without seeing a sample FLA. Could you create the simplest possible FLA that demonstrates the issue and send it to us? (please don't send your entire set of production files - we just can't afford to take the time to dig through hundreds or thousands of lines of code). 

 

Also, are you saying that v11 worked fine but v12 doesn't?

Link to comment
Share on other sites

Wow, that's odd. I can't imagine what could possibly be causing that - nobody has reported anything similar (that I can remember at least). Maybe you've got an overwriting issue somewhere else in your code? Tough to say without seeing a sample FLA. Could you create the simplest possible FLA that demonstrates the issue and send it to us? (please don't send your entire set of production files - we just can't afford to take the time to dig through hundreds or thousands of lines of code). 

 

Also, are you saying that v11 worked fine but v12 doesn't?

Yes, it seems v11 works, but v12 doesn't. We got a lot of complaints right after deploy version with GS v12. On v12 we can reproduce the issue on production app with v12 (by the by, TimelineMax is not affected but I can't claim it definitely). I will try to build a minimal app and attach to this post.

Link to comment
Share on other sites

Got it. And now I have a CS6 fla file reproducing the issue.

 

It generates a lot of coins on the scene. Each coin animated by TimelineLite. I added some code to auto detect frozen timelines - if it detects one, the generation stops and frozen coin marks by red color.

I left all timelines and tweens with params used in our app. Also I left all greensock plugins initialization from our app (may be it influence someway).

 

You must correct path to greensock sources in ActionScript settings (I use version 12.0.15).

 

On my computer (Win7x64, Core i3-3225, 6Gb) issue emerges in 10 seconds avg. As I can see, increasing 'strong' value in line 42 leads reduction of this time (with 'strong = 1' the first issue sometimes emerges after 3-5 minutes only, with 'strong=5' a few frozen timelines appeares immediatelly)

 

NOTE: as I wrote above on production about every hundredth timeline freezes.

 

XXX: I tried to attach fla to this post but got the 'timelinelite-issue.fla You aren't permitted to upload this kind of file' message only. How can I do it?

 

UPDATE: renamed file to timelinelite-issue.fla.renamed.to.txt and attach to this post. I hope it didn't break it.

timelinelite-issue.fla.renamed.to.txt

Link to comment
Share on other sites

Sorry it took a while - it was a very tricky bug to track down. Worked all day on it. Thank you VERY much for creating that sample FLA that clearly demonstrated the issue. That was a huge help. 

 

I have attached a preview of 12.0.16 which I believe fixes the issue. Would you mind giving it a shot and letting us know if it works well for you? My apologies for the hassle. In general, v12 is even more reliable than v11 but you did indeed expose a low-level bug that affected TimelineLite. 

gsap_12.0.16_preview.zip

Link to comment
Share on other sites

Sorry it took a while - it was a very tricky bug to track down. Worked all day on it. Thank you VERY much for creating that sample FLA that clearly demonstrated the issue. That was a huge help. 

 

I have attached a preview of 12.0.16 which I believe fixes the issue. Would you mind giving it a shot and letting us know if it works well for you? My apologies for the hassle. In general, v12 is even more reliable than v11 but you did indeed expose a low-level bug that affected TimelineLite. 

It seems it works fine now :). Thanks you for great library and good support.

 

p.s. What about more accurate checking of vars' type and getting _tempKill from it in TweenLite@795 ? (see for details http://forums.greensock.com/topic/8271-crash-in-tweenlite-on-tempkill-lookup/)

As I wrote I've solved our issue - you're right it is was a call killTweensOf with 'true' instead of expected Object (typo, migration from v11 issue). But the result of this mistake - app crash with some obscure message - is too strong,  misty and doesn't get a chance to trace resulting error stack to the real cause. It would be better to add more strong checking for type of vars, I think.

 

best regards,

Alex Spiridonov

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...