Gamua / Starling-Framework

The Cross Platform Game Engine
http://www.starling-framework.org
Other
2.82k stars 821 forks source link

ANRs on Android #965

Closed neuronix closed 7 years ago

neuronix commented 7 years ago

Hi Daniel,

All our apps still have many ANRs (Input dispatching timed out & Broadcast of Intent types) on Android. The AIR team answer regarding this is that one should avoid any heavy calculations in the mouse_down, mouse click, key_down, etc. events and delay the calculations to avoid freezing the input.

From what I see, Starling already delays touch input handling to the next frame.. but we still get lots of ANRs. All our inputs are handled via Starling. Is there anything left to improve in Starling? Should one consider queuing the touch events in seperate setTimout calls instead of processing all of them in the next frame like currently?

Any other advice related to these dreaded ANRs?

Thanks for your help Daniel! :)

PrimaryFeather commented 7 years ago

Hm, this is the first time I hear about this problem! Do you have any links to discussions / reports I could at? Thx!!

neuronix commented 7 years ago

Hi Daniel,

There are quite a lot of posts on the Adobe forum but here is the most relevant one: https://forums.adobe.com/thread/1257733

Here is another where Chris Campbell was involved: https://forums.adobe.com/thread/1080235

As you can see it is a very old issue :(

PrimaryFeather commented 7 years ago

Wow, yes, this is really old. How often does this happen to you? I guess you've only seen this in reports / logs from your users?

neuronix commented 7 years ago

The thing is also that I get the impression not many devs actually take the time to dig into the ANR/Crashes/logs to figure out what it causing issues. I'm pretty sure this issue is wide spread among AIR apps but most people don't even know about it.

It's not a huge amount (less than 1% of users on a daily basis) but it generally seems to impact the same users (example: 1100 ANRs, concerning 700 users), which drives them crazy and earns us bad reviews.

Also, it's basically the only ANR remaining and the only cause of crashing in our apps at the moment.

neuronix commented 7 years ago

Maybe you could ask Chris Campbell about this and how to solve it, as said previously, the Starling implementation looks good so I'm a bit lost on how we could improve it :(

PrimaryFeather commented 7 years ago

I totally agree, this needs to be addressed! I'll definitely forward this to Chris!

Before I do that, though, is there a possibility to get some information about the devices where this occurs? Some model / vendor information? I know it's hard to get on Android, but maybe you've got something in place already, and I'm sure that would help Adobe fix this.

neuronix commented 7 years ago

Great thanks, i will send you some information by email!

PrimaryFeather commented 7 years ago

Got it, thanks! I already forwarded the information to Adobe.

Nevertheless: please create the same report at "tracker.adobe.com" and then post the link here. Adobe needs that for internal reasons, and any time we can save them is a win. Thanks in advance!

PrimaryFeather commented 7 years ago

Since this information was already forwarded to Adobe, I'll close this issue for now (since there's nothing Starling can do about it).