-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Android Crash ImageSource Glyph #12513
Comments
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Happens now and then in our app too. But not every time. |
I found a somewhat perverse solution to this problem, but it works. First of all, I created a message to inform about the application lifecycle. I use it in several places of the application and it's very useful. using CommunityToolkit.Mvvm.Messaging.Messages; public class AppEventMessage : ValueChangedMessage public enum AppEventMessageType Next I have added to App.xaml.cs following code protected override Window CreateWindow(IActivationState? activationState)
Next I have created class AppButton that overrides Button and I use it everywhere instead of the standard button with font icon using Maui.BindableProperty.Generator.Core;
if (ImageSource == null) The main idea is to set ImageSource to null when Application stopped and set it again when Application recreated. |
Vote up! Have the same issue. |
It seems that we are better off using Xamarin for anything but the simplest of Apps as MAUI has many bugs and limitations which just seem to get pushed aside. I mean, this issue is problematic, it's not like it's a fringe case, yet we have to use workarounds like this one from @kofanov. It's like the early days of Xamarin all over again. |
Hello @henda79 , i just can agree. This will minimize your app instead of closing the activity. |
@stoff99 , thank you. |
This works when the app is closed using the back button, although there is a warning about overriding an obsolete method, so who knows how long this will work for. |
Hello @henda79 , i know but i didn't investigated into this right now. With Android 13 they introduced the predictive back gestures which makes this method obsolete. If i find some time i will implement it in this way. |
Any solution to this Below I tried to print as a label the same text on the message below the image.Source attribute ... |
Hello, |
Hi @get-flat. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version. You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository. 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. |
Verified this issue with Visual Studio Enterprise 17.7.0 Preview 2.0. Not repro on android emulator 33 platform with sample project. I tried with Android emulator 23, this issue also repro. So please try it on the latest android emulator. |
@Zhanglirong-Winnie, sorry, what is the consequence of your analysis? |
Why the issue has been closed without answering my last question? Can you please answer? |
Description
Android app crashes (always) on app resume/re-activate when FontImageSource Glyph is used.
[AndroidRuntime] java.lang.IllegalArgumentException: You cannot start a load for a destroyed activity
Steps to Reproduce
Link to public reproduction project repository
https://github.com/get-flat/maui_issue_glyph
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 10
Did you find any workaround?
No response
Relevant log output
The text was updated successfully, but these errors were encountered: