Admob GADBannerView.m bool _WebTryThreadLock(bool)iOS iPhone崩溃

时间:2011-05-22 17:34:26

标签: multithreading ios uikit crash admob

我使用admob sdk在iPhone 3.1.3(第一代iPhone)上运行应用程序。我不是一直想着,最近我开始犯这个错误,这是我以前从未见过的。

<Warning>: bool _WebTryThreadLock(bool), 0x3c3840: Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be a result of calling to UIKit from a secondary thread. Crashing now...

然后当我在日志文件中跟踪错误时,我看到了

Thread 6 Crashed:
0   WebCore                         0x00084380 _WebTryThreadLock(bool) + 288
1   WebCore                         0x00084ac0 _WebThreadAutoLock() + 52
2   UIKit                           0x0022061c -[UIWebView dealloc] + 128
3   CoreFoundation                  0x0003963a -[NSObject release] + 28
4   UIKit                           0x0000ab2c -[UIView(Hierarchy) removeFromSuperview] + 592
5   UIKit                           0x0005ca1c -[UIView dealloc] + 232
6   My iPhone App                       0x0008d4e0 0x1000 + 574688
7   CoreFoundation                  0x0003963a -[NSObject release] + 28
8   UIKit                           0x0000ab2c -[UIView(Hierarchy) removeFromSuperview] + 592
9   UIKit                           0x0005ca1c -[UIView dealloc] + 232
10  CoreFoundation                  0x0003963a -[NSObject release] + 28
11  UIKit                           0x000cad5c -[UIViewController dealloc] + 188
12  My iPhone App                       0x00015e60 0x1000 + 85600
13  My iPhone App                       0x000135c4 0x1000 + 75204

并进一步追查并得到了,

-[GADBannerView dealloc] (in My iPhone App) (GADBannerView.m:111)

-[myViewController dealloc] (in My iPhone App) (myViewController.m:378)

-[mySubViewController dealloc] (in My iPhone App) (mySubViewController.m:64)

我不知道发生了什么。我能做些什么来防止崩溃,或者这是admob必须解决的问题吗?

感谢任何帮助

1 个答案:

答案 0 :(得分:0)

尝试使用调试器来了解错误发生的位置。也是从你调用removeFromSuperView方法的地方。这可能会导致问题