Don't report RPC errors for completion handlers due to the other process is gone #1969
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.