Copy link to clipboard
Copied
Hi Adobe team,
over the last months the developer community has been discovering an issue that causes freezes (ANRs) in Air apps. Since Google recently changed the visibility algorithms for Google Play to punish apps that show high quotas of faulty behavior, all Air apps are now directly affected by this punishment.
We believe that we have been able to narrow the problem down to playing sounds in an Air application. Developers report those ANRs both for streaming sounds as well as playing sounds locally. Specifically, our company has been able to reliably reproduce the freeze by creating a bot that will play our game over a lengthy session. After 1-3 hours, the app will just freeze. If we disable the sound, the freeze will not occur. Furthermore, if we endlessly loop a single sound instance with a volume of 0, the freeze also does not occur. However this workaround causes wake locks because the device can never go to full sleep even when the user puts it into background, since the sound still plays. Wake locks are also punished by Google Play, so it is just replacing one problem with another.
Please have a look at this thread:
You can see that dozens of developers have added their experience in hundreds of posts for this specific issue alone, and these are only those developers that actually understand that something is happening, there might be a lot of indies or studios that have not yet noticed that they have a high quota of ANRs in their Air apps that are threatening their visibility on Google Play.
There are at least 2 tickets that reference this bug:
Adobe, please fix this bug as it is affecting all your developers that are using sound, is not easily noticed and is punishing Air developers on Google Play by decreasing visibility for our apps. Please reinforce your commitment to Air by making sure that bugs of this magnitude will be fixed. We are all a little worried since 2 of your engineers have been posting to above thread but have since gone silent after their first attempts of fixing the bug did not work.
Air is a great technology, lets work together to make sure it will stay healthy and efficient. We are ready to step in and help you reproducing the problem. Please let us know if you require more info to reproduce or fix the problem.
Copy link to clipboard
Copied
I'm totally agree with rewb0rn.
We really need feedback from Adobe on such critical issues.
Copy link to clipboard
Copied
Great post rewb0rn!
Indeed, the lack of support and communication on such an important issue is very worrisome. chris.campbell​ we would really need you to tackle this issue.
On a second note it would also be good to improve the communication on AIR's future and it's potential roadmap. Last year there was a great initiative by chris.campbell​ to ask the community about feature requests but I haven't seen (or am unaware of) much communication since. Feature requests are cool but as developers, what we really need is to be assured that critical issues will be fixed and have a little insight on what Adobe plans for the future of AIR. The latest communication on the topic is simply "we have no plans to drop AIR", which honestly isn't a real commitment to future support.
Copy link to clipboard
Copied
ANR and Crashes nearly destroyed one of our apps. We dropped from 2000 installs per day down to about 500 due to punishing rules from Google. We had to remove sounds which were causing issues, and optimize to extreme levels to return back. This also mean a huge drop on revenues.
Copy link to clipboard
Copied
Leo interesting insights, have you been able to recover in a way that you are now back to 2000 installs per day?
Copy link to clipboard
Copied
We managed to get back to about 1700-1900 / day and we had to start paid ads, to recover faster. We dropped our crash rate from 1.91% on May to an average of 0.53% in July. However, this issues are critical and I am not sure if we have a paved road ahead of us.
Copy link to clipboard
Copied
Hello Leo Kanel!
We dropped our crash rate from 1.91% on May to an average of 0.53% in July.
How do you fix it? Do you use that hack with looped sound in background?
We have an app where main sounds are from NetStream and this hack (or sound ane) doesn't works.
Adobe team, please make more attention to this issue, its very critical!
Copy link to clipboard
Copied
Can this be avoided completely if you play sounds in a worker?
The worker will not hang the main thread.
Copy link to clipboard
Copied
Hi chaky,
I haven't tested if workers could be used to avoid that problem, but I doubt it. From logcat it seems to be a general problem like a memory leak in the underlying framework (aka Air). We are now focusing on rewriting our game to use native calls for sounds (with the MediaPlayer ANE from distriqt) but feel free to make a test and share the results.
Copy link to clipboard
Copied
I'm curious
for the people having this issue
how many sounds do you try to play?
simultaneously? or one after another? both?
do you keep track of how many SoundChannel get instantiated?
did you get the problem on both iOS and Android or only one of the two platform?
eg. in the documentation the play() method of the Sound class mention
Returns
SoundChannel
— A SoundChannel object, which you use to control the sound. This method returnsnull
if you have no sound card or if you run out of available sound channels. The maximum number of sound channels available at once is 32.
but some time ago I saw some problem with maximum 16 simultaneous sounds playing on some Android devices
just wondering if it could be related
Copy link to clipboard
Copied
Hi Zwetan,
the freeze is only happening on Android, not on iOS. We have generally only 1-2 sounds playing at a time. Even if the user would do something extreme by triggering buttons quickly while the game is running in the background, we would never have more than 5 channels happening at the same time. The freeze occurs after several hours of active game play, so it is likely related to a memory leak. We can reliably reproduce it by having a bot playing the game, without any extreme user input, just casually playing the game with 1-2 sounds happening at a time. We are reusing sound objects for the 12 different sounds we have in our app, so I do not see how this would be an error on our side.
Also, the method does not return null as per documentation, instead the application freezes completely and you can see certain error messages in the logcat.
If you are interested in more details, take a look at this thread:
Copy link to clipboard
Copied
yeah I read the others associated threads
I'm not saying it is an error on user code specifically
I'm was just thinking because the SoundChannel is limited with a maximum number of channels
it could be another thing to explore by Adobe
so far I just see it is pretty hard to isolate the problem and that's maybe why Adobe did not come back to it
Copy link to clipboard
Copied
We have the same issue, and are struggling to get Adobe's attention to this for MANY months now. The issue is unacceptably critical, and not being treated by Adobe.
Adobe, please treat your developers appropriately and fix this!
Copy link to clipboard
Copied
Dear Adobe,
do you need any additional information from us to identify the cause of the problem? Please let us know what is the current status for this bug on your side. People are right now switching from Air sounds to native sounds with an ANE because there is no perspective communicated from you about this problem. That can not be the solution that you intend for your users. Please respond to this issue and let us know what's going on.
Kind regards
Copy link to clipboard
Copied
> People are ... switching from Air sounds to native sounds with an ANE
What ANE are people using?
Copy link to clipboard
Copied
There are several but i use this https://github.com/DigitalStrawberry/ANE-Sounds or this air native extensions depending what needs to be done.
Copy link to clipboard
Copied
Thanks Leo.
Copy link to clipboard
Copied
I would also ask that Adobe give us some information or updates on their plan to address this issue. The community has been trying all kinds of workarounds for this issue but it seems they are not working out as hoped. Could you please provide us with a few details about the status of this bug and if there are any planned updates that we can expect to resolve this issue? Thanks!
Copy link to clipboard
Copied
I know AIR team is not that large and they already do an outstanding job, but this is an important issue. Would be great if you prioritise this. Many thanks!
Copy link to clipboard
Copied
Hi Everyone,
Thank You for reporting the issue!
Please log a bug for the same on Tracker . Do attach the links to the application.
I am from Animate CC team but will notify the AIR team as well about it.
Thanks,
Ankush
Copy link to clipboard
Copied
Hi Ankush,
thanks for your response. Two tracker tickets are already available for this bug:
Tracker and Tracker Combined they have over 50 votes and for the original thread on https://github.com/Gamua/Adobe-Runtime-Support/issues/29 we have a couple of hundred posts in the discussion from dozens of developers and counting.
Thanks in advance for bringing this to the attention of the team.
Copy link to clipboard
Copied
and still no answer???? no solutions????
Copy link to clipboard
Copied
There's some activity on the Gamua thread mentioned above, you might want to monitor that: https://github.com/Gamua/Adobe-Runtime-Support/issues/29#issuecomment-388067899
I agree it's a little strange to not see much communication from Adobe here on their own forum, but it appears they are indeed trying to solve the issue.
Copy link to clipboard
Copied
lets hope they are doing something
at least they must tell us the progress
Copy link to clipboard
Copied
This is something quite new. Air team is not large and they are doing an amazing job generally. Lets keep participating and they will fix this.