2

这个应用程序是几个月前发布的,在 iOS 4/5 中完美运行。现在在 iOS 6 中的某些屏幕上出现崩溃。

相当容易实施。在 xib 中有一个 AdBannerView。我把它连到了代表处。让我的 delagate 方法显示/隐藏广告。这是崩溃数据。

异常类型:EXC_CRASH (SIGABRT)

最后异常回溯:

0   CoreFoundation                  0x36d9b29e __exceptionPreprocess + 158
1   libobjc.A.dylib                 0x350ab97a objc_exception_throw + 26
2   CoreFoundation                  0x36cec55a -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 130
3   CoreFoundation                  0x36d230ce +[NSDictionary dictionaryWithObjects:forKeys:count:] + 46
4   iAd                             0x3594c23e -[ADBannerView setDelegate:] + 126
5   Foundation                      0x347b49cc -[NSObject(NSKeyValueCoding) setValue:forKey:] + 208
6   UIKit                           0x382101dc -[UIView(CALayerDelegate) setValue:forKey:] + 156
7   Foundation                      0x347b071e -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 294
8   CoreFoundation                  0x36d21616 -[NSArray makeObjectsPerformSelector:] + 174
9   UIKit                           0x38209240 -[UINib instantiateWithOwner:options:] + 1036
10  UIKit                           0x38208abe -[UIViewController _loadViewFromNibNamed:bundle:] + 230
11  UIKit                           0x38101020 -[UIViewController loadView] + 88
12  UIKit                           0x3808b468 -[UIViewController loadViewIfRequired] + 64
13  UIKit                           0x380e0136 -[UIViewController contentScrollView] + 22
14  UIKit                           0x380e007c -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 24
15  UIKit                           0x380dff60 -[UINavigationController _layoutViewController:] + 28
16  UIKit                           0x380dfe84 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 268
17  UIKit                           0x380df5c4 -[UINavigationController _startTransition:fromViewController:toViewController:] + 60
18  UIKit                           0x380df4ac -[UINavigationController _startDeferredTransitionIfNeeded:] + 320
19  UIKit                           0x380cdb8e -[UINavigationController pushViewController:transition:forceImmediate:] + 854
20  UIKit                           0x380cd82e -[UINavigationController pushViewController:animated:] + 34
21  Hurricane                       0x00002d9a -[TrackerViewController buttonPressed:] (TrackerViewController.m:111)
22  UIKit                           0x381570a8 -[UIApplication sendAction:to:from:forEvent:] + 68
23  UIKit                           0x3815705a -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 26
24  UIKit                           0x38157038 -[UIControl sendAction:to:forEvent:] + 40
25  UIKit                           0x381568ee -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 498
26  UIKit                           0x38156de4 -[UIControl touchesEnded:withEvent:] + 484
27  UIKit                           0x3807f5f4 -[UIWindow _sendTouchesForEvent:] + 520
28  UIKit                           0x3806c804 -[UIApplication sendEvent:] + 376
29  UIKit                           0x3806c11e _UIApplicationHandleEvent + 6150
30  GraphicsServices                0x3721f59e _PurpleEventCallback + 586
31  GraphicsServices                0x3721f1ce PurpleEventCallback + 30
32  CoreFoundation                  0x36d7016e __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 30
33  CoreFoundation                  0x36d70112 __CFRunLoopDoSource1 + 134
34  CoreFoundation                  0x36d6ef94 __CFRunLoopRun + 1380
35  CoreFoundation                  0x36ce1eb8 CFRunLoopRunSpecific + 352
36  CoreFoundation                  0x36ce1d44 CFRunLoopRunInMode + 100
37  GraphicsServices                0x3721e2e6 GSEventRunModal + 70
38  UIKit                           0x380c02fc UIApplicationMain + 1116
39  Hurricane                       0x00002082 main (main.m:14)
40  Hurricane                       0x0000203c start + 36

如果我取消连接 AdBannerView,它就可以工作。重新接线并崩溃。我在这个特定的控制器中没有任何字典。实际上,它只有 6 个通向其他屏幕的按钮。真正奇怪的是,代码在其他屏幕的其他地方使用,但工作正常。显然,它以前工作得很好。

4

1 回答 1

0

让我澄清一下,在 iOS 6 中,AdBannerView 不推荐使用一些属性和方法。我认为这应该是你崩溃的原因。

请检查这个

http://developer.apple.com/library/ios/DOCUMENTATION/UserExperience/Reference/ADBannerView_Ref/Reference/Reference.html#//apple_ref/doc/uid/TP40009562-CH1-DontLinkElementID_9

于 2012-09-27T11:05:51.770 回答