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

Call disconnect on previous handler with Shell #8455

Merged
merged 4 commits into from
Jul 3, 2022
Merged

Conversation

PureWeen
Copy link
Member

@PureWeen PureWeen commented Jun 30, 2022

Description of Change

When swapping in a new handler for shell call disconnect on the previous handler so that the xplat events don't trigger operations on the old set of handlers. There's a larger issue here where I think we need to call SetVirtualView(null) on the previous handler. Something not quite as involved as calling "Disconnect".
#8456

Testing notes

To test this

  • fire up a shell app
  • go into developer settings on android and select the option to always destroy activities

Issues Fixed

Fixes #7940

@jsuarezruiz
Copy link
Contributor

Description of Change

When swapping in a new handler for shell call disconnect on the previous handler so that the xplat events don't trigger operations on the old set of handlers. There's a larger issue here where I think we need to call SetVirtualView(null) on the previous handler. Something not quite as involved as calling "Disconnect". #8456

Testing notes

To test this

  • fire up a shell app
  • go into developer settings on android and select the option to always destroy activities

Issues Fixed

Fixes #7940

I think I have found something similar with the WebView on Windows. Get a crash closing a Window with a WebView, mostly because doing that we are not invoking the Disconnect method. Will send a PR with changes but definitely I think this apply to the rest.

@jsuarezruiz
Copy link
Contributor

/azp run

@jsuarezruiz jsuarezruiz added the area-controls-shell Shell Navigation, Routes, Tabs, Flyout label Jul 1, 2022
@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@rmarinho
Copy link
Member

rmarinho commented Jul 1, 2022

D:\a\_work\1\s\src\Controls\tests\DeviceTests\HandlerTestBase.cs(205,12): error CS1501: No overload for method 'SetupWindowForTests' takes 3 arguments [D:\a\_work\1\s\src\Controls\tests\DeviceTests\Controls.DeviceTests.csproj]
D:\a\_work\1\s\src\Controls\tests\DeviceTests\HandlerTestBase.cs(205,12): error CS1501: No overload for method 'SetupWindowForTests' takes 3 arguments [D:\a\_work\1\s\src\Controls\tests\DeviceTests\Controls.DeviceTests.csproj]
D:\a\_work\1\s\src\Controls\tests\DeviceTests\HandlerTestBase.cs(205,12): error CS1501: No overload for method 'SetupWindowForTests' takes 3 arguments [D:\a\_work\1\s\src\Controls\tests\DeviceTests\Controls.DeviceTests.csproj]

@PureWeen
Copy link
Member Author

PureWeen commented Jul 1, 2022

@rmarinho fixed!

@jzhao8402
Copy link

When the fix will be available?

@github-actions github-actions bot locked and limited conversation to collaborators Dec 20, 2023
@samhouts samhouts added the fixed-in-6.0.419 Look for this fix in 6.0.419! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-shell Shell Navigation, Routes, Tabs, Flyout fixed-in-6.0.419 Look for this fix in 6.0.419!
Projects
None yet
5 participants