react-native-fast-image
react-native-fast-image copied to clipboard
EXC_BAD_ACCESS [FFFastImageView downloadImage:options:]
Describe the bug EXC_BAD_ACCESS
copyWithZone: > expectedSize > request > Attempted to dereference garbage pointer 0x10.
__41-[FFFastImageView downloadImage:options:]_block_invoke node_modules/react-native-fast-image/ios/FastImage/FFFastImageView.m:194
Stack Trace
Thread 17 Crashed:
0 APP 0x204b4da2c __41-[FFFastImageView downloadImage:options:]_block_invoke (FFFastImageView.m:194)
1 APP 0x204ce0868 __113-[UIView sd_internalSetImageWithURL:placeholderImage:options:context:setImageBlock:progress:completed:]_block_invoke_2 (UIView+WebCache.m:107)
2 APP 0x204cd39b8 -[SDWebImageDownloaderOperation URLSession:dataTask:didReceiveData:] (SDWebImageDownloaderOperation.m:398)
3 APP 0x204cd06f4 -[SDWebImageDownloader URLSession:dataTask:didReceiveData:] (SDWebImageDownloader.m:444)
4 CFNetwork 0x316d66190 _CFNetworkHTTPConnectionCacheSetLimit
5 Foundation 0x342df239c __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__
6 Foundation 0x342cfc0c4 -[NSBlockOperation main]
7 Foundation 0x342df4624 __NSOPERATION_IS_INVOKING_MAIN__
8 Foundation 0x342cfbd5c -[NSOperation start]
9 Foundation 0x342df501c __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__
10 Foundation 0x342df4ae8 __NSOQSchedule_f
11 libdispatch.dylib 0x30ea8c7d8 _dispatch_block_async_invoke2
12 libdispatch.dylib 0x30eada180 _dispatch_client_callout
13 libdispatch.dylib 0x30ea82a38 _dispatch_continuation_pop$VARIANT$mp
14 libdispatch.dylib 0x30ea8218c _dispatch_async_redirect_invoke
15 libdispatch.dylib 0x30ea8efa0 _dispatch_root_queue_drain
16 libdispatch.dylib 0x30ea8f76c _dispatch_worker_thread2
17 libsystem_pthread.dylib 0x319c81b44 _pthread_wqthread
Dependency versions
- React Native version: 0.61.4
- React version: 16.9.0
- React Native Fast Image version: 8.1.5
Any progress on this issue ??
This is the stacktrace of the error I am getting:
thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10)
* frame #0: 0x0000000100f2511c Realyze`-[FFFastImageView setOnFastImageLoad:](self=0x0000000104ff3650, _cmd="setOnFastImageLoad:", onFastImageLoad=(null)) at FFFastImageView.m:41:9
frame #1: 0x0000000100fe446c Realyze`__createEventSetter_block_invoke(.block_descriptor=0x0000000280bf84c0, target=0x0000000104ff3650, json=0x0000000000000000) at RCTComponentData.m:124:5
frame #2: 0x0000000100fe2d78 Realyze`__49-[RCTComponentData createPropBlock:isShadowView:]_block_invoke_2.98(.block_descriptor=0x00000002810e8150, view=0x0000000104ff3650, json=0x00000001dfc8c0b0) at RCTComponentData.m:314:7
frame #3: 0x0000000100fe32cc Realyze`__49-[RCTComponentData propBlockForKey:isShadowView:]_block_invoke_2(.block_descriptor=0x000000016f80a3c0) at RCTComponentData.m:334:9
frame #4: 0x000000010105d4d4 Realyze`::RCTPerformBlockWithLogFunction(block=0x0000000100fe3294, logFunction=0x000000010105d94c)(), RCTLogFunction) at RCTLog.mm:110:3
frame #5: 0x000000010105d6a0 Realyze`::RCTPerformBlockWithLogPrefix(block=0x0000000100fe3294, prefix="Error setting property 'onFastImageLoad' of FastImageView with tag #2725: ")(), NSString *) at RCTLog.mm:118:5
frame #6: 0x0000000100fe3220 Realyze`__49-[RCTComponentData propBlockForKey:isShadowView:]_block_invoke(.block_descriptor=0x0000000280bf9640, view=0x0000000104ff3650, json=0x00000001dfc8c0b0) at RCTComponentData.m:333:7
frame #7: 0x0000000100fe34e0 Realyze`__37-[RCTComponentData setProps:forView:]_block_invoke(.block_descriptor=0x000000016f80a5a8, key=@"onFastImageLoad", json=0x00000001dfc8c0b0, stop=NO) at RCTComponentData.m:350:5
frame #8: 0x00000001a17b8990 CoreFoundation`__NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK__ + 24
frame #9: 0x00000001a1638b58 CoreFoundation`-[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 212
frame #10: 0x0000000100fe33b4 Realyze`-[RCTComponentData setProps:forView:](self=0x0000000280bc4f40, _cmd="setProps:forView:", props=2 key/value pairs, view=0x0000000104ff3650) at RCTComponentData.m:349:3
frame #11: 0x00000001010ec23c Realyze`__42-[RCTUIManager updateView:viewName:props:]_block_invoke(.block_descriptor=0x0000000280099ac0, uiManager=0x0000000283ab0960, viewRegistry=511 key/value pairs) at RCTUIManager.m:1011:5
frame #12: 0x00000001010edf14 Realyze`__44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke(.block_descriptor=0x00000002811818c0) at RCTUIManager.m:1162:9
frame #13: 0x00000001010ee238 Realyze`__44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke.485(.block_descriptor=0x0000000280770380) at RCTUIManager.m:1183:5
frame #14: 0x00000001010f6568 Realyze`__RCTExecuteOnMainQueue_block_invoke(.block_descriptor=0x0000000281181860) at RCTUtils.m:257:7
frame #15: 0x0000000104ddde1c libdispatch.dylib`_dispatch_call_block_and_release + 32
frame #16: 0x0000000104ddf27c libdispatch.dylib`_dispatch_client_callout + 20
frame #17: 0x0000000104ded32c libdispatch.dylib`_dispatch_main_queue_callback_4CF + 1376
frame #18: 0x00000001a16e3cc8 CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
frame #19: 0x00000001a16dea24 CoreFoundation`__CFRunLoopRun + 1980
frame #20: 0x00000001a16ddf40 CoreFoundation`CFRunLoopRunSpecific + 480
frame #21: 0x00000001ab96e534 GraphicsServices`GSEventRunModal + 108
frame #22: 0x00000001a5869580 UIKitCore`UIApplicationMain + 1940
frame #23: 0x00000001005fa620 Realyze`main(argc=1, argv=0x000000016f80b8e0) at main.m:14:12
frame #24: 0x00000001a155ce18 libdyld.dylib`start + 4
Any update? Have you resolved it?
Any progress on this? This is a great package but this issue leads to app crashes so may have to ditch this package until this is resolved.
Same here
any update on this issue?
I fixed the other two memory issues (merged #425 in fork & turned off webP typing for pngs) and ran into this one ðŸ˜
any update on this issue?
If it can help others, I had a stacktrace similar to @yash-atreya with this error: FFFastImageView setOnFastImageLoad:
The bug came from an onLoad
prop I passed to FastImage like that:
onLoad={isFirstPicture ? () => setIsMediumPictureLoaded(true) : null}
Where isFirstPicture
is a boolean prop the parent component receives.
I am not sure why but changing this line to:
onLoad={() => { if (isFirstPicture) { setIsMediumPictureLoaded(true) } }}
Fixed the problem.
Hope that help !
We are seeing spike in this crash. Any update on this issue? Being in open state for more than 3 years now
any further update on this?
Crashed: com.hackemist.SDWebImageDownloader.downloadQueue (QOS: UNSPECIFIED)
0 XXXXX 0x4ea090 __49-[FFFastImageView downloadImage:options:context:]_block_invoke + 213 (FFFastImageView.m:213)
1 XXXXX 0x6ed3b8 __113-[UIView(WebCache) sd_internalSetImageWithURL:placeholderImage:options:context:setImageBlock:progress:completed:]_block_invoke_2 + 153 (UIView+WebCache.m:153)
2 XXXXX 0x6de4b8 -[SDWebImageDownloaderOperation start] + 250 (SDWebImageDownloaderOperation.m:250)
3 Foundation 0x3895c __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 12
4 Foundation 0x3d9fc __NSOQSchedule_f + 168
5 libdispatch.dylib 0x46630 _dispatch_block_async_invoke2 + 104
6 libdispatch.dylib 0x64780 _dispatch_client_callout + 16
7 libdispatch.dylib 0x3bd48 _dispatch_continuation_pop$VARIANT$armv81 + 436
8 libdispatch.dylib 0x3b480 _dispatch_async_redirect_invoke + 580
9 libdispatch.dylib 0x48c68 _dispatch_root_queue_drain + 328
10 libdispatch.dylib 0x49430 _dispatch_worker_thread2 + 160
11 libsystem_pthread.dylib 0x1b94 _pthread_wqthread + 224
12 libsystem_pthread.dylib 0x1720 start_wqthread + 8