xiubojin / JXBWKWebView

An component WebView for iOS base on WKWebView
MIT License
735 stars 115 forks source link

主动或被动触发内存不足warnning时发生闪退JXBWKWebView.dealloc #50

Closed sunwillshine closed 5 years ago

sunwillshine commented 5 years ago

[[NSNotificationCenter defaultCenter] postNotificationName:UIApplicationDidReceiveMemoryWarningNotification object:nil];主动或被动触发内存不足warnning时发生闪退, “Cannot form weak reference to instance (0x7fa86b05e800) of class JXBWKWebView. It is possible that this object was over-released, or is in the process of deallocation.” 部分堆栈信息如下 20 -[WKWebView(ExternalNavigationDelegates) unUseExternalNavigationDelegate] + 5062368 (WKWebView+ExternalNavigationDelegates.m:259) 21 -[JXBWKWebView dealloc] + 5038792 (JXBWKWebView.m:57) 22 CoreFoundation 0x00000001b80d912c 0x1b80c9000 + 65836 23 -[JXBWKWebViewPool _clearReusableWebViews] + 5044196 (JXBWKWebViewPool.m:145) 主动触发warnning后闪退,异常断点停在上述方法中的 [self setNavigationDelegate:[self originalNavigationDelegate]];这行代码。

image

xiubojin commented 5 years ago

截图是你手动触发内存不足警告吗?

sunwillshine commented 5 years ago

截图是你手动触发内存不足警告吗?

是的,被动触发的系统日志闪退堆栈和手动触发的是一样的,只是说明在内存不足警告时会出现闪退,测试设备真机产生的闪退日志定位到的问题。

xiubojin commented 5 years ago

截图是你手动触发内存不足警告吗?

是的,被动触发的系统日志闪退堆栈和手动触发的是一样的,只是说明在内存不足警告时会出现闪退,测试设备真机产生的闪退日志定位到的问题。

好的。

xiubojin commented 5 years ago

我试了一下复现不了,方便+个微信?

sunwillshine commented 5 years ago

我试了一下复现不了,方便+个微信?

你的邮箱还在用吗?发你邮箱了。

xiubojin commented 5 years ago

该问题由GIO引起