You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running a SET from an image (<FastImage>) to another where the other one has not yet been loaded, the app crashes because the SET code cannot handle NaN as a layer Rect.
Create 2 screens with <FastImage> components which have a remote URI source
Animate transition (showModal) using SET
Open a few times. It doesn't happen always as it depends on the image being loaded.
Expected behavior
It shouldn't crash. As for the animation itself, we should fall back to transitioning to the FFFastImageView's layer bounds since we don't have the underlying UIImage's size to calculate resize modes. This technically breaks "different resizeMode transitions", but at least it doesn't crash.
Additionally, we could also add a listener to the FastImage to get the actual .image's dimensions, and update the currently ongoing transition's to value accordingly. This adds a lot of complexity, but then the image would always animate correctly.
Oh I have another idea - why don't we just use the 'from' Image's .image (UIImage) to calculate resizeModes/aspect ratios? This makes a lot more sense and doesn't introduce race conditions between the image loading and the view starting to animate. wdyt @yogevbd ?
Fixes#7078.
@yogevbd was there a specific reason to only account for the Image Scale in `UIViewContentModeScaleAspectFit`? All other contentModes just used the image width/height without dividing by it's scale. I changed it so that now every contentMode respects the scale.
🐛 Bug Report
When running a SET from an image (
<FastImage>
) to another where the other one has not yet been loaded, the app crashes because the SET code cannot handle NaN as a layer Rect.Full Exception message:
This is a regression of e184102 since it worked before.
Have you read the Contributing Guidelines on issues?
yea
To Reproduce
<FastImage>
components which have a remote URI sourceExpected behavior
It shouldn't crash. As for the animation itself, we should fall back to transitioning to the
FFFastImageView
's layer bounds since we don't have the underlyingUIImage
's size to calculate resize modes. This technically breaks "different resizeMode transitions", but at least it doesn't crash.Additionally, we could also add a listener to the FastImage to get the actual
.image
's dimensions, and update the currently ongoing transition'sto
value accordingly. This adds a lot of complexity, but then the image would always animate correctly.Actual Behavior
Crash
Your Environment
Reproducible Demo
I think you can reproduce this in the playground if you use remote URLs instead of the local images - I'll try
The text was updated successfully, but these errors were encountered: