-
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
Request to back port fix into .NET 7 #17921
Comments
Oh wow, looks like you found the same catastrophic issue I did. I discussed a temporary workaround in my thread. You can create your own Image loading Behavior or class by accessing the PlatformView of an Image and then loading the resource/photo into that directly in the platform's respective format. If you need some more pointers on how to do it, feel free to message me. Took me most of a day to figure it out. I don't want to share my whole code though for IP reasons. My repro project can reproduce this issue very rapidly and consistently at least. But yes, it is absolutely insane that the glitch exists in the first place and I can't believe they've known about it for 6 months and people like me are still having to stumble into it. I wrote a workaround myself in less than a day. Can you PM on Github? Feel free to PM me if needed, otherwise try what I did. UIImage and Android Bitmap can both be made easily from SkiaSharp Views. Load the image into an SKBItmap then there are extensions: https://learn.microsoft.com/en-us/dotnet/api/skiasharp.views.ios.iosextensions.touiimage?view=skiasharp-views-2.88 Those can be set directly into the UIImageView (iOS) and ImageView (Android) objects underneath. Yeah. |
Hi @jonmdev this is great news. I will have a look at your workaround. While looking at your thread I noticed that they say they ported it into .NET7 a few weeks ago. I wonder if that has actually happened and when we will finally see it being released. |
the fix for 14502 was backported here #16640 and should be available in the latest version of .NET7 released yesterday |
Hi @williambuchanan2. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
@williambuchanan2 If you're working by C# predominantly or can manage the image loading with a C# Behavior script and they're not making progress on this one in any timely fashion, let me know and I can post a basic script for an Image loading Behavior that circumvents this. If they're fixing it ASAP probably no need for you to work around it but it's doable if needed. From what I see the three most insanely devastating glitches in MAUI currently are:
I say this with love because I want Microsoft and the MAUI team to succeed at this. I really like MAUI and it fills an important and unique need. But man it is crazy. How can one develop or release anything in MAUI even just with these three glitches alone? You will have an app that can't take user text input in iOS, can't display images in Android, and can't even show your Terms of Service with any legal guarantees in Android (is a TOS legally binding if words are randomly missing or it is truncated?). On the plus side, Android/iOS are not rapidly changing systems, so once this stuff is fixed it should be good for years. At least in theory. I remain optimistic. They are working on it. At least so it seems. 🙂 To Microsoft staff, if it helps, my bug report for this issue (Android loading thread glitch) can reproduce the issue every time just by pressing play and then clicking the screen 1-5 times. You can see that in my thread linked above. |
Hi @jonmdev thanks for the information. Yes this problem is an absolute show stopper, and also makes debugging almost impossible (I can do around 3 taps max before it crashes, so I need to plan my debug sessions carefully). I raised this in March and spent several months waiting for a fix which they said was coming. It then turned out that they decided not to back port it. Long story short - 7 months later I am still having to debug 3 taps max at a time and still can't release the app because of it. So I think the reality is I will need to use your workaround. I had been holding off after seeing it was back ported, but looks like it hasn't fixed the problem. BTW, this is just one of many major bugs which haven't been addressed. Some of them are 18 months + old. If you are planning on using Maui be prepared to lose a lot of time. |
Maybe we're all doomed here then. 😂 Please Microsoft, please fix MAUI. Here is my loader script for synchronus loading (not async). Took me a few days to figure out which wasn't wasted as at least I learned some basic principles. The worst part was figuring out how to make a BitmapImage for Windows. Works in Windows/iOS/Android as far as I know. Could run the operation as a Task to make it async also. Here is the code for an
To use it you will also need to add to your csproj to enable "Aliases" function:
Then in practice you can go:
And it should work find. Crazy we are supposed to rewrite basic functions. And I don't know how to fix the other broken basic functions like the Editor and Label issues I mentioned. Hope that helps. Let's pray for MAUI. 😁 If anyone is reading this and knows how to properly dispose of BitmapImage in Windows I am eager to know. Thanks. |
Microsoft please fix this.... |
Appears to have actually been fixed in .NET 7 now so closing off |
Description
This issue:
#14052
Is basically a show stopper for any .NET 7 app which has images in it (i.e. pretty much every app). Can someone review the decision not to back port the long awaited fix into .NET 7.
Upgrading to .NET 8 is not an option because a) it doesn't work, and b) the number of new bugs required to work around, and c) it's not live yet.
So at the moment this is a complete show stopper.
Steps to Reproduce
Add image to app.
Run app.
Link to public reproduction project repository
?
Version with bug
7.0.92
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
7.0.92
Affected platforms
Android
Affected platform versions
Android 11 and 13
Did you find any workaround?
No
Relevant log output
No response
The text was updated successfully, but these errors were encountered: