Don't report RPC errors for completion handlers due to the other process is gone#1969
Merged
manodasanW merged 2 commits intostaging/2.3from Apr 8, 2025
Merged
Don't report RPC errors for completion handlers due to the other process is gone#1969manodasanW merged 2 commits intostaging/2.3from
manodasanW merged 2 commits intostaging/2.3from
Conversation
Sergio0694
reviewed
Apr 8, 2025
src/cswinrt/strings/additions/Windows.Foundation/ExceptionDispatchHelper.cs
Outdated
Show resolved
Hide resolved
src/cswinrt/strings/additions/Windows.Foundation/ExceptionDispatchHelper.cs
Outdated
Show resolved
Hide resolved
Sergio0694
approved these changes
Apr 8, 2025
…atchHelper.cs Co-authored-by: Sergio Pedri <sergio0694@live.com>
5f27975 to
f441f29
Compare
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.
We are seeing crashes for scenarios where there was a completion handler registered by another process on an async operation. When the current process finishes the async operation and triggers the completion, the other process is already gone and COM reports an RPC error. We propagate that exception to the process running the async operation which results in a fail fast. But in reality, in this scenario, if the other process asking for reporting on completion is gone, there is nothing the current process can do and it can't catch the exception resulting in a fail fast either. So, we will instead silently handle that error which is similar to what CppWinRT does.
For other errors, we will still rethrow them but that will be investigated separately if there is any opportunity to improve the reporting of those errors too or if those should also be handled silently.