-
Notifications
You must be signed in to change notification settings - Fork 19
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
Throws NullReferenceException caused by ImageService is null #3
Comments
It could |
Is it supported already in .net 8 maui? I raised an issue about it and it's coming |
@NishiokaTakeo I have reviewed your merge request, your code can prevent NRE but still not fix the cause of NRE. The better fix is to find out why FindMauiContext() returns null. Can you upload the full demo project then I can take a deeper look for this issue. |
I found this to be the case in my app because I was setting This probably is not the solution but perhaps it gives some insight as to why |
Hi @brunck , Thanks for reply and the workaround works for my case as well.
As @brunck pointed out, I think MS document supposes to set MainPage in App constructor. But not strongly mention as xamarin document does. For Xamarin, document mentioned,
It would be great if you revaluate PR goes in. |
I have merged the push request. Thanks very much! |
The latest version 1.0.7 has been uploaded to NUGET. You can try it to verify this issue. |
Had this problem in an application, and the workaround posted from @brunck helped out. After updating FFImageLoading.Maui to 1.0.7 and reverting the workaround changes, the app is working as expected and images are showing up normally. |
I confirmed the issue does not happen. Thank you for fixing! |
Since version 1.2.6 the problem has returned In version 1.2.5 is good Please check this |
@Jasper7 I really don't know what had been changed in Maui. But if you upgrade Maui to the latest version, then those weird |
Description
ImageService is null as a result, it causes NullReferenceException.
Steps to Reproduce
Add a file contains below.
Set
Source
binding property from behind the code. At this time, It wasStream
. but it does not matter asImageService
was null.Expected Behavior
Should not throws NullReferenceException.
Actual Behavior
throws NullReferenceException.
Basic Information
Screenshots
The text was updated successfully, but these errors were encountered: