Closed CoderWeiLee closed 2 years ago
iOS 14,runtime动态修改了Bundle的 bundleIdentifier方法后,使用模板渲染全屏视频load数据直接闪退
Bundle
bundleIdentifier
//设置包名 Bundle.main.changeIdentifier(commonConfig.bundleid) .... fullscreenAD = BUNativeExpressFullscreenVideoAd(slotID: ID) fullscreenAD!.delegate = self fullscreenAD!.loadData()
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x74) * frame #0: 0x00007fff24a7c4d8 UIKitCore`____UIKitSharedArtworkManager_block_invoke + 133 frame #1: 0x0000000103e619c8 libdispatch.dylib`_dispatch_client_callout + 8 frame #2: 0x0000000103e62f33 libdispatch.dylib`_dispatch_once_callout + 66 frame #3: 0x00007fff24a7c451 UIKitCore`__UIKitSharedArtworkManager + 42 frame #4: 0x00007fff24caf908 UIKitCore`_UIImageWithNameAndTraitCollection + 215 frame #5: 0x00007fff24caf80c UIKitCore`_UIImageWithName + 47 frame #6: 0x00007fff2467a8c5 UIKitCore`+[UIProgressView _fillImagesForIndex:style:barStyle:] + 250 frame #7: 0x00007fff2467aa95 UIKitCore`+[UIProgressView _standardOuterImageForStyle:barStyle:] + 65 frame #8: 0x00007fff2467b241 UIKitCore`-[UIProgressView _intrinsicSizeWithinSize:] + 70 frame #9: 0x00007fff2467b04f UIKitCore`-[UIProgressView setFrame:] + 66 frame #10: 0x00007fff24bbeae4 UIKitCore`UIViewCommonInitWithFrame + 1604 frame #11: 0x00007fff24bbe462 UIKitCore`-[UIView initWithFrame:] + 98 frame #12: 0x00007fff2467ab52 UIKitCore`-[UIProgressView initWithFrame:] + 64 frame #13: 0x00007fff24bbddc4 UIKitCore`-[UIView init] + 44 frame #14: 0x00000001025b1c93 Wallpaper`-[BU_ZFPlayerControlView bottomProgressView] + 69 frame #15: 0x00000001025ac331 Wallpaper`-[BU_ZFPlayerControlView init] + 545 frame #16: 0x000000010256c401 Wallpaper`-[BU_ZFPlayerView playerControlView:playerModel:] + 113 frame #17: 0x000000010263a228 Wallpaper`-[BUPlayer setupContent] + 227 frame #18: 0x000000010263a71b Wallpaper`-[BUPlayer initWithPlayerItem:cacheEnable:] + 124 frame #19: 0x000000010263a67d Wallpaper`+[BUPlayer playerWithPlayerItem:cacheEnable:] + 74 frame #20: 0x00000001025bf929 Wallpaper`-[BUNativeExpressRewardedVideoAdView _initPlayer] + 337 frame #21: 0x0000000102554193 Wallpaper`-[BUNativeExpressAdView setNativeAd:] + 111 frame #22: 0x000000010254f62f Wallpaper`-[BUNativeExpressAdView initWithFrame:nativeAd:] + 191 frame #23: 0x00000001025bf7d2 Wallpaper`-[BUNativeExpressRewardedVideoAdView initWithFrame:nativeAd:] + 63 frame #24: 0x0000000102520b0b Wallpaper`-[BUNativeExpressAdConverter pbu_nativeExpressAdViewWithNativeAd:] + 1108 frame #25: 0x0000000102520471 Wallpaper`-[BUNativeExpressAdConverter pbu_fetchTemplateDataWithNativeAd:group:] + 115 frame #26: 0x000000010251feae Wallpaper`__55-[BUNativeExpressAdConverter convertWithNativeAdArray:]_block_invoke + 555 frame #27: 0x00007fff2039239f CoreFoundation`__NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 7 frame #28: 0x00007fff2046992a CoreFoundation`-[__NSSingleObjectArrayI enumerateObjectsWithOptions:usingBlock:] + 80 frame #29: 0x000000010251fc20 Wallpaper`-[BUNativeExpressAdConverter convertWithNativeAdArray:] + 195 frame #30: 0x000000010265c239 Wallpaper`-[BUNativeExpressAdManager handleSuccessLoadWithNativeAds:] + 142 frame #31: 0x000000010265b2a9 Wallpaper`__56-[BUNativeExpressAdManager pbu_loadRewardedFullscreenAd]_block_invoke + 542 frame #32: 0x00000001025cfde7 Wallpaper`-[BURewardedVideoPreloaderManager callSuccessBlock:withMaterial:] + 36 frame #33: 0x00000001025d0340 Wallpaper`__125-[BURewardedVideoPreloaderManager getMaterialMetaFromNetworkWithSlot:sucess:failure:successLoadVideo:failureLoadVideo:IsPre:]_block_invoke + 362 frame #34: 0x0000000102540102 Wallpaper`__66-[BUAPIClient fetchNativeAdsWithAdSlot:reqType:completionHandler:]_block_invoke + 46 frame #35: 0x0000000102540eb6 Wallpaper`__81-[BUAPIClient fetchNativeAdsJsonWithAdSlot:reqType:slotParams:completionHandler:]_block_invoke_4 + 89 frame #36: 0x00000001026a5818 Wallpaper`bu_safe_dispatch_async_main_queue + 103 frame #37: 0x0000000102540cab Wallpaper`__81-[BUAPIClient fetchNativeAdsJsonWithAdSlot:reqType:slotParams:completionHandler:]_block_invoke_3 + 1076 frame #38: 0x000000010260ae31 Wallpaper`__42-[BUNetworkRequest successCompletionBlock]_block_invoke + 144 frame #39: 0x000000010260b779 Wallpaper`__41-[BUGetADSRequest successCompletionBlock]_block_invoke + 144 frame #40: 0x00000001026e8751 Wallpaper`__47-[BUNetworkAgent requestDidSucceedWithRequest:]_block_invoke + 92 frame #41: 0x0000000103e607ec libdispatch.dylib`_dispatch_call_block_and_release + 12 frame #42: 0x0000000103e619c8 libdispatch.dylib`_dispatch_client_callout + 8 frame #43: 0x0000000103e6fe75 libdispatch.dylib`_dispatch_main_queue_callback_4CF + 1152 frame #44: 0x00007fff2038edbb CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9 frame #45: 0x00007fff2038963e CoreFoundation`__CFRunLoopRun + 2685 frame #46: 0x00007fff203886d6 CoreFoundation`CFRunLoopRunSpecific + 567 frame #47: 0x00007fff2bededb3 GraphicsServices`GSEventRunModal + 139 frame #48: 0x00007fff24690e0b UIKitCore`-[UIApplication _run] + 912 frame #49: 0x00007fff24695cbc UIKitCore`UIApplicationMain + 101 frame #50: 0x00007fff54d1e5f2 libswiftUIKit.dylib`UIKit.UIApplicationMain(Swift.Int32, Swift.Optional<Swift.UnsafeMutablePointer<Swift.UnsafeMutablePointer<Swift.Int8>>>, Swift.Optional<Swift.String>, Swift.Optional<Swift.String>) -> Swift.Int32 + 98 frame #51: 0x000000010236158a Wallpaper`static UIApplicationDelegate.main() at <compiler-generated>:0 frame #52: 0x00000001023614fe Wallpaper`static AppDelegate.$main(self=Wallpaper.AppDelegate) at <compiler-generated>:0 frame #53: 0x0000000102363b29 Wallpaper`main at <compiler-generated>:0 frame #54: 0x00007fff202593e9 libdyld.dylib`start + 1 frame #55: 0x00007fff202593e9 libdyld.dylib`start + 1
Add any other context about the problem here. | 请留下你认为可以帮助解决这个问题的任何信息。
可能是用之前的包名访问了不存在的对象?
测试了一下,确实就是修改了Bundle ID的问题,项目直接使用接口请求下来的那个ID 是可以播放出来的
使用最新版 SDK 看下是否还存在这个问题?
Describe the bug | 问题描述
iOS 14,runtime动态修改了
Bundle
的bundleIdentifier
方法后,使用模板渲染全屏视频load数据直接闪退Environmental information | 环境信息
To Reproduce | 如何复现
Screenshots | 截图
Backtrace | 相关堆栈
Additional context | 附言
Add any other context about the problem here. | 请留下你认为可以帮助解决这个问题的任何信息。