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

iOS crash: RCTImageCache.m [RCTImageCache dateWithHeaderString:] #22381

Closed
AndrewJack opened this issue Nov 22, 2018 · 4 comments
Closed

iOS crash: RCTImageCache.m [RCTImageCache dateWithHeaderString:] #22381

AndrewJack opened this issue Nov 22, 2018 · 4 comments
Labels
Component: Image Impact: Regression Describes a behavior that used to work on a prior release, but stopped working recently. Platform: iOS iOS applications. Resolution: Fixed A PR that fixes this issue has been merged. Resolution: Locked This issue was locked by the bot.

Comments

@AndrewJack
Copy link
Contributor

Environment

Run react-native info in your terminal and paste its contents here.

React Native Environment Info:
    System:
      OS: macOS 10.14.1
      CPU: x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
      Memory: 25.62 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 11.1.0 - /usr/local/bin/node
      Yarn: 1.10.1 - /usr/local/bin/yarn
      npm: 6.4.1 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        Build Tools: 23.0.1, 23.0.2, 23.0.3, 24.0.0, 24.0.1, 24.0.2, 24.0.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.0, 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.2, 28.0.3
        API Levels: 23, 25, 26, 27, 28
    IDEs:
      Android Studio: 3.2 AI-181.5540.7.32.5056338
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.1 => 16.6.1 
      react-native: 0.57.5 => 0.57.5 
    npmGlobalPackages:
      react-native-cli: 1.0.0

Description

Seeing a crash in the iOS RCTImageCache in production.

Introduced by this PR: #20356

It's been cherry picked into RN 0.57.5

It was previously reverted citing "We observed some failures on an internal consumer as soon as this diff landed on master."

Crashed: com.apple.root.default-qos
0  libobjc.A.dylib                0x229488d70 objc_msgSend + 16
1  Foundation                     0x22adcdc58 getObjectValue + 148
2  Foundation                     0x22ac883f0 -[NSDateFormatter getObjectValue:forString:errorDescription:] + 188
3  Foundation                     0x22ac88314 -[NSDateFormatter dateFromString:] + 48
4  DriveTribe                     0x1010b16e4 -[RCTImageCache dateWithHeaderString:] (RCTImageCache.m:147)
5  DriveTribe                     0x1010b13ec -[RCTImageCache addImageToCache:URL:size:scale:resizeMode:responseDate:cacheControl:] (RCTImageCache.m:124)
6  DriveTribe                     0x1010b4d40 __119-[RCTImageLoader loadImageWithURLRequest:size:scale:clipped:resizeMode:progressBlock:partialLoadBlock:completionBlock:]_block_invoke_2 (RCTImageLoader.m:596)
7  DriveTribe                     0x1010b53a8 __80-[RCTImageLoader decodeImageData:size:scale:clipped:resizeMode:completionBlock:]_block_invoke_2 (RCTImageLoader.m:650)
8  DriveTribe                     0x1010b5864 __80-[RCTImageLoader decodeImageData:size:scale:clipped:resizeMode:completionBlock:]_block_invoke_3.297 (RCTImageLoader.m:688)
9  libdispatch.dylib              0x229cd96c8 _dispatch_call_block_and_release + 24
10 libdispatch.dylib              0x229cda484 _dispatch_client_callout + 16
11 libdispatch.dylib              0x229c7d4a0 _dispatch_queue_override_invoke + 680
12 libdispatch.dylib              0x229c89a28 _dispatch_root_queue_drain + 376
13 libdispatch.dylib              0x229c8a2d0 _dispatch_worker_thread2 + 128
14 libsystem_pthread.dylib        0x229ebc17c _pthread_wqthread + 472
15 libsystem_pthread.dylib        0x229ebecec start_wqthread + 4

Reproducible Demo

Observed in production - iOS

@kelset kelset added Platform: iOS iOS applications. Impact: Regression Describes a behavior that used to work on a prior release, but stopped working recently. labels Nov 22, 2018
@kelset
Copy link
Contributor

kelset commented Nov 22, 2018

cc @hramos @PeteTheHeat @mmmulani can any of you add more context on why it was reverted & lately re merged?

Probably safest thing will be to revert on branch 🤔 Not sure if it should be re-reverted on master too (I guess we'll find out once 0.58 rc0 is out).

(also cc @esamelson)

@hramos
Copy link
Contributor

hramos commented Nov 30, 2018

Thanks for flagging. We have a potential fix in the works. I'm reviewing it at the moment.

@hramos hramos added the Resolution: Fixed A PR that fixes this issue has been merged. label Dec 7, 2018
@hramos
Copy link
Contributor

hramos commented Dec 7, 2018

Fixed in 668341a

@hramos hramos closed this as completed Dec 7, 2018
@Winglonelion
Copy link

@hramos Did is available on and npm version ?

@facebook facebook locked as resolved and limited conversation to collaborators Jan 5, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Dec 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: Image Impact: Regression Describes a behavior that used to work on a prior release, but stopped working recently. Platform: iOS iOS applications. Resolution: Fixed A PR that fixes this issue has been merged. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants