You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an error in your own code. There's just a lot of mess here... and I'm not sure what you're trying to accomplish but I am betting that if you're passing around the DI container you need to re-evaluate your architecture. While this is indeed sometimes necessary it is much more the exception that you should be using the DI container directly. Remember that you can do things like inject Lazy<T> or Func<T> by default with Prism.
Bottom line though if you new up another instance of your Tool and then don't set the IContainerProvider you shouldn't be surprised when you get a NullReferenceException.
Description
It looks DryIoc.Container will crash when try to resolve object after async function.
![s1](https://private-user-images.githubusercontent.com/23649217/331814814-a1303e0c-d5b1-461a-89df-d7195710cb50.PNG?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ2MzkxNzUsIm5iZiI6MTcyNDYzODg3NSwicGF0aCI6Ii8yMzY0OTIxNy8zMzE4MTQ4MTQtYTEzMDNlMGMtZDViMS00NjFhLTg5ZGYtZDcxOTU3MTBjYjUwLlBORz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI2VDAyMjExNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRhNGViYjk0YmY0M2NmY2RlZmNhMmJmOTBmYjEyMTgyYWM3YTQ1Y2VkMzQyYWE5NDFlYTA5YjFmOGRlM2FiN2YmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ZVvS9fHB-hMDiANHhNqTjirMeJ05QCFYxeMSriAvQoo)
Steps to Reproduce
debug the sample code MauiApp1. I attched the code:
MauiApp1.zip
Click button 'click me'
![s2](https://private-user-images.githubusercontent.com/23649217/331815197-a3bf2c4a-d46e-420a-8d43-4e2ec3852f99.PNG?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ2MzkxNzUsIm5iZiI6MTcyNDYzODg3NSwicGF0aCI6Ii8yMzY0OTIxNy8zMzE4MTUxOTctYTNiZjJjNGEtZDQ2ZS00MjBhLThkNDMtNGUyZWMzODUyZjk5LlBORz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI2VDAyMjExNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ2MzdiM2YzYzhiNjYwYjFlNTlmNjBkYjg5NWJhYTExMGJlMjM4ZDc0MWM4MmIxOWZjNDg5MTA2MGRmNDliMDAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ZYwMMcbbqOtyMhOyy32oJfpNY7iktqRK5L7EHpAwCp4)
will crash in code
Platform with bug
.NET MAUI
Affected platforms
Windows
Did you find any workaround?
try to avoid resolve object after an async function.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: