Open GoogleCodeExporter opened 8 years ago
Do you see this with v3.1.1 of the AdWhirl sdk? Also, what is the particular
error here?
Original comment by wesgood...@google.com
on 17 Jan 2012 at 10:32
I updated to 3.1.1 and still seeing some random crashes at startup. But I
can't be sure yet the new crash has the same crash stack. The code around this
error still the same as 3.0. By looking at this stack, my guess is that
delegate is over released.
- (void)reportExImpression:(NSString *)nid netType:(AdWhirlAdNetworkType)type {
NSURL *baseURL = nil;
if ([delegate respondsToSelector:@selector(adWhirlImpMetricURL)]) { // line 519
baseURL = [delegate adWhirlImpMetricURL];
}
if (baseURL == nil) {
baseURL = [NSURL URLWithString:kAdWhirlDefaultImpMetricURL];
}
[self metricPing:baseURL nid:nid netType:type];
}
Original comment by ch...@pokerincome.com
on 22 Feb 2012 at 7:41
Are you preemptively releasing the AdWhirlView or its delegate? This bug
report seems atypical, which makes me suspect an implementation issue on your
side.
Original comment by wesgood...@google.com
on 23 Feb 2012 at 12:56
I am using a static adwhirl view. i.e. all my viewcontrollers in my app shared
a same static adwhirl view. Is this ok?
I wonder if the following events will generate this error. How to fix it?
1. view controller request new ad. It sends request to the server but the
response isn't back yet.
2. User pops the view controller thus causing delegate deallocate
3. Ad response comes back and the delegate is already deallocated.
Shall I set adView.delegate = nil in ViewWillDisappear to fix this problem?
I have a abstract view controllers which all my viewcontrollers inherits from.
AbstractUIViewController.m:
static AdWhirlView *adView =nil;
- (void) viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
// put the ad on the bottom
if (adView == nil){
adView = [[AdWhirlView requestAdWhirlViewWithDelegate:self] retain]; // retain to avoid dealloc problem due to memory pressure
adView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin;
}
adView.delegate = self;
[adView requestFreshAd];
[self.view addSubview:adView];
[self adjustAdSize];
}
Original comment by ch...@pokerincome.com
on 2 Sep 2012 at 4:26
Original issue reported on code.google.com by
ch...@pokerincome.com
on 13 Jan 2012 at 10:15