Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
mikefraser

Advice appreciated - 'RangeError: Maximum call stack size exceeded'

Recommended Posts

Hi, I'm not sure if this is related to the topic:

https://greensock.com/forums/topic/15728-onstart-maximum-call-stack-size-exceeded-error/

 

I'm trying to build a fairly complex (I think?) multi-stage animation, and I've started getting the following error messages:

TweenMax.min.js:16 Uncaught RangeError: Maximum call stack size exceeded
    at d.h.add.h.insert (TweenMax.min.js:16)
    at d.q.add (TweenMax.min.js:14)
    at d.q.totalDuration (TweenMax.min.js:14)
    at d.k.totalDuration (TweenMax.min.js:14)
    at d.q.duration (TweenMax.min.js:14)
    at d.q.add (TweenMax.min.js:14)
    at d.q.totalDuration (TweenMax.min.js:14)
    at d.k.totalDuration (TweenMax.min.js:14)
    at d.q.duration (TweenMax.min.js:14)
    at d.q.add (TweenMax.min.js:14)

TweenMax.min.js:1 Uncaught RangeError: Maximum call stack size exceeded
    at d.k.totalDuration (TweenMax.min.js:1)
    at d.q.duration (TweenMax.min.js:14)
    at d.q._remove (TweenMax.min.js:14)
    at d.h.add.h.insert (TweenMax.min.js:17)
    at d.q.add (TweenMax.min.js:14)
    at d.q.totalDuration (TweenMax.min.js:14)
    at d.k.totalDuration (TweenMax.min.js:14)
    at d.q.duration (TweenMax.min.js:14)
    at d.q.add (TweenMax.min.js:14)
    at d.q.totalDuration (TweenMax.min.js:14)

Presumably related, I can't get the latest stage I'm working on to begin.

 

I guess as a newbie, I've a couple of questions for the more experienced Greensock users out there:

  1. Any idea what's going wrong here?
  2. Any thoughts on how I could be doing this better? I've cobbled together my current approach from forum answers / stackexchange etc, currently by using one main timeline and adding sub-timelines (via functions) at various label points. I don't need it to stop in as many places as I've added (thats mainly to help me approach it in sections), but I do need it to hold in the 'working' loop until restarted by controls elsewhere.

 

Any help / thoughts greatly appreciated.

Thanks!

 

 

See the Pen MvyNRm by mikefraser (@mikefraser) on CodePen

Link to post
Share on other sites

Yes, I see what you mean. I'll need some time to track this down. Please stand by...

Link to post
Share on other sites

First of all, I like the animation. Good job! I especially like how you've employed the technique of splitting apart your animations into various functions (modularize things). 

 

Okay, so about the errors - that was indeed a regression in 1.20.0 that'd only show up in very rare cases. In this one, you created overlapping/conflicting animations and when the automatic overwrite occurred, it hit a certain condition internally that resulted in that endless recursion. Sorry about that! I've got it patched in the upcoming release which you can preview (uncompressed) at https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/TweenMax-latest-beta.js - better? 

 

Two other ways you could solve it: 

  • Revert to 1.19.1 (just until 1.20.3 is officially out)
  • Don't create that conflicting tween (you're animating the same property of the same object at the same time with two different tweens). 

Or, of course, you could use the preview of 1.20.3 if you'd like. 

 

Thanks for providing an example codepen too - that was super helpful. 

  • Like 2
Link to post
Share on other sites

Hi, thanks for getting back to me so quick!

Those seem like solid options - I suspect it'd be best if I try and remove the issue as it stands first, for my own education as much as anything else. But having the other versions to fall back on means I don't have to lose too much time on this.

I appreciate the help!

  • Like 2
Link to post
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.

×