Audio and video crash on android device v 2013.999

Hi Josh -

   One other question for you. I have been reading the reviews of these tablets on Amazon, and it appears that many other apps appear to be working on these tablets (eg. Skype), would you happen to know how these apps resolve the audio issue?

Thanks,

Andrew

Interesting.  A quick google search shows that some people are reporting the exact same kind of crash with Skype on Android.

   http://community.skype.com/t5/Android/Crash-on-opening-Samsung-Galaxy-Tab/td-p/1995615

I’m surprised to see that someone on that Skype forum thread reported this issue on a Galaxy Tab, because we know that OpenSL can load successfully on that device.  But then again, I don’t know if we can 100% trust that he is running into the same issue and might have some unrelated crash.  Although, it does make me wonder if this is not a device/model specific issue and this might be something worse… like a system corruption issue.

The only other solution that I think we can implement is for us to do the following.  If we detect that the OpenSL library exists, we can write to file that we’re attempting to load the library.  If we successfully load the library, that we write to file that it can be loaded successfully.  If we crash, then the next time the app starts up, we can then identify that the library cannot be loaded and fallback to a different Android audio API which unfortunately has higher playback latency/delay, but at least it would work on the offending devices (better than always crashing).  The only bummer about this solution is that it’ll still crash on the first time you run the app, because I’m not sure how we can predict if it’ll crash or not (corrupted library?).  But I’m not sure what else we can do about it at the moment.

Out of curiosity, are you able to reproduce this issue on any of your devices?

I assume not, but it doesn’t hurt to ask.

Yeah, I have been able to reproduce it consistently on the Dragon Y88, I have also just ordered a Noria to confirm the issue there.

On the Dragon device, I was able to recreate the issue by literally having just this in main.lua:
 

local function main() local introVoice = audio.loadSound ("Voice\_PuzzingoTheGreatestPuzzle.mp3"); audio.play(introVoice); return true end main()

I would be happy to ship you a device or swing by and drop one off for you to try (I am in Sunnyvale).

Your idea sounds reasonable, since I would expect most people to at least give something a second try “just in case”. But that assumes you can tell that the crash is caused by this issue and not something else?

Yeah, given the issue you described, I was expecting lots of mainstream apps to fail on these tablets, but what’s weird is that many apps/games still seems to work. For example, we’ve tried Clash of Clans, Candy Crush, and the feature review on the Dragon tablet on Amazon has a guy playing Subway Surfer…

Andrew,

If you’re willing to drop it off at our office, then that would be a big help.  We’re a bit too busy this week (we other commitments to complete first), but I’ll see about scheduling a time for you to swing by next week if that’ll work for you.  Thanks for offering.  It would indeed be great to finally lay this issue to rest.

Josh

   For sure. Some of my colleagues are driving by Palo Alto today and tomorrow. I am going to ask one of them to drop off the Dragon tablet at the Corona office. You can keep the tablet for as long as you need. We will come by and pick it up once you are done.

Thanks!

Andrew

@ Josh -  I just want to follow up to see if you have have had a chance to duplicate the issue?

Thanks! 

Andrew

Not yet.  Sorry about that.  Some other surprise issues got in the way this week that took priority… but I’ll bring this up again in our next team meeting for next week.  I want to see this issue get resolved too.

Thanks Josh. I appreciate it!

Josh - sorry to keep bugging you. Just want to check in again to see how things are going and if there is anything we can do to help.

Just FYI. We just bought a Noria tablet and confirmed that the same issue exists there.

Not yet, other than we agreed that this is the next priority issue to be resolved.

Thanks Josh!

Hi,

This issue has been fixed and will be in build 2267.

Thanks Josh & dchan! We really appreciate it!

Andrew,

Just curious if you were able to confirm that this issue is fixed on your Noria tablet?

If so, then we’ll close this issue out on our end.

And thanks for letting us borrow your tablet.  We’re ready to give it back to you.  Feel free to swing by our office to pick it up.  Afternoon on a weekday would best.  Thanks again!

Yes it is! We’ve just confirmed it. Thanks a bunch again!!

I’ll drop by sometime next week in one of the afternoons. Will let you know. thx!

