-
Notifications
You must be signed in to change notification settings - Fork 4
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
Subsequent instances crash when started together #9
Comments
Try v2.2.1 from nuget. |
I can still reproduce the problem against version 2.2.1. Same error stack trace, except for the different TinyMessageBus constructor used. Attaching my test project. I build it in Release mode, then associate some random file extension with SingleInstanceTest.exe, so I can invoke it by opening files from Windows Exporer. I'd then select 15 files at a time and Open them to pretty consistently reproduce the error. |
Does it work with .NET 6 WPF? |
Hi,
I've come across a scenario where subsequent instances crash with the following error:
This happens when multiple files are selected and opened from Windows File Explorer, each file starting an instance of my application and then all these instances end up trying to signal the first instance at the same time. I've worked around this in my code by setting up a named Mutex that only allows one instance at a time calling InitializeAsFirstInstance:
This works, but it would probably be better if SingleInstanceCore handled this internally, inside the SingleInstance.SignalFirstInstance method.
Thanks for making this library available!
The text was updated successfully, but these errors were encountered: