Reputation: 56
Dose anybody know what is the crash when webview pop, it happen sometime.
0 libobjc.A.dylib 0x0000000190c8ef30 objc_msgSend (respondsToSelector:) + 16
1 CoreFoundation 0x0000000192248078 ____forwarding___ + 404
2 CoreFoundation 0x000000019214259c _CF_forwarding_prep_0 + 80
3 CoreFoundation 0x000000019224a160 ___invoking___ + 144
4 CoreFoundation 0x000000019213dc3c -[NSInvocation invoke] + 284
5 WebCore 0x0000000196cea200 HandleDelegateSource(void*) + 108
6 CoreFoundation 0x00000001921f2278 ___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
7 CoreFoundation 0x00000001921f1bc0 ___CFRunLoopDoSources0 + 524
8 CoreFoundation 0x00000001921ef7c0 ___CFRunLoopRun + 804
9 CoreFoundation 0x000000019211e048 CFRunLoopRunSpecific + 436
10 GraphicsServices 0x0000000193ba1198 GSEventRunModal + 172
11 UIKit 0x00000001980f8628 -[UIApplication _run] + 684
12 UIKit 0x00000001980f3360 UIApplicationMain + 208
13 HuaYang 0x00000001007dc894 main (main.m:21)
14 libdyld.dylib 0x00000001911005b8 _dyld_process_info_notify_release + 36
Upvotes: 1
Views: 301
Reputation: 82779
objc_msgSend (respondsToSelector:) - This is a memory management issue. You will need to replicate the conditions of the crash with Zombies turned on and check once else another option stop loading the webView and remove the delegate before leaving the view:
objective C
- (void)viewWillDisappear:(BOOL)animated{
[yourwebViewname setDelegate:nil];
[yourwebViewname stopLoading];
}
swift
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
yourwebViewname.delegate = nil
yourwebViewname.stopLoading()
}
Upvotes: 6