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/Catalyst] Fix issue loading images from Stream #16162

Merged
merged 5 commits into from
Aug 16, 2023
Merged

[iOS/Catalyst] Fix issue loading images from Stream #16162

merged 5 commits into from
Aug 16, 2023

Conversation

jsuarezruiz
Copy link
Contributor

Description of Change

Fix issue loading images from Stream at runtime on iOS.

Issues Fixed

Fixes #12020

@jsuarezruiz jsuarezruiz added t/bug Something isn't working platform/iOS 🍎 area-controls-image Image control labels Jul 14, 2023
@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Jul 14, 2023
{
await InvokeOnMainThreadAsync(async () =>
{
var image = ImageSource.FromStream(() => new MemoryStream(Convert.FromBase64String(coffeeBase64)));
Copy link
Contributor

@MartyIX MartyIX Jul 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the MemoryStream be disposed? Oh, it might be the responsibility of ImageSource. Hm, IDK :)

@jsuarezruiz jsuarezruiz marked this pull request as ready for review July 31, 2023 14:30
@samhouts samhouts added this to the Under Consideration milestone Jul 31, 2023
Copy link
Member

@Eilon Eilon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems alright. Good to merge?

@rmarinho rmarinho closed this Aug 16, 2023
@rmarinho rmarinho reopened this Aug 16, 2023
@rmarinho rmarinho requested a review from a team as a code owner August 16, 2023 13:57
@rmarinho rmarinho merged commit 0ebb60b into main Aug 16, 2023
39 checks passed
@rmarinho rmarinho deleted the fix-12020 branch August 16, 2023 13:57
rmarinho pushed a commit that referenced this pull request Aug 19, 2023
* Fix the issue

* More changes

* Added device test
@UkeHa
Copy link

UkeHa commented Aug 25, 2023

@Eilon, any chance of a backport to .net7?

@Eilon
Copy link
Member

Eilon commented Aug 25, 2023

@UkeHa I'm tagging @rmarinho and @jfversluis who can consider that.

@mattleibow mattleibow added backport/suggested The PR author or issue review has suggested that the change should be backported. backport/approved After some discussion or review, this PR or change was approved to be backported. labels Aug 25, 2023
@mattleibow
Copy link
Member

/backport to net7.0

@github-actions
Copy link
Contributor

Started backporting to net7.0: https://github.com/dotnet/maui/actions/runs/6026855943

@github-actions
Copy link
Contributor

@mattleibow backporting to net7.0 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Fix the issue
.git/rebase-apply/patch:75: trailing whitespace.
		
warning: 1 line adds whitespace errors.
Using index info to reconstruct a base tree...
M	src/Core/src/Handlers/Image/ImageHandler.iOS.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Core/src/Handlers/Image/ImageHandler.iOS.cs
CONFLICT (content): Merge conflict in src/Core/src/Handlers/Image/ImageHandler.iOS.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Fix the issue
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@github-actions
Copy link
Contributor

@mattleibow an error occurred while backporting to net7.0, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

PureWeen pushed a commit that referenced this pull request Sep 20, 2023
* Fix the issue

* More changes

* Added device test
# Conflicts:
#	src/Core/src/Handlers/Image/ImageHandler.iOS.cs
rmarinho pushed a commit that referenced this pull request Sep 20, 2023
…#17519)

* [iOS/Catalyst] Fix issue loading images from Stream (#16162)

* Fix the issue

* More changes

* Added device test
# Conflicts:
#	src/Core/src/Handlers/Image/ImageHandler.iOS.cs

* - fix backport for net70

---------

Co-authored-by: Javier Suárez <javiersuarezruiz@hotmail.com>
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2023
@Eilon Eilon removed the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 10, 2024
@samhouts samhouts removed this from the Under Consideration milestone Jul 1, 2024
@samhouts samhouts added the fixed-in-8.0.0-rc.1.9171 Look for this fix in 8.0.0-rc.1.9171 label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-image Image control backport/approved After some discussion or review, this PR or change was approved to be backported. backport/suggested The PR author or issue review has suggested that the change should be backported. fixed-in-8.0.0-rc.1.9171 Look for this fix in 8.0.0-rc.1.9171 platform/iOS 🍎 t/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updating Image.Source at runtime is not working for iOS
8 participants