Josh -

   I know this is an old issue, and you guys have said you were not planning to address it. But, I want to see if the new data below would have you guys reconsider. We have been getting lots of complaints that our app is crashing where we have either confirmed, or strongly suspect this to the the root cause. Below are some of the devices that we know about, and some of them appears to be reasonable popular (eg. Y88 has 1000 Amazon reviews, Noria tablets have 500s, ).

* Y88 Dragon Tablet: http://www.amazon.com/Dragon-Y88-1024x600-Pre-load-Supported/dp/B00G3Q46DC/ref=sr_1_1?s=electronics&ie=UTF8&qid=1395700117&sr=1-1&keywords=dragon+touch+pink+y88

* Noria Tablet: Also available on Amazon

* Onda devices

* http://www.energysistem.com/es/products/tablet/serie_tablet_i_hd_4_3/39439-energy_tablet_i8_dual_16gb_silver_metal

* Some white-label devices from foreign retailers

We also did some additional investigation and found that this issue was introduced sometime between release 2012.934 and 2012.994. Is it possible that somehow the loading of the library changed between these releases, and it would be a simple fix on your end?

Where this really hurts us is that these users not only give us bad reviews, but also uninstall our app from their devices. By doing so, they increase the uninstall rates on our app, which in term drives down our ranking in the Google Play store. Our uninstall rates have crept up from around 50% early last year to 70% lately, causing our ranking in our category to tank from the 20s down to the 150s. We have already tried everything we can think of to curb that uninstall rate, and currently strongly suspect this to be a contributing factor.

Furthermore there are still new tablets being released that have this issue. The issue is particularly acute for us kids app developers since parents are buying these cheap tablets for their young kids to get their kids off of the “adult iPad/tablet”… While it’s hard to tell exactly what % of the device on the market have these issues, market research firms like GDC are saying that something like 42% of the global smartphone shipments are in the budget category. (http://appleinsider.com/articles/14/02/12/idc-critical-of-apple-for-not-selling-profitless-sub-200-iphones-in-market-share-report).
 

To help, we would be super happy to ship you a device for testing. We can also help further investigate the issue if you need us to. Just let us know!

Thank you!

Andrew

We haven’t been able to reproduce this issue on our end, but it also rarely comes up.  So, it’s been low priority.

The change we made in those older daily builds was to add support for Android’s OpenSL ES library (Open Sound Library), which is what our “audio” APIs use on Android 2.3 and newer devices.  This is what Google recommends game developers to use for audio.  It provides low latency audio on the newest Android devices which is what we all want.

Now for the bad news.  We have no idea why it is crashing.  We know where it crashes, but it doesn’t make any sense.  What’s happening is that our audio code checks for the existence of the OpenSL library, and if it exists, we load it dynamically.  The problem is that some of these devices crash when we attempt to load this library and we’re unable to catch the error/exception.  If I were to guess what is wrong, then it sounds like a bad forked version of the library made by the manufacturer.  Either that or its a forked version of the OpenSL library which requires us to load another library to get it working first (which would not be standard).  Whatever it is, some of these devices are clearly not following the rules like most Android devices.

My best advice at the moment is to remove these offending devices from your supported list on Google Play.

And if it makes you feel any better, this is a rare issue.  We do go out of our way to support low-end cheap Android devices, but there are the rare devices that just don’t follow the rules and flat out misbehave.  It’s not cost effective to buy every device and spend time/resources on every device that has known issues (there are far too many devices) and it is better to focus on the most popular device models.  In any case, that’s my 2 cents.

I can come by tomorrow between 5:15-6PM to pick up the tablet. Will someone be around? Can it be left somewhere for me?

My email is akao@77sparx.com, we can take this offline. 

Thx!

Andrew 

That time is perfect.  See you then.

Hi Josh -

    Thanks for the quick and thorough response!

    Since I expect this to be an issue that every Corona developer is having as well (I think most developers just don’t realize it, like we were), perhaps what would be helpful is an new pinned topic in the forum where any device that the community came across that has this issue can be listed? That way we can all manually exclude these from our supported devices list? Is there someone in CoronaLabs who can make that happen?

     What’s also infuriating is that some of these devices don’t have names in the Google developer console that are recognizable. For examples, I was looking for the Noria devices to exclude yesterday, but can’t find any device on the list that’s clearly theirs… argh!!

Thanks,

Andrew