iAd随机崩溃

时间:2010-07-14 14:57:00

标签: iphone objective-c ios4 exc-bad-access iad

我在我的应用中随机崩溃了iAd。我该怎么办?我没有看到任何暗示我修复它,因为在模拟器上它永远不会发生。

Incident Identifier: CA4CBEB9-A081-459B-BAAA-C7D58A0E0ABC
CrashReporter Key:   e24b9614a897f92ee13ce00b76c71db307c61dcb
Hardware Model:      iPod2,1
Process:         FooApp [737]
Path:            /var/mobile/Applications/F52C7226-7DA9-464B-939E-322394241900/FooApp.app/FooApp
Identifier:      FooApp
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]

Date/Time:       2010-07-14 16:42:28.135 +0200
OS Version:      iPhone OS 4.0 (8A293)
Report Version:  104

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

Thread 0 Crashed:
0   libobjc.A.dylib                 0x000034f8 objc_msgSend + 24
1   iAd                             0x0000b88c -[ADBannerView _adManagerFailedToLoadBanner:withError:] + 68
2   iAd                             0x0000317c -[ADCache _notifyFailureCount:error:] + 160
3   iAd                             0x00003968 -[ADCache _dispatchResponses] + 332
4   Foundation                      0x000932a4 __NSFireTimer + 136
5   CoreFoundation                  0x00074256 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 10
6   CoreFoundation                  0x00076966 __CFRunLoopDoTimer + 1038
7   CoreFoundation                  0x000773ea __CFRunLoopRun + 1178
8   CoreFoundation                  0x0001e0bc CFRunLoopRunSpecific + 220
9   CoreFoundation                  0x0001dfca CFRunLoopRunInMode + 54
10  GraphicsServices                0x00003f88 GSEventRunModal + 188
11  UIKit                           0x00007b40 -[UIApplication _run] + 564
12  UIKit                           0x00005fb8 UIApplicationMain + 964
13  FooApp                      0x000023b4 main (main.m:11)
14  FooApp                      0x00002384 start + 32

Thread 1:
0   libSystem.B.dylib               0x00034e84 kevent + 24
1   libSystem.B.dylib               0x00102a48 _dispatch_mgr_invoke + 88
2   libSystem.B.dylib               0x00102494 _dispatch_queue_invoke + 96
3   libSystem.B.dylib               0x00102634 _dispatch_worker_thread2 + 120
4   libSystem.B.dylib               0x0008b53c _pthread_wqthread + 392
5   libSystem.B.dylib               0x00082b6c start_wqthread + 0

Thread 2:
0   libSystem.B.dylib               0x00000ab0 mach_msg_trap + 20
1   libSystem.B.dylib               0x00002f94 mach_msg + 60
2   CoreFoundation                  0x00074b18 __CFRunLoopServiceMachPort + 88
3   CoreFoundation                  0x000770e0 __CFRunLoopRun + 400
4   CoreFoundation                  0x0001e0bc CFRunLoopRunSpecific + 220
5   CoreFoundation                  0x0001dfca CFRunLoopRunInMode + 54
6   WebCore                         0x0000370c RunWebThread(void*) + 552
7   libSystem.B.dylib               0x0008af80 _pthread_start + 364
8   libSystem.B.dylib               0x0007d014 thread_start + 0

Thread 3:
0   libSystem.B.dylib               0x00000ab0 mach_msg_trap + 20
1   libSystem.B.dylib               0x00002f94 mach_msg + 60
2   CoreFoundation                  0x00074b18 __CFRunLoopServiceMachPort + 88
3   CoreFoundation                  0x000770e0 __CFRunLoopRun + 400
4   CoreFoundation                  0x0001e0bc CFRunLoopRunSpecific + 220
5   CoreFoundation                  0x0001dfca CFRunLoopRunInMode + 54
6   Foundation                      0x0003c316 +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] + 210
7   Foundation                      0x0000c612 -[NSThread main] + 42
8   Foundation                      0x00092140 __NSThread__main__ + 908
9   libSystem.B.dylib               0x0008af80 _pthread_start + 364
10  libSystem.B.dylib               0x0007d014 thread_start + 0

Thread 4:
0   libSystem.B.dylib               0x00029f24 select$DARWIN_EXTSN + 20
1   CoreFoundation                  0x0007aa54 __CFSocketManager + 340
2   libSystem.B.dylib               0x0008af80 _pthread_start + 364
3   libSystem.B.dylib               0x0007d014 thread_start + 0

Thread 5:
0   libSystem.B.dylib               0x0008c3b4 __workq_kernreturn + 8
1   libSystem.B.dylib               0x0008b718 _pthread_wqthread + 868
2   libSystem.B.dylib               0x00082b6c start_wqthread + 0

Thread 6:
0   libSystem.B.dylib               0x0008c3b4 __workq_kernreturn + 8
1   libSystem.B.dylib               0x0008b718 _pthread_wqthread + 868
2   libSystem.B.dylib               0x00082b6c start_wqthread + 0

Thread 0 crashed with ARM Thread State:
    r0: 0x002caa60    r1: 0x3522f69a      r2: 0x002f3f30      r3: 0x05658530
    r4: 0x002e972f    r5: 0x00000000      r6: 0x00000003      r7: 0x2fffe9d0
    r8: 0x339e2ae4    r9: 0x2fffe91c     r10: 0x3522eede     r11: 0x3522da60
    ip: 0x3e668294    sp: 0x2fffe9a8      lr: 0x35217894      pc: 0x3523a4f8
  cpsr: 0x20000010

Binary Images:
    0x1000 -    0x76fff +FooApp armv6  <5c2227d78f3ac0b30540b97024b286a9> /var/mobile/Applications/F52C7226-7DA9-464B-939E-322394241900/FooApp.app/FooApp
  0x674000 -   0x675fff  dns.so armv6  <d94bf29d2f94f4cac8fb25d075252bc2> /usr/lib/info/dns.so
