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

Fix wrong thread issue when scrolling with the middle mouse button from a se… #3287

Conversation

Polf
Copy link
Contributor

@Polf Polf commented May 15, 2020

…condary window

Fixes

Fixes the "COM object that has been separated from its underlying RCW" issue that causes the application to crash when scrolling with the middle mouse button from a secondary window

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

Steps to reproduce
When an application can open a secondary window, and this secondary window contains a ScrollViewer with EnableMiddleClickScrolling enabled:

  1. Start the application
  2. Open a secondary window
  3. Scroll inside the ScrollViewer with the middle mouse button
    This causes an unhandled exception in the application, with the message "COM object that has been separated from its underlying RCW".

What is the new behavior?

The exception disappears and the user can scroll with the middle mouse button from a secondary window.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Pull Request has been submitted to the documentation repository instructions. Link:
  • Sample in sample app has been added / updated (for bug fixes / features)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes

Other information

@ghost
Copy link

ghost commented May 15, 2020

Thanks Polf for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

@ghost ghost assigned azchohfi May 15, 2020
@Polf Polf changed the title Fix wrong thread issue when scrolling with the middle click from a se… Fix wrong thread issue when scrolling with the middle mouse button from a se… May 15, 2020
@michael-hawker michael-hawker added this to the 6.1 milestone May 18, 2020
Copy link
Member

@michael-hawker michael-hawker left a comment

Choose a reason for hiding this comment

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

@azchohfi I think this is fine for now, this should be resolved in 7.0.0 already through the switch you made for Dispatcher Queue, eh? Did you want to double-check that quick and then we'll just merge this as a temp-fix?

@azchohfi
Copy link
Contributor

Are we shipping a 6.1.1? If not, then I think this fix is not required. 7.0 will directly conflict with this. I'm ok merging it thou, as it is a better solution than the current one.

@azchohfi azchohfi merged commit fec9710 into CommunityToolkit:master May 28, 2020
@Polf Polf deleted the polf/ScrollViewerExtensionsIssueOnSecondaryWindow branch May 28, 2020 13:20
@Kyaa-dost Kyaa-dost added the bug 🐛 An unexpected issue that highlights incorrect behavior label Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants