Repository navigation
Fix crash when other instance exits. - #1634
Merged
Merged
Conversation
…er doesn't support non-event waitable kernel objects.
Scott Darnell (aeloros)
requested review from
Howard Kapustein (DrusTheAxe),
EHO (EHO-makai),
andreww-msft and
Jon Wiswall (jonwis)
October 21, 2021 21:01
Jon Wiswall (jonwis)
approved these changes
Oct 21, 2021
Howard Kapustein (DrusTheAxe)
approved these changes
Oct 22, 2021
| { | ||
| strong_this->OnInstanceTerminated(); | ||
| } | ||
| uint32_t processId{ static_cast<uint32_t>(reinterpret_cast<size_t>(context)) }; |
There was a problem hiding this comment.
NIT: const
|
|
||
| THROW_IF_FAILED(BootstrapInitialize()); | ||
|
|
||
| bool isSingleInstanced = false; |
There was a problem hiding this comment.
NIT: bool isSingleInstanced{};
Contributor
Author
|
/azp run |
Scott Darnell (aeloros)
enabled auto-merge (squash)
October 22, 2021 15:29
|
Azure Pipelines successfully started running 1 pipeline(s). |
Scott Darnell (aeloros)
added a commit
that referenced
this pull request
Oct 22, 2021
* Convert to using RegisterWaitForSingleObject since unique_event_watcher doesn't support non-event waitable kernel objects. * Updated test to exercise multiinstancing management.
Scott Darnell (aeloros)
added a commit
that referenced
this pull request
Oct 22, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Symptom:
All instances of an app that call into the AppInstance APIs crash, when one of the participating instances exits.
Cause:
Turns out unique_event_watcher does not support non-event type waitable kernel objects like process handles. This change updates the code to use RegisterWaitForSingleObject instead to create the Wait threadpool thread for cleaning up the shared instance data when a given instance exits.