Tencent / VasSonic

VasSonic is a lightweight and high-performance Hybrid framework developed by tencent VAS team, which is intended to speed up the first screen of websites working on Android and iOS platform.
Other
11.8k stars 1.61k forks source link

快速的进入退出页面,概率性闪退 #280

Closed DeforeChen closed 5 years ago

DeforeChen commented 5 years ago

What steps will reproduce the problem? 该问题的重现步骤是什么?

  1. 进入 vasSonic 的页面退出再重进,重复多次后概率性出现闪退

你期待的结果是什么?实际看到的又是什么? 不闪退

你正在使用产品的哪个版本?在什么操作系统上? 3.0.0, iOS 11.3

如果有的话,请在下面提供更多信息。

- (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask
    didReceiveData:(NSData *)data
{
    [self.delegate connection:self didReceiveData:data];
}

崩溃明确指向这行代码,delegate 变成了一个僵尸对象

sonic-ios-dev commented 5 years ago

这个跟SonicJSContext释放时机有点关系,目前只是在Demo中出现问题;我们项目也在使用,还没有遇到这种偶现的crash;后续关于这个SonicJSContext释放时机我这边做一个调整,会提交一个新的PR修复;