DylanVann / react-native-fast-image

🚩 FastImage, performant React Native image component.
MIT License
8.17k stars 1.5k forks source link

Ios Crash Fix #932

Open rezq2009 opened 2 years ago

rezq2009 commented 2 years ago

A crash occurs when playing GIF images on a ios this issue fixed in version SDWebImage : 5.13.4

https://github.com/SDWebImage/SDWebImage/issues/3273

https://github.com/SDWebImage/SDWebImage/releases/tag/5.13.4 https://github.com/SDWebImage/SDWebImage/releases/tag/5.13.3

mohitarora777 commented 1 year ago

@rezq2009 Just wanted to confirm using WebP also cause this crash or just GIF images ?

fabio-nettis commented 1 year ago

@DylanVann, Sorry for pinging you directly, but can this be merged please? Library is currently unusable on iOS.

Information on Error

From what I've read so far the issue is caused by the SDWebImage pod that is currently on version 5.11.1 in the projects podspec. Updating it to the latest version would fix this issue.

- (void) setOnFastImageError: (RCTDirectEventBlock)onFastImageError {
    _onFastImageError = onFastImageError;
    if (self.hasErrored) {
        _onFastImageError(@{}); // <-- Thread 1: EXC_BAD_ACCESS (code=1, address=0x10)
    }
}

Related issues

Following issues are containing references to this issue or related issues caused by the outdated version of SDWebImage.

econnerty commented 1 year ago

Is there anyway for me to patch this manually? I added your changes, but the project will not build anymore? @rezq2009

rezq2009 commented 1 year ago

@econnerty

need to : pod update in ios dictionary after apply this patch

OR remove all react-native-fast-image && make sure is unlinked then install it again and apply this patch before pod install

ghost commented 1 year ago

@DylanVann Do you have any chance to merge this. This is required to increase the performance of the iOS. We need to use newer versions as below:

  s.dependency 'SDWebImage', '~> 5.15.1'
  s.dependency 'SDWebImageWebPCoder', '~> 0.10.1'
amerllica commented 1 year ago

@rezq2009, During these 6 months, the SDWebImage and SDWebImageWebPCoder got updated and even your PR needs to be updated.

  s.dependency 'SDWebImage', '~> 5.15.4'
  s.dependency 'SDWebImageWebPCoder', '~> 0.10.1'
rezq2009 commented 1 year ago

So far I'm using the verified versions on all iOS versions without any crash, I'll check for new versions when I have time

Sent from my iPhone

On 2 Mar 2023, at 12:11 AM, Amer Lotfi Orimi @.***> wrote:



@rezq2009https://github.com/rezq2009, During these 6 months, the SDWebImage and SDWebImageWebPCoder got updated and even your PR needs to be updated.

s.dependency 'SDWebImage', '~> 5.15.4' s.dependency 'SDWebImageWebPCoder', '~> 0.10.1'

— Reply to this email directly, view it on GitHubhttps://github.com/DylanVann/react-native-fast-image/pull/932#issuecomment-1450853788, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AYLHNYYAGDVJUJNIZK6XJ73WZ63QRANCNFSM6AAAAAAQU3RX54. You are receiving this because you were mentioned.Message ID: @.***>

ghost commented 1 year ago

Is it possible to do this version upgrade on my project without merging this PR?

steve-godlewski commented 1 year ago

Seeing a large number of these crashes in our production app, would be great to get this PR merged in. Any update here?

amerllica commented 1 year ago

@ensar-initialcode

I think you need to know patch-package