0x2fe00000 - 0x2fe28fff  dyld armv6  <a2a8d67606c76b315fd9e97b0b023784> /usr/lib/dyld
0x30021000 - 0x3007dfff  libGLImage.dylib armv6  <4d09042d6dfd3c953a5c35fc9d765c7c> /System/Library/Frameworks/OpenGLES.framework/libGLImage.dylib
0x3009e000 - 0x301c6fff  MusicLibrary armv6  <732057b3867dd3f90e600d1bcd217b2e> /System/Library/PrivateFrameworks/MusicLibrary.framework/MusicLibrary
0x301c7000 - 0x30364fff  AudioToolbox armv6  <7ba1695e186fe8f284ab7f33fcd85d1d> /System/Library/Frameworks/AudioToolbox.framework/AudioToolbox
0x3041e000 - 0x3043cfff  libresolv.9.dylib armv6  <806782dbc2e4e7992c26bf32b4df0674> /usr/lib/libresolv.9.dylib
0x304f4000 - 0x3055afff  libBLAS.dylib armv6  <9222c722e8fa6b004565e9f50fb611c4> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libBLAS.dylib
0x305a7000 - 0x305b6fff  OpenGLES armv6  <5f718500ced9ed538f6d70a20ca9e7b8> /System/Library/Frameworks/OpenGLES.framework/OpenGLES
0x305b7000 - 0x305f9fff  CoreLocation armv6  <f851f4f9645c050445185f901c7d1426> /System/Library/Frameworks/CoreLocation.framework/CoreLocation
0x30659000 - 0x30692fff  MobileCoreServices armv6  <d2cb48d8151eeecaac35f425543ed38f> /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices
0x306f0000 - 0x30733fff  CoreTelephony armv6  <0a68cba6be455c7c40ab745a02f731c0> /System/Library/Frameworks/CoreTelephony.framework/CoreTelephony
0x307b2000 - 0x30810fff  CoreAudio armv6  <667e016db146b7b685c2df973b4eb1f2> /System/Library/Frameworks/CoreAudio.framework/CoreAudio
0x30811000 - 0x30817fff  MBX2D armv6  <14a44e9271c3e17812a8ae9b690fbee7> /System/Library/PrivateFrameworks/MBX2D.framework/MBX2D
0x30836000 - 0x309b9fff  CoreGraphics armv6  <8fb72c9419ad2991e3883433a56474bd> /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
0x309bf000 - 0x309c7fff  IAP armv6  <393e2aa3ac1152c278788bdcdfcb0ae6> /System/Library/PrivateFrameworks/IAP.framework/IAP
0x30aba000 - 0x30b1cfff  libsqlite3.dylib armv6  <b08f7531c40c875a00655f20104bacf5> /usr/lib/libsqlite3.dylib
0x30b69000 - 0x30b69fff  vecLib armv6  <9675978ea23f63d6a50ba3e86b51ca97> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/vecLib
0x30c82000 - 0x30d66fff  QuartzCore armv6  <68467edfafbe46cf156a09f981470c4c> /System/Library/Frameworks/QuartzCore.framework/QuartzCore
0x30d6f000 - 0x30d8ffff  libRIP.A.dylib armv6  <096f09bbc077685818857b1b5b778180> /System/Library/Frameworks/CoreGraphics.framework/Resources/libRIP.A.dylib
0x30d96000 - 0x30de9fff  libvDSP.dylib armv6  <d97bf1093b1a64413eca6974fb0f5504> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvDSP.dylib
0x30e09000 - 0x30e0bfff  libAccessibility.dylib armv6  <f5ef20a0bd9cba04ebc758fe6a23d3b7> /usr/lib/libAccessibility.dylib
0x30e0c000 - 0x30e0dfff  CoreSurface armv6  <0deb7e43538b2322b1393fef1c5a1590> /System/Library/PrivateFrameworks/CoreSurface.framework/CoreSurface
0x30e29000 - 0x30f43fff  libicucore.A.dylib armv6  <32cb97fab65d624434be808e4d7f7fd5> /usr/lib/libicucore.A.dylib
0x3115c000 - 0x31160fff  ApplePushService armv6  <7f70dc415a34acff93861da7eabb7ba4> /System/Library/PrivateFrameworks/ApplePushService.framework/ApplePushService
0x31162000 - 0x3152ffff  libLAPACK.dylib armv6  <9ed24071d90c47c237b42c77a5475efe> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libLAPACK.dylib
0x315a8000 - 0x315a9fff  liblangid.dylib armv6  <8f97ab552c7d6e16f592115d7477245a> /usr/lib/liblangid.dylib
0x315ae000 - 0x31666fff  ImageIO armv6  <00456ab6f056e5cc09947c1583de18bf> /System/Library/Frameworks/ImageIO.framework/ImageIO
0x3168c000 - 0x3168ffff  CrashReporterSupport armv6  <45ad3a409dd6e9d3e7281b05a3819bc0> /System/Library/PrivateFrameworks/CrashReporterSupport.framework/CrashReporterSupport
0x31759000 - 0x31765fff  SpringBoardServices armv6  <acb852df8b8425700f2642c183362b71> /System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices
0x31766000 - 0x3176afff  libMobileGestalt.dylib armv6  <0049a3d14c57b4a1ea8d520fab571a92> /usr/lib/libMobileGestalt.dylib
0x3176b000 - 0x3176dfff  IOMobileFramebuffer armv6  <f5356b424bc55d44d4151852098336c9> /System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/IOMobileFramebuffer
0x317d5000 - 0x3190efff  libSystem.B.dylib armv6  <eba90ac7da57bb6cf062d3a6e74b852e> /usr/lib/libSystem.B.dylib
0x3193c000 - 0x31a10fff  WebKit armv6  <3cb517d6a799c4722ace6679f2e85a6d> /System/Library/PrivateFrameworks/WebKit.framework/WebKit
0x31a2b000 - 0x31a3bfff  DataDetectorsUI armv6  <c51cf579ae0d04d140e0714df48b6bae> /System/Library/PrivateFrameworks/DataDetectorsUI.framework/DataDetectorsUI
0x31a58000 - 0x31c99fff  ProtocolBuffer armv6  <16f68d9ce4e4e5bc18b35148d68c369a> /System/Library/PrivateFrameworks/ProtocolBuffer.framework/ProtocolBuffer
0x31e3a000 - 0x31e3efff  IOSurface armv6  <604ec9514f70a84f18a4c020b723ec57> /System/Library/PrivateFrameworks/IOSurface.framework/IOSurface
0x31e3f000 - 0x31f04fff  Celestial armv6  <d67abb27b59e69b05a98322b340e24d1> /System/Library/PrivateFrameworks/Celestial.framework/Celestial
0x31f3c000 - 0x31f47fff  libbz2.1.0.dylib armv6  <ce0a82849bba4a1285bbccf145c02a35> /usr/lib/libbz2.1.0.dylib
0x31f86000 - 0x31f91fff  ITSync armv6  <61f4bfaae86f26d0ff9a30d3fe6eff5f> /System/Library/PrivateFrameworks/ITSync.framework/ITSync
0x31f93000 - 0x31f9dfff  MobileWiFi armv6  <597094bba2fbd7ee1976bd5f38d93f4c> /System/Library/PrivateFrameworks/MobileWiFi.framework/MobileWiFi
0x31f9e000 - 0x31fdefff  ManagedConfiguration armv6  <4c318efb9d60754af1f1ba5eee715880> /System/Library/PrivateFrameworks/ManagedConfiguration.framework/ManagedConfiguration
0x31ffe000 - 0x3200afff  DataDetectorsCore armv6  <0fb4f9f876e49398b15f1350155a0912> /System/Library/PrivateFrameworks/DataDetectorsCore.framework/DataDetectorsCore
0x3200b000 - 0x3201cfff  PersistentConnection armv6  <ac2e94cd758efc73f8b4e9c298eac9d1> /System/Library/PrivateFrameworks/PersistentConnection.framework/PersistentConnection
0x3216a000 - 0x321b9fff  Security armv6  <b36cf795531d1d9e7be364e10d7ed90d> /System/Library/Frameworks/Security.framework/Security
0x32233000 - 0x32285fff  IOKit armv6  <861fd5d810381967e6a4d8c504fddc65> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x3235c000 - 0x33a75fff  UIKit armv6  <6b1e7386ccb9170130465dd66e320a58> /System/Library/Frameworks/UIKit.framework/UIKit
0x33a76000 - 0x33a8afff  libmis.dylib armv6  <d6b74e95f265c651ba519adbd525ab59> /usr/lib/libmis.dylib
0x33c07000 - 0x33c48fff  VideoToolbox armv6  <f599cd31636fd804c2cc820435577f5d> /System/Library/PrivateFrameworks/VideoToolbox.framework/VideoToolbox
0x33c49000 - 0x33c57fff  GraphicsServices armv6  <336ba68fec36155d87dcd5cc93cb69a5> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x341e7000 - 0x34207fff  RawCamera armv6  <0d564a0ceaead3ed2c2ca062e6e86a9b> /System/Library/CoreServices/RawCamera.bundle/RawCamera
0x34209000 - 0x34239fff  AppSupport armv6  <fe42b18413be339f6f39abcc94c98a66> /System/Library/PrivateFrameworks/AppSupport.framework/AppSupport
0x342b2000 - 0x342b9fff  liblockdown.dylib armv6  <e4d8805a067c32759705c7f750ae22d5> /usr/lib/liblockdown.dylib
0x342ba000 - 0x342c0fff  MobileKeyBag armv6  <b416e34658bd7794c3bfecefcec15827> /System/Library/PrivateFrameworks/MobileKeyBag.framework/MobileKeyBag
0x342d7000 - 0x34342fff  libstdc++.6.dylib armv6  <c621f921d71ecad04aa90512945460f5> /usr/lib/libstdc++.6.dylib
0x34387000 - 0x34447fff  MediaPlayer armv6  <f56333ca810d4782f7952c0b56b329ae> /System/Library/Frameworks/MediaPlayer.framework/MediaPlayer
0x34448000 - 0x34449fff  DataMigration armv6  <e172aff91163993f5487457a8a7fc481> /System/Library/PrivateFrameworks/DataMigration.framework/DataMigration
0x3445f000 - 0x34555fff  libxml2.2.dylib armv6  <fe03fd73746bb5d1a66283f88af99085> /usr/lib/libxml2.2.dylib
0x34556000 - 0x3455bfff  libGFXShared.dylib armv6  <1fba30d031fdd1d3580a19d0e757f82a> /System/Library/Frameworks/OpenGLES.framework/libGFXShared.dylib
0x3455e000 - 0x34566fff  WebUI armv6  <e02113f7b9eac918971ea0679e8d0e37> /System/Library/PrivateFrameworks/WebUI.framework/WebUI
0x3456e000 - 0x34573fff  AssetsLibraryServices armv6  <82ebe32a298d9a3e2ff42c1fc4ed164b> /System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices
0x345a8000 - 0x345b1fff  AccountSettings armv6  <4933996569c9e94593eece3c59c83b38> /System/Library/PrivateFrameworks/AccountSettings.framework/AccountSettings
0x345db000 - 0x345e3fff  libgcc_s.1.dylib armv6  <480b2ebb3645728b3ddea392718b06f4> /usr/lib/libgcc_s.1.dylib
0x345f1000 - 0x345f5fff  libgermantok.dylib armv6  <118d3d5c40a44d2bc6540579b946f215> /usr/lib/libgermantok.dylib
0x34638000 - 0x3463bfff  ArtworkCache armv6  <094874c28571b2a61958a12d7ac1c909> /System/Library/PrivateFrameworks/ArtworkCache.framework/ArtworkCache
0x346c4000 - 0x347e5fff  Foundation armv6  <f332f35e00567975fd242ed36417e32e> /System/Library/Frameworks/Foundation.framework/Foundation
0x347e9000 - 0x3498efff  MediaToolbox armv6  <7abebed58aafad2637353798796827d3> /System/Library/PrivateFrameworks/MediaToolbox.framework/MediaToolbox
0x349c6000 - 0x349d8fff  libbsm.0.dylib armv6  <890d82cf86a38274a40c7435941825b0> /usr/lib/libbsm.0.dylib
0x34a2d000 - 0x34a80fff  CoreMedia armv6  <791607fdea84db935ec2983b646fd6ae> /System/Library/Frameworks/CoreMedia.framework/CoreMedia
0x34c47000 - 0x34c89fff  AddressBook armv6  <8cdfdb51dfc5859a49e4e62f6f423458> /System/Library/Frameworks/AddressBook.framework/AddressBook
0x34d57000 - 0x34e5cfff  CoreData armv6  <17e10ccdd964bbceebc95ffcb9ad5d5e> /System/Library/Frameworks/CoreData.framework/CoreData
0x34e5d000 - 0x34f6dfff  CFNetwork armv6  <1f59b619ceea0eaf7ba9ec3729c136d4> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x350c0000 - 0x35105fff  CoreText armv6  <ccd1c0b6e03bff58b013f9ef494f0ef8> /System/Library/Frameworks/CoreText.framework/CoreText
0x3510b000 - 0x3512afff  Bom armv6  <9f17f2fdf0e7efd5740ff1d8637fc0b6> /System/Library/PrivateFrameworks/Bom.framework/Bom
0x35172000 - 0x35191fff  EAP8021X armv6  <d0c2bd846c2334cd5c9e801a9f466ca8> /System/Library/PrivateFrameworks/EAP8021X.framework/EAP8021X
0x35192000 - 0x35195fff  MobileInstallation armv6  <d2dc5be30f11631cc7b90e48cff0f4e7> /System/Library/PrivateFrameworks/MobileInstallation.framework/MobileInstallation
0x35196000 - 0x3519afff  CertUI armv6  <dc80eb049f3baf955c238589529ab8ff> /System/Library/PrivateFrameworks/CertUI.framework/CertUI
0x3519b000 - 0x351a7fff  libkxld.dylib armv6  <564dcfd62a1a5430ec02feacf6334825> /usr/lib/system/libkxld.dylib
0x351a8000 - 0x351b6fff  libz.1.dylib armv6  <712df47cb008c407ea7b3615d078cfc6> /usr/lib/libz.1.dylib
0x3520c000 - 0x35233fff  iAd armv6  <9fd2305c151fe217c680bb5d92731eec> /System/Library/Frameworks/iAd.framework/iAd
0x35237000 - 0x352ddfff  libobjc.A.dylib armv6  <b55da671f23d1580dc031236c03ca977> /usr/lib/libobjc.A.dylib
0x352e0000 - 0x352edfff  MobileBluetooth armv6  <294e5422ae7533dd6c64fb5fef3b86e8> /System/Library/PrivateFrameworks/MobileBluetooth.framework/MobileBluetooth
0x35348000 - 0x353e6fff  ProofReader armv6  <adaf06c1f87b025b35995394f3cf9c2a> /System/Library/PrivateFrameworks/ProofReader.framework/ProofReader
0x355bb000 - 0x355bbfff  Accelerate armv6  <19360395982776b4e38e5a28acda450b> /System/Library/Frameworks/Accelerate.framework/Accelerate
0x355bc000 - 0x35719fff  libGLProgrammability.dylib armv6  <e13b0847531b60aebfdb276c1eb5623a> /System/Library/Frameworks/OpenGLES.framework/libGLProgrammability.dylib
0x357e8000 - 0x358d1fff  JavaScriptCore armv6  <2c206f26fee7b7a93004b9f4e82b504b> /System/Library/PrivateFrameworks/JavaScriptCore.framework/JavaScriptCore
0x35966000 - 0x3615dfff  WebCore armv6  <d2d1696c608f72e1451e7fe640ff840a> /System/Library/PrivateFrameworks/WebCore.framework/WebCore
0x362ab000 - 0x362e6fff  libCGFreetype.A.dylib armv6  <51e05cea58bdf27356c29658b5b93e6d> /System/Library/Frameworks/CoreGraphics.framework/Resources/libCGFreetype.A.dylib
0x363a0000 - 0x36477fff  CoreFoundation armv6  <0ae5fe97433e816615033fbe19e5cf6e> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x36478000 - 0x36484fff  CoreVideo armv6  <639962081f133b863b43981e3214c1e9> /System/Library/Frameworks/CoreVideo.framework/CoreVideo
0x36485000 - 0x364c7fff  SystemConfiguration armv6  <9f8575eaec0d1428fe23a40f2f7dd2c5> /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration
0x36503000 - 0x36563fff  GMM armv6  <8f383b3fb65b1dd4e9e46d6de455ff29> /System/Library/PrivateFrameworks/GMM.framework/GMM
0x365c4000 - 0x36600fff  QuickLook armv6  <d4e3461fd4185a86315ce004e0562382> /System/Library/Frameworks/QuickLook.framework/QuickLook

2 个答案:

答案 0 :(得分:2)

确保正确处理所有iAd属性。我有同样的问题,但后来我实现了方法didFailToReceiveAdWithError它修复了一切。

- (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError
*)error {   if (bannerIsVisible)
    {
        [UIView beginAnimations:@"animateAdBannerOff" context:NULL];        // assumes the banner view is at the bottom of the screen.
        banner.frame = CGRectOffset(banner.frame, 0, 50); // if the banner is on top of the screen use -50
        [UIView commitAnimations];
        bannerIsVisible = NO;
    } }

答案 1 :(得分:2)

检查你是否在主视图的dealloc上将委托设置为nil。

- (void)dealloc 
{
banner.delegate = nil;
[banner release];   
[super dealloc];
}