Describe the bug
When I call AppInstance.UnregisterKey() from a different thread than FindOrRegisterForKey(...) was called from, for me it consistently immediately crashes the process with a 0xc0000409 code. It seems to happen when trying to reset a mutex, m_keyCreationMutexLock, inside UnregisterKey().
If this is intended/expected behavior, it should at least be called out in the documentation for FindOrRegisterForKey and UnregisterKey. This was very frustrating to debug.
Steps to reproduce the bug
Minimal reproduction:
`
AppInstance.FindOrRegisterForKey("key");
Thread.Sleep(3000);
new Thread(() =>
{
AppInstance.GetCurrent().UnregisterKey();
}).Start();`
Expected behavior
The key will be registered and unregistered, without crashing the process.
Screenshots
No response
NuGet package version
2.0.1
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 24H2 (26100, June 2025 Update)
IDE
Other
Additional context
No response
Describe the bug
When I call AppInstance.UnregisterKey() from a different thread than FindOrRegisterForKey(...) was called from, for me it consistently immediately crashes the process with a
0xc0000409code. It seems to happen when trying to reset a mutex,m_keyCreationMutexLock, insideUnregisterKey().If this is intended/expected behavior, it should at least be called out in the documentation for
FindOrRegisterForKeyandUnregisterKey. This was very frustrating to debug.Steps to reproduce the bug
Minimal reproduction:
`
Expected behavior
The key will be registered and unregistered, without crashing the process.
Screenshots
No response
NuGet package version
2.0.1
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 24H2 (26100, June 2025 Update)
IDE
Other
Additional context
No response