SDWebImage: NSAllocateMemoryPages Failed crash

New Issue Checklist

Issue Info

Info Value
Platform Name iOS
Platform Version 11.3.1
SDWebImage Version 4.4.0
Integration Method Cocoapods
Xcode Version XCode 9
Repro rate Rare
Repro with our demo prj No
Demo project link Working on that

Issue Description and Steps

Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x1822d2d8c __exceptionPreprocess
1  libobjc.A.dylib                0x18148c5ec objc_exception_throw
2  CoreFoundation                 0x1822d2c6c -[NSException initWithCoder:]
3  Foundation                     0x182c8e218 NSAllocateMemoryPages
4  Foundation                     0x182c79004 _NSDataCreateVMDispatchData
5  Foundation                     0x182c115ec -[_NSPlaceholderData initWithBytes:length:copy:deallocator:]
6  SDWebImage                     0x1057e2c2c -[SDWebImageDownloaderOperation URLSession:task:didCompleteWithError:] (SDWebImageDownloaderOperation.m:407)
7  SDWebImage                     0x1057e0370 -[SDWebImageDownloader URLSession:task:didCompleteWithError:] (SDWebImageDownloader.m:380)
8  CFNetwork                      0x182a27760 __51-[NSURLSession delegate_task:didCompleteWithError:]_block_invoke.207
9  Foundation                     0x182cfae88 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__
10 Foundation                     0x182c3c8d0 -[NSBlockOperation main]
11 Foundation                     0x182c3bcac -[__NSOperationInternal _start:]
12 libdispatch.dylib              0x181bc4ae4 _dispatch_client_callout
13 libdispatch.dylib              0x181bcc1f4 _dispatch_block_invoke_direct$VARIANT$mp
14 libdispatch.dylib              0x181bc4ae4 _dispatch_client_callout
15 libdispatch.dylib              0x181bcc1f4 _dispatch_block_invoke_direct$VARIANT$mp
16 libdispatch.dylib              0x181bcc0e0 dispatch_block_perform$VARIANT$mp
17 Foundation                     0x182cfc750 __NSOQSchedule_f
18 libdispatch.dylib              0x181bc4ae4 _dispatch_client_callout
19 libdispatch.dylib              0x181bccf18 _dispatch_continuation_pop$VARIANT$mp
20 libdispatch.dylib              0x181bcb850 _dispatch_async_redirect_invoke$VARIANT$mp
21 libdispatch.dylib              0x181bd1d30 _dispatch_root_queue_drain
22 libdispatch.dylib              0x181bd1a80 _dispatch_worker_thread3
23 libsystem_pthread.dylib        0x181ef7fac _pthread_wqthread
24 libsystem_pthread.dylib        0x181ef7b08 start_wqthread

Crashes with Fatal Exception: NSInvalidArgumentException*** NSAllocateMemoryPages(133801) failed Raw Text

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Comments: 30 (9 by maintainers)

Most upvoted comments

Got the same issue 6 days ago

Same issue for me.

Im seeing this today in my crash logs as well.