dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.04k stars 1.73k forks source link

Sporadic InterOp.Com exception when retrieving a stored settting with Preferences.Get #22720

Open Thomas-Slippens opened 4 months ago

Thomas-Slippens commented 4 months ago

Description

When retrieving a stored value with the following code:

image

We occasionally experience an unhandled exception:

image

Steps to Reproduce

Call Preferences.Get(key, defaultValue) many times.

Every once in a while, the method wil throw an unhandled exception (System.Runtime.InteropServices.COMException: The handle is invalid.)

Link to public reproduction project repository

No response

Version with bug

8.0.21 SR4.1

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

No response

Did you find any workaround?

No response

Relevant log output

No response

github-actions[bot] commented 4 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

jfversluis commented 3 months ago

Thanks for the report! I understand this is hard to reproduce, but that unfortunately also means that we don't have much to go on here in terms of pinpointing where this originates or what is causing it. Therefore its unlikely this will be fixed anytime soon.

If you have any more information that you uncover about this, or someone else is seeing this that has more information, please feel free to add it!

tomysaw commented 1 month ago

I also get this issue for no obvious reason