Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Vungle causing crash on app resume from suspend?
Started by Stephen Lewis Sep 09 2013 07:55 AM

31 replies to this topic
[TOPIC CONTROLS]
Page 1 of 2 1 2
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Stephen Lewis

[GLOBAL: userInfoPane.html]
Stephen Lewis
  • Contributor

  • 716 posts
  • Enterprise

I'm getting a reliably repeatable crash on iOS devices after showing a Vungle ad with audio.   After the Vungle ad (full screen interstitial video) has completed it returns to my game.  If any time after that I suspend my app by pressing the 'home' key, then resume the game, it crashes with a seg. fault 11 error in the console.  

 

The reason I suspect it's related to Vungle audio is because i hear the audio from the old ad play again for about 1/2 second before the crash.  I have a listener function for the 'resume' event where I do an audio.resume for my game's audio that was paused by the suspend, so perhaps Vungle is not cleaning up it's audio properly after playing the ad.  To be clear, I'm letting the ad finish and my game continue as normal before I initiate the suspend/resume that triggers the crash.

 

If I suspend/resume my app before the first Vungle ad plays it doesn't crash.

 

This is using daily build 1198 and tested on an iPhone 5.  I haven't tested on Android yet.

 

I'm wondering if anyone who is using Vungle can try suspending/resuming their app after a Vungle ad plays and see if they get a similar crash or not?

 

EDIT:

Additional output from the console log at time of crash, so definitely something to do with audio:

 

<Warning>:  Job appears to have crashed: Segmentation fault: 11
<Warning>: Application exited abnormally with signal 11: Segmentation fault: 11
 <Error>: 12:35:24.264 <AudioControl> AudioSessionSetClientPlayState(4166): cannot get ClientInfo
<Error>: 12:35:24.266 <AudioControl> AudioQueue: Error 'ini?' from AudioSessionSetClientPlayState(4166)
<Error>: libMobileGestalt copySystemVersionDictionaryValue: Could not lookup ReleaseType from system version dictionary
 
I should also mention that I have to manually pause audio in my game while playing a Vungle ad, otherwise the audio from the ad and the app play over each other and sounds like a mess.  So I then have to manually audio.resume in a vungle ad listener when it encounters an adEnd event.   This all seems to work fine, except for this crash after a pause/resume of the app after showing an ad.
 
EDIT 2:
I also get the same crash if I pause/resume my game while the ad is playing.  If anybody has a live app on the appstore that uses Vungle ads I'd be happy to download and test to see if it crashes with Vungle ads.


[TOPIC: post.html]
#2

Stephen Lewis

[GLOBAL: userInfoPane.html]
Stephen Lewis
  • Contributor

  • 716 posts
  • Enterprise

I just tested the Vungle sample app on the Xcode simulator and is also crashes if I do a suspend/resume after the ad plays. So it is a bug unrelated to my code and will likely crash any Corona app using the Vungle plugin to display ads.  

 

Since this is a third party plugin what is the process for getting this bug the attention it needs?



[TOPIC: post.html]
#3

Naomi

[GLOBAL: userInfoPane.html]
Naomi
  • Corona Geek

  • 2,303 posts
  • Corona SDK

Hey, @HardBoiledIndustries, try sending email to tech-support@vungle.com with details and mention Corona SDK plugin.  Based on my experience, they are very responsive.

 

Naomi



[TOPIC: post.html]
#4

Stephen Lewis

[GLOBAL: userInfoPane.html]
Stephen Lewis
  • Contributor

  • 716 posts
  • Enterprise

Thanks Naomi, I did manage to find that tech support email on their site (I think the link to it from Corona's docs is incorrect).  Hopefully I'll hear back from them soon.

 

I'm curious if you are using Vungle in any of your apps, live or not, and if you're able to reproduce the crash I describe.  Since I was able to crash their sample app I'm afraid it could be a problem that affects anyone using the current Vungle plugin.  Would love to be proved wrong.

 

-Stephen



[TOPIC: post.html]
#5

aukStudios

[GLOBAL: userInfoPane.html]
aukStudios
  • Corona Geek

  • 1,003 posts
  • Corona SDK

Hi Stephen,

 

Thanks for highlighting this.  I've just experienced this issue in daily build 1202, iPhone 5 running iOS 6.1.

 

I don't remember having an issue like this a few weeks ago, so I suspect that Vungle updated their plugin behind-the-scenes, introducing this bug.  It points to the importance of getting changelogs for the plugins, which currently we don't get.

 

- Andrew



[TOPIC: post.html]
#6

Stephen Lewis

[GLOBAL: userInfoPane.html]
Stephen Lewis
  • Contributor

  • 716 posts
  • Enterprise

Hi Andrew,

 

Thanks for the confirmation.  I got an auto response from Vungle that they received my email to support so fingers crossed they will respond and push out a fix soon.

 

It's not exactly a change log but I found the github where they are hosting the plugin code.  It indicates the last update occurred 5 days ago (to fix an Android issue that seems unrelated to this bug).  

 

https://github.com/Vungle/coronaplugin-release

 

I agree we need more transparency wrt plugin updates.  As we rely more and more on third party plugins it could get messy not knowing if a plugin has been updated and potentially introducing a new bug, especially if the third party doesn't have a presence on these forums.  And we can't roll back to a previous version if a problem is discovered.



[TOPIC: post.html]
#7

aukStudios

[GLOBAL: userInfoPane.html]
aukStudios
  • Corona Geek

  • 1,003 posts
  • Corona SDK

Hi Stephen,

 

Glad we're in agreement about the need for more transparency when third-party plugins change.  I started a thread about it here: http://forums.coronalabs.com/topic/39238-plugin-changelogs-and-regression-bugs/.

 

- Andrew



[TOPIC: post.html]
#8

Naomi

[GLOBAL: userInfoPane.html]
Naomi
  • Corona Geek

  • 2,303 posts
  • Corona SDK

I agree with both of you, Stephen @HardBoiledIndustries and Andrew @aukStudios.

 

BTW, the issue you posted, Stephen, is not present on Android device.  I'll let you know how it goes on my end once I had a chance to test this issue on iOS device.

 

Let's hope you'll hear back from Vungle tech person soon.

 

Naomi



[TOPIC: post.html]
#9

aukStudios

[GLOBAL: userInfoPane.html]
aukStudios
  • Corona Geek

  • 1,003 posts
  • Corona SDK

FYI, I just tried rebuilding my app using daily build 1190, and the crash didn't occur, whereas it does occur in build 1202.  This suggests that plugin versions are indeed tied to daily build versions, which answers one of the questions I raised in the other thread: http://forums.coronalabs.com/topic/39238-plugin-changelogs-and-regression-bugs/.

 

- Andrew



[TOPIC: post.html]
#10

Naomi

[GLOBAL: userInfoPane.html]
Naomi
  • Corona Geek

  • 2,303 posts
  • Corona SDK

Ah, good to know.  Thank you, Andrew, for verifying this.  So it sounds like it's iOS specific issue.  Let's hope it gets fixed right away.

 

Naomi



[TOPIC: post.html]
#11

aukStudios

[GLOBAL: userInfoPane.html]
aukStudios
  • Corona Geek

  • 1,003 posts
  • Corona SDK

Actually, I spoke too soon.  I can get the crash to occur in build 1190 too, and also in build 1179.  The reason I at first didn't reproduce it in 1190 is because I waited for the ad to finish, closed it, and then suspended and resumed.  When doing it this way, I can't reproduce the crash consistently.  But now I'm testing by suspending during the Vungle ad, which does seem to reproduce the crash consistently.

 

- Andrew



[TOPIC: post.html]
#12

Naomi

[GLOBAL: userInfoPane.html]
Naomi
  • Corona Geek

  • 2,303 posts
  • Corona SDK

Thank you for following up, Andrew.  I tested both ways on Android device, and it didn't crash.  So it's definitely iOS specific issue.  Too bad, so plugin update will affect all versions of Corona then...

 

Naomi



[TOPIC: post.html]
#13

aukStudios

[GLOBAL: userInfoPane.html]
aukStudios
  • Corona Geek

  • 1,003 posts
  • Corona SDK

I'm not sure that a plugin update will affect all previous Corona builds though.  Even though I'm now able to reproduce this crash going back to build 1179, it's possible that it already existed then, and we just never noticed it until now.  We'll need to get clarification on how it works from the Corona team in the other thread.

 

- Andrew



[TOPIC: post.html]
#14

Stephen Lewis

[GLOBAL: userInfoPane.html]
Stephen Lewis
  • Contributor

  • 716 posts
  • Enterprise

Yeah, I just tested on build 1185 and it still exhibited the crash.  I was also able to crash the Vungle Sample app on the Xcode simulator with the older version of Corona.  Here's the link to the sample app:

 

https://github.com/Vungle/coronaplugin-release/tree/master/samples

 

To see the crash simply build the sample for the Xcode simulator.  Open the app and let it load and play an ad.  Once the ad is finished (When I tested it with various builds of Corona it didn't matter if the ad finished or not, it would still crash) , suspend the app by hitting the virtual home key.  Then reopen the app.  Within about 5 seconds the app will crash.

 

My assumption is the plugins are not associated with a particular version of Corona and we always get the latest plugin when we fire up any version of Corona, but it would be good to get some official confirmation from someone at CL to know how it actually works.

 

Also, this could very well be Corona Labs' bug.  The plugin might have worked against some previous build that Vungle used to create the plugin but there could have been a regression bug in a later version of Corona that broke the plugin.   Still, without transparency or communication (hello Corona Labs?  Mr. Vungle?)  we're in the dark.



[TOPIC: post.html]
#15

Stephen Lewis

[GLOBAL: userInfoPane.html]
Stephen Lewis
  • Contributor

  • 716 posts
  • Enterprise

Also, just to confirm Naomi's findings, I couldn't get the same crash on an Android device so so far it looks like an iOS specific issue.



[TOPIC: post.html]
#16

Stephen Lewis

[GLOBAL: userInfoPane.html]
Stephen Lewis
  • Contributor

  • 716 posts
  • Enterprise

Well, so far 3 days and several emails to tech-support@vungle.com and I have yet to get a response.  Not exactly building up my confidence in the viability of this "featured partner" of Corona.   It's too bad because the video interstitials seemed to be of high quality.  I guess I'll have to rip Vungle out and use a different ad provider  :unsure:



[TOPIC: post.html]
#17

Stephen Lewis

[GLOBAL: userInfoPane.html]
Stephen Lewis
  • Contributor

  • 716 posts
  • Enterprise

And... cue the response from tech support:

Apologies for the delay in response – we’ve actually had a number of
these problems come through in the last few days. It stems from a recent
change we made to the underlying iOS SDK in order to ensure
compatibility with iOS 7, and it seems to have broken the Corona plugin
for a number of publishers.

 

We’re planning on rolling out an update by the end of the week.

 

Whew!  



[TOPIC: post.html]
#18

Naomi

[GLOBAL: userInfoPane.html]
Naomi
  • Corona Geek

  • 2,303 posts
  • Corona SDK

Thanks for the update, Stephen @HardBoiledIndustries.  Glad to hear it is being addressed.

 

Naomi



[TOPIC: post.html]
#19

Naomi

[GLOBAL: userInfoPane.html]
Naomi
  • Corona Geek

  • 2,303 posts
  • Corona SDK

I see that there was an update to Vungle Plugin a day ago:

 

https://github.com/Vungle/coronaplugin-release

 

I wonder if it is deployed already, and whether or not it fixed the issue with iOS version.  

 

FYI, I am just about ready to upload an update to Google Play, and so far, I haven't seen any issue with Vungle on Android device -- and I've done tons and tons of testing.  In fact, I'm just about ready to to feel sick doing this whole back key & home key, and various combination thereof while video is playing as well as after the video ends.

 

In other words, the latest vungle plugin update probably didn't affect Android version (which is a good thing.)

 

Naomi



[TOPIC: post.html]
#20

LairdGames

[GLOBAL: userInfoPane.html]
LairdGames
  • Contributor

  • 969 posts
  • Corona SDK

@Naomi, this is probably I stupid question, but do we need to do anything to "update" Vungle? I will assume not since it is a plugin and so the update is done for us?

 

I still need to check if the issue raised by hardboiledegg has been resolved since I am preparing a new update with all the ad networks implemented (Vungle,Chartboost and Revmob)

 

Thanks a lot.

 

Mo



[TOPIC: post.html]
#21

Naomi

[GLOBAL: userInfoPane.html]
Naomi
  • Corona Geek

  • 2,303 posts
  • Corona SDK

@Mo, from what I understand, the plugin updates happen behind the scene, and they're not tied to any specific Corona Builds.  So, when you generate a new device build, if you require a plugin, its latest version would be incorporated into the device build.  At least that's what I understand to be the case.

 

Naomi



[TOPIC: post.html]
#22

LairdGames

[GLOBAL: userInfoPane.html]
LairdGames
  • Contributor

  • 969 posts
  • Corona SDK

Thanks Naomi. I am not clear on this.  So if an app is already in the store, it will need to be updated then? I hope not but it will be great to know.

 

Cheers.

 

Mo



[TOPIC: post.html]
#23

Naomi

[GLOBAL: userInfoPane.html]
Naomi
  • Corona Geek

  • 2,303 posts
  • Corona SDK

Hey Mo, you'll need to update and generate a new release build with the updated plugin, submit it to Apple and get it to store before your users can have this fix.

 

Naomi



[TOPIC: post.html]
#24

LairdGames

[GLOBAL: userInfoPane.html]
LairdGames
  • Contributor

  • 969 posts
  • Corona SDK

Ok, that makes a lot of sense. Thanks for your patience Naomi :)

 

Take care.

 

Mo



[TOPIC: post.html]
#25

Stephen Lewis

[GLOBAL: userInfoPane.html]
Stephen Lewis
  • Contributor

  • 716 posts
  • Enterprise

I just rebuilt my app using Corona build 1203 and (presumably) the updated version of the Vungle plugin and it still crashed on my iOS device after a suspend/resume, so, unfortunately, it doesn't look like the update addressed the problem.  I haven't had any problems with Vungle on Android devices.




[topic_controls]
Page 1 of 2 1 2
 
[/topic_controls]