-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
Unhandled AbandonedMutexException
#413
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Attempting to grab the mutex during application startup can throw an
AbandonedMutexException
, which successfully acquires the mutex, but will crash the program if not handled. When it crashes, it abandons the mutex again, ultimately causing the program to crash repeatedly on every launch until the mutex is cleaned up by some other mechanism.There are two prerequisites to get into this situation:
I noticed this because of some other bug that was leaving an instance application in a quasi-shut-down state (no remaining application window, and not holding that mutex, but not fully exiting and releasing handles), which then made all subsequent launches fail until the odd one was terminated via task manager. It's a pretty niche set of circumstances, but should be pretty easy to handle to prevent that sort of crash loop from coming up. Either ignoring the
AbandonedMutexException
and treating it as a successful acquire (since it still is one) or attempting to clean up the program state by terminating all other CompactGUI instances (since something is broken at that point) might be reasonable approaches.The text was updated successfully, but these errors were encountered: