使用UIWebView在Youtube上多次浏览后崩溃

时间:2019-04-18 10:32:44

标签: objective-c xcode youtube uiwebview

我有一个使用UIWebView浏览Youtube的IOS应用程序。但是最近我浏览了几个youtube视频(大约4-5个视频)后发现应用程序崩溃。我在Xcode上使用调试模式,但没有给出太多信息。

我再次用一个简单的UIViewController进行了测试,该UIViewController向其中添加了一个UIWebview并将其指向youtube。播放一些视频。然后它崩溃了。

下面是日志。

2019-04-18 18:25:01.658793+0800 testj[30393:4684669] [0x15a831600] Options: 320x180 [FFFFFFFF,FFFFFFFF] 00024060
2019-04-18 18:25:01.659327+0800 testj[30393:4684669] [0x15a831600] Decoding failed with error code 7
2019-04-18 18:25:01.659374+0800 testj[30393:4684669] [0x15a831600] Decoding: C0 0x014000B4 0x0000304A 0x22111100 0x00000000 983
2019-04-18 18:25:01.659426+0800 testj[30393:4684669] [0x15a831600] Options: 320x180 [FFFFFFFF,FFFFFFFF] 0001C060
2019-04-18 18:25:01.659640+0800 testj[30393:4684669] [0x15a831600] Decoding failed with error code 7
2019-04-18 18:25:01.659682+0800 testj[30393:4684669] [0x15a831600] Decoding: C0 0x014000B4 0x0000304A 0x22111100 0x00000000 983
2019-04-18 18:25:01.659725+0800 testj[30393:4684669] [0x15a831600] Options: 320x180 [FFFFFFFF,FFFFFFFF] 0001C060
2019-04-18 18:25:04.400842+0800 testj[30393:4684722] [0x15b044a00] Decoding failed with error code -1
2019-04-18 18:25:04.400988+0800 testj[30393:4684722] [0x15b044a00] Decoding: C0 0x014000B4 0x0000304A 0x22111100 0x00000000 10706
2019-04-18 18:25:48.130163+0800 testj[30393:4684678] WF: _WebFilterIsActive returning: NO
2019-04-18 18:25:54.709600+0800 testj[30393:4685231] [0x15b832400] Decoding failed with error code -1
2019-04-18 18:25:54.709712+0800 testj[30393:4685231] [0x15b832400] Decoding: C0 0x00B000B0 0x0000304A 0x11111100 0x00000000 879
2019-04-18 18:25:54.709741+0800 testj[30393:4685231] [0x15b832400] Options: 2x-1 [00000000,00B000B0] 0001C060
2019-04-18 18:25:55.561210+0800 testj[30393:4685229] [0x158a82c00] Decoding failed with error code -1
2019-04-18 18:25:55.561235+0800 testj[30393:4685229] [0x158a82c00] Decoding: C0 0x014000B4 0x0000304A 0x22111100 0x00000000 10706
2019-04-18 18:25:55.561242+0800 testj[30393:4685229] [0x158a82c00] Options: 320x180 [FFFFFFFF,FFFFFFFF] 00024060
2019-04-18 18:25:55.562628+0800 testj[30393:4685229] [0x158a87200] Decoding failed with error code -1
2019-04-18 18:25:55.562639+0800 testj[30393:4685229] [0x158a87200] Decoding: C0 0x014000B4 0x0000304A 0x22111100 0x00000000 5159
2019-04-18 18:25:55.562645+0800 testj[30393:4685229] [0x158a87200] Options: 320x180 [FFFFFFFF,FFFFFFFF] 00024060
(lldb) 

然后它崩溃了。

有没有类似经验的人可以分享?

- (void)viewDidLoad {
   [super viewDidLoad];

    NSString*      weburl = @"https://m.youtube.com/watch?v=JTdF-qUCp4A";

    [_webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:weburl]]];
}

我唯一的错误是 错误:0x0的内存读取失败 WebThread(9):EXC_BAD_ACCESS(代码= 1,地址= 0x0)

0 个答案:

没有答案