Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random crash with AdMob #21

Closed
GoogleCodeExporter opened this issue Aug 30, 2015 · 3 comments
Closed

Random crash with AdMob #21

GoogleCodeExporter opened this issue Aug 30, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
This is a random crash. There seems to be no correlation with events and when 
the crash 
occurs.

What is the expected output? What do you see instead?
This is a crash.

What version of the product are you using? On what operating system?
iPhone game. Base SDK 3.0, deployment target 2.2.1. Happens across all devices.

Please provide any additional information below.
I am experiencing a weird random crash with AdMob. I am using AdWhirl
to integrate it in. The crash log looks like:

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000414
Crashed Thread:  0

Thread 0 Crashed:
0   libobjc.A.dylib                     0x334776f4 0x33475000 + 9972
1   App                                 0x000cffe0 -[AdMobAd
backgroundColor] + 48
2   App                                 0x000df1e4 -
[AdMobOldSchoolSingleAdView drawRect:] + 248

It also sometimes happens on just the AdMobOldSchoolSingleAdView
method.

Original issue reported on code.google.com by mobile...@gmail.com on 22 Mar 2010 at 6:57

@GoogleCodeExporter
Copy link
Author

This is part of issue between AdWhirl adapter and admob library.

Here's what's happening during crash.

1) AdWhirl selects AdMob
2) AdMob lib requests an ad and receives it
3) However, the ad is not displayed (either modal view controller is presented, 
or
table view is scrolled)
4) AdWhirl roller timer expired, then requests a new ad which releases current 
existing AdWhirlAdmobAdapter
5) Close the modal view or scroll table view to display previous ad
6) Old ad adapter calls freed admob adapter's adBackgroundColor method
7) App crashes

The point is [AdWhirlView requestFreshAd] method releases adapters *before* 
roll over
to new ad. (AdWhirlView.m: line 190)   This isn't safe because AdWhirlView 
rolls over
old and new ads using animations, which means old ad view's drawRect will be 
called
in certain situation (like above). So, the old ad view (ad adapter) should not 
be
released until the animation is ended. In this case, old adapter's 
backgroundColor
method is called during the animation.

I implemented a workaround in my application, but I should be taken care in 
AdWhirl
library.

Original comment by kaz...@gmail.com on 23 Mar 2010 at 9:33

@GoogleCodeExporter
Copy link
Author

Thanks for reporting 

Original comment by nigel%ad...@gtempaccount.com on 24 Mar 2010 at 4:14

  • Changed state: Duplicate

@GoogleCodeExporter
Copy link
Author

Thanks for reporting. This crash has been fixed in the latest version 2.2.0 . 
Make
sure you download the latest version of the AdMob SDK as well.

Original comment by nigel%ad...@gtempaccount.com on 24 Mar 2010 at 4:16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant