Jump to content
Search Community

Erratic callback behaviour on HTC One (Android 4.2.2)

panrafal test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi,

 

I have a long timeline with some callbacks between labels. I jump between those labels using tweenTo. The callbacks run some logic and play their own timelines (without overwriting anything from the main timeline).

Everything works fine on every browser I've checked - Chrome, FF, IE, iPhone5, Nexus7, HTC One X with Cyanogen, Samsung Ace and couple of others...

 

But on HTC One's stock browser callbacks are called erraticaly. Most of the time they stop working after first tweenTo, sometimes I can go through the whole animation, sometimes they start working back again after a few retries. 

The animation plays allright, "just" the callbacks don't get called at all (including addPause).

 

To make it more strange, if I let the whole animation to play till the end without tweenTo, and just then start using tweenTo, everything works normally.

 

I've tried many solutions, including writing my own tweenTo, disabling FAR, changing FPS, but nothing works. I couldn't find or write any sample that would exhibit the same behaviour, and the work is currently not available to show...

 

Did you ever encountered something like this? Is there anything else I could check?

 

Link to comment
Share on other sites

I tested on samsung galaxy s3 android 4.1.2 .. on stock browser, google chrome mobile, Firefox mobile, and dolphin, and did not see the behavior described.. The animations looked more smooth in the android stock browser, than in chrome.. I will do some other tests, but am not sure this is a GSAP issue but more of some time of browser bug or something else..

 

you mentioned that it worked on an htc cynaogen.. is the HTC you tested on, a non-rooted, stock rom?.. the reason I ask.. is because if your using a phone that is rooted and has a custom rom, it might have some bugs and not be a good test bed to get an accurate browser rendering..

 

if so you might want to do some more tests on a htc with stock rom, non rooted, and stock rom android 4.2.2

 

if the phone you tested on is stock rom and doesn't have a custom rom than I will try to test on a htc android 4.2.2 at work..

  • Like 1
Link to comment
Share on other sites

Like jonathan mentioned, this doesn't sound like a GSAP flaw. I really can't imagine how the callbacks (and ONLY the callbacks) would somehow just not get called unless there's just some kind of weird browser bug which would affect all JS, not just GSAP. I'm also curious to know how exactly you tested and decided that the callbacks aren't getting called. In other words, maybe they're getting called fine, but the code inside them isn't running properly. I have no idea if htat's the case, of course - just wondering how you drew the conclusion that GSAP wasn't calling the callbacks properly. 

 

jonathan, thanks for jumping in. Really great to have your eyes on this.

Link to comment
Share on other sites

Thanks for the quick response guys! The HTC One is stock, not rooted. I checked on another one and it behaves exactly the same. The cyanogen was on Htc One X. If you have access to some current HTC model with sense, it would be great if you could check on that.

Dolphin and Maxton use stock browsers intrnally - so the results are the same. Firefox, Chrome and Opera all work fine on the One.

 

Jack, to be sure, I've added console logs in every callback. Additionaly, I've created a looped spinner on the main timeline, along with a callback every second updating the time display. On the One, the spinner spins, but the time changes only when other callbacks also work. Even the built-in callbacks don't work - addPause sometimes does not pause the timeline!

 

Apart from that, the stock browser on the One has the best performance I've seen on mobile. That's why I'm trying to make it fully work as it's a nice showcase. I've tried to lower the fps, but still no luck at all. I too think it has something to do with timing or decimals. But it's impossible to debug JS in stock browser. I could add a log somewhere though, but where?

 

I know this is very strange behaviour, that's why I've spent a lot of time tackling it before writing here. This is certainly a browser bug, but that's how it is these days.

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...