Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

已崩溃:queue.SJMediaCacheServer EXC_BAD_ACCESS KERN_INVALID_ADDRESS #50

Open
kaifuZzz opened this issue Aug 25, 2022 · 2 comments
Open

Comments

@kaifuZzz
Copy link

使用如下方法进行批量prefetch的时候,会出现偶现的crash
`- (void)prefetchVideos
{
NSArray <NSString *>*videoUrl = [self videoSourceUrlStrings];
if (IS_ARRAY_EMPTY(videoUrl)) return;
//缓存开始
[SJMediaCacheServer shared].maxConcurrentPrefetchCount = 10;
[videoUrl enumerateObjectsUsingBlock:^(NSString *obj, NSUInteger idx, BOOL * _Nonnull stop) {
NSURL *storeUrl = [NSURL URLWithString:obj];
[[SJMediaCacheServer shared] prefetchWithURL:storeUrl progress:^(float progress) {
} completed:^(NSError * _Nullable error) {
NSLog(@"缓存结束");
}];
}];
}

  • (NSArray <NSString *> *)videoSourceUrlStrings
    {
    if (IS_ARRAY_EMPTY(self.videoList.records)) return @[];
    return [self.videoList.records valueForKey:@"videoUrl"];
    }
    `

crash的堆栈打印信息如下

Crashed: queue.SJMediaCacheServer
0 libdispatch.dylib 0x4ed4 dispatch_semaphore_signal$VARIANT$mp + 4
1 SJMediaCacheServer 0x3118c -[MCSContents downloadTask:didCompleteWithError:] + 52
2 SJMediaCacheServer 0x32e44 __52-[MCSDownload URLSession:task:didCompleteWithError:]_block_invoke + 216
3 libdispatch.dylib 0x63094 _dispatch_call_block_and_release + 24
4 libdispatch.dylib 0x64094 _dispatch_client_callout + 16
5 libdispatch.dylib 0xa73c _dispatch_lane_serial_drain$VARIANT$mp + 644
6 libdispatch.dylib 0xb1f4 _dispatch_lane_invoke$VARIANT$mp + 408
7 libdispatch.dylib 0x14ec8 _dispatch_workloop_worker_thread + 632
8 libsystem_pthread.dylib 0x1e10 _pthread_wqthread + 284
9 libsystem_pthread.dylib 0x193c start_wqthread + 8

大神能不能帮忙看一下

@kaifuZzz
Copy link
Author

@changsanjiang

@MateoParodi
Copy link

Any updates on this? I'm facing the same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants