Skip to content
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

Populate ComSafeWidgets after creation, handle failures #2744

Merged
merged 2 commits into from Apr 29, 2024

Conversation

krschau
Copy link
Contributor

@krschau krschau commented Apr 25, 2024

Summary of the pull request

Fixes issue where we were able to pin multiples of widgets where AllowMultiple = false, maybe other ones not yet found.
With lazy loading, ComSafeWidgets were only loaded with properties when a method was called on them. In the case that a property was called first, the ComSafeWidget didn't have its properties set, and would return the default (which, in the case of AllowMultiple, is true). We should call PopulateAsync() on all ComSafe* objects after new-ing them up. This was already done for ComSafeWidgetDefinitions.

Validation steps performed

Validated locally.

PR checklist

}
catch (Exception ex)
{
Log.Warning(ex, $"Failed to operate on out-of-proc object with error code: 0x{ex.HResult:x}");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this exception coming from COM, or the OOP object? If from the object, any exception is returned as a Generic Exception and the message will also be "Generic Exception"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm specifically worried about COM, I don't think we're expecting we can get any other exception here from the object.

@krschau krschau merged commit 05f5c2e into main Apr 29, 2024
4 checks passed
@krschau krschau deleted the user/krschau/comsafewidget-populate branch April 30, 2024 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Able to pin multiple of widgets where AllowMultiple=false
3 participants