我在我的iphone应用程序中使用AdWhirl,并且在几个不同的视图中显示adView。每个视图都有不同的adView ivar。问题是,当我快速切换视图时,Adwhirl代码中的ASIHttpRequest试图在视图被释放后调用视图。我尝试在我的视图中将委托设置为零,但无济于事。是否有其他解决方法可以在释放视图时取消AdWhirl ASIHttpRequest。在我的视图dealloc中,我正在做的事情如下:
adView.delegate = nil;
adView = nil其中adView是一个像这样声明的ivar:
@property (nonatomic, retain) AdWhirlView *adView;崩溃日志:
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000c
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x32ad5c98 objc_msgSend + 16
1 SocialMashup 0x0005503c -[ASIHTTPRequest requestReceivedResponseHeaders:] (ASIHTTPRequest.m:1954)
2 CoreFoundation 0x36387efc -[NSObject(NSObject) performSelector:withObject:] + 16
3 Foundation 0x32cfe7a2 __NSThreadPerformPerform + 262
4 CoreFoundation 0x363f1a72 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 6
5 CoreFoundation 0x363f3758 __CFRunLoopDoSources0 + 376
6 CoreFoundation 0x363f44e4 __CFRunLoopRun + 224
7 CoreFoundation 0x36384ebc CFRunLoopRunSpecific + 224
8 CoreFoundation 0x36384dc4 CFRunLoopRunInMode + 52
9 GraphicsServices 0x30cdd418 GSEventRunModal + 108
10 GraphicsServices 0x30cdd4c4 GSEventRun + 56
11 UIKit 0x3037cd62 -[UIApplication _run] + 398
12 UIKit 0x3037a800 UIApplicationMain + 664
13 ZFirewall.dylib 0x013dcb24 0x13cd000 + 64292
14 SocialMashup 0x000024ae main (main.m:17)
15 SocialMashup 0x00002444 start + 32发布于 2011-12-09 09:36:31
我很确定AdWhirl根本不使用ASIHTTPRequest。也许你正在使用的某个广告网络是这样做的,但日志似乎甚至没有指出AdWhirl是罪魁祸首。
https://stackoverflow.com/questions/8161870
复制相似问题