After the release of iOS17, our app has collected JavaScriptCore crashes, and the crash has recently appeared in iOS17 and above. The number of crashes collected recently is increasing.
We have tried various methods to troubleshoot and locate。
2024-05-08_20-45-00.5216_+0800-fdb980f66f56d73b944ccc3466922d7fd0690089.crash
2024-05-09_12-35-57.5470_+0800-70e61e8796f6967e04d1f523c54dde7b19dea31c.crash
T
2024-05-13_14-30-03.2084_+0800-d9598b08a153f5214b51257400423d4079049578.crash
he crash stack is as follows:
Post
Replies
Boosts
Views
Activity
We got a problem when we use wkwebview. We use WKWebView to load webpage in our app,but sometimes we found that when the page is loading, JS resources are always in the pending state, resulting in page loading blocking. As long as we reset WKProcessPool, the problem is solved. But it will come back after a while.
We set a singleton object to WKWebview's processpool :
configuration.processPool = self.processPool;
WKWebView* webView = [[WKWebView alloc] initWithFrame:self.bounds configuration:configuration];
(WKProcessPool *)processPool {
		if (!_processPool) {
				static dispatch_once_t predicate;
				dispatch_once(&predicate, ^{
						_processPool = [[WKProcessPool alloc] init];
				});
		}
		
		return _processPool;
}
Is there any problem that we use processpool as a singleton object ?
what may case js resource requests are always pending ?