-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Windows] PlatformImage.FromStream
crash
#18954
Comments
Verified this issue with Visual Studio 17.10.0 Preview 3 (8.0.20 & 8.0.0-rc.2.9530). Can not repro it with sample project |
@kevinxufei how did you test? I just downloaded the repro project, updated to the latest maui nuget packages and I'm still able to reproduce this: at System.IO.WindowsRuntimeStreamExtensions.AsRandomAccessStream(Stream stream)
at Microsoft.Maui.Graphics.Platform.PlatformImage.<>c__DisplayClass18_0.<<FromStream>b__0>d.MoveNext()
at Microsoft.Maui.Graphics.Platform.AsyncPump.Run[T](Func`1 asyncMethod)
at Microsoft.Maui.Graphics.Platform.PlatformImage.FromStream(Stream stream, ImageFormat format)
at MauiApp1.MainPage.<OnCounterClicked>d__2.MoveNext() in C:\dev\MauiApp1\MauiApp1\MainPage.xaml.cs:line 22 I'm on .NET 8 version <PackageReference Include="Microsoft.Maui.Controls" Version="8.0.20" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.20" /> |
updated my repro to 8.0.40. The exception is the same - is this something that even was adressed at all in a recent release @jsuarezruiz ? |
Workaround for this issue should be: but hopefully #23626 will be merged. |
Description
trying to get an image from the web as an IImage like this:
crashes the app on Windows with the following Exception:
Cannot use the specified Stream as a Windows Runtime IRandomAccessStream because this Stream does not support seeking.
Works fine on Android
Repro:
MauiApp1.zip
Steps to Reproduce
Link to public reproduction project repository
No response
Version with bug
8.0.3
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
Windows
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: