Jump to content
GreenSock

George Dion

GSAP 3 stops working after 2-3 days

Recommended Posts

I have used GSAP 2 on website and cordova application without any problem. Since i updated to version 3 when i have the cordova application at background or the website opened (but on another tab) for 2-3 days everything stop working. I am trying to do manually many kind of tweens from console to any div but nothing is hapenning. Moreover, gsap.ticker.timer is NaN.

 

(While the website or the application is on background no tweens are trying to be executed.)

 

I use the following initial settings

                        gsap.registerPlugin(Draggable);
                        gsap.registerPlugin(Physics2DPlugin);
                        gsap.registerPlugin(InertiaPlugin);
                        gsap.registerPlugin(EasePack);
                        gsap.registerPlugin(MotionPathPlugin);

 

                        gsap.ticker.lagSmoothing(false);

 

I will try without lagSmoothing to see if this is the problem, but it is so hard to reproduce because i have to wait 2-3 days every time.

Link to comment
Share on other sites

Hi,

 

Sorry to hear about the issues you're having, unfortunately I have zero experience with Cordova so I can't help you with that.

 

The one thing I can point is that GSAP's ticker property is time not timer:

// Wrong
gsap.ticker.timer

// Right
gsap.ticker.time

Hopefully other users with experience with Cordova can jump into the thread and offer some insight.

 

Let us know if you have more questions or run into a new status development in this subject.

 

Happy Tweening!

Link to comment
Share on other sites

I didnt mean gsap.ticker.timer but gsap.ticker.time (it was a typo only here in the forum).

 

I found out that it has nothing to do with cordova. The reproduce step is simple in a simple page.

 

Just load GSAP 3 library and type in console:

gsap.ticker.lagSmoothing(false);

 

Create 2 live expressions at Chrome Console (at the eye icon)

1) new date()

2) gsap.ticker.tick(); gsap.ticker.time;

 

Change your computer time around 28 hours later or more (maybe 100,000 seconds?) and wait for 5-30 seconds for Chrome Tab to take the new time (you can check it in live expression 1 "new date()" when it changes).

 

gsap.ticker.tick() destroys gsap.ticker.time (if 28+ hours passed instantly) and it is NaN forever and of course no tween is working.

(In the other hand, if i add many times 24 hours (or anything below 27 hours) again and again is ok)

 

 

Link to comment
Share on other sites

Hi,

 

OK I see now. Is there any chance you can create a minimal demo of this?

 

Still I'll ping @GreenSock so He can take a look at this and tell us what could be happening and how it can be solved.

 

Please stand by.

 

Happy Tweening!

Link to comment
Share on other sites

The minimal demo is as simple as that:

 

See the Pen BaVQGbz by dodsocial (@dodsocial) on CodePen

 

If we change computer time to more than 28 hours, gsap is broken forever. 

 

(Do not forget to choose the correct iframe for the live expression to work)

 

image.png.eefb28d68ebde4536839a08d049a4dc5.png

 

image.png.54d6c06853d43ce3a79893f9e3a6469c.png

Link to comment
Share on other sites

Yes, it works fine with Infinity thank you!

  • Like 1
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.
×