MicrosoftEdge / MicrosoftEdge/WebView2Feedback
Dispose error: The group or resource is not in the correct state to perform the requested operation. (Exception from HRESULT: 0x8007139F)
@champnic is already working on this.
Since Sep 28, 2021.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Description
The exception occurs within the main UI thread when closing the application or form. There is an older issue (#349) that was closed. But it seems that the bug is still there. The exception happens during Dispose(). Not sure whether this is the first call to Dispose or if it's another call to Dispose.
System.Runtime.InteropServices.COMException: The group or resource is not in the correct state to perform the requested operation. (Exception from HRESULT: 0x8007139F)
Stacktrace:
at Microsoft.Web.WebView2.Core.Raw.ICoreWebView2.remove_NavigationCompleted(EventRegistrationToken token)
at Microsoft.Web.WebView2.Core.CoreWebView2.remove_NavigationCompleted(EventHandler`1 value)
at Microsoft.Web.WebView2.WinForms.WebView2.UnsubscribeHandlersAndCloseController()
at Microsoft.Web.WebView2.WinForms.WebView2.Dispose(Boolean disposing)
at System.ComponentModel.Component.Dispose()
at System.Windows.Forms.Control.Dispose(Boolean disposing)
...
Version
SDK: 1.0.705.50
Runtime: Evergreen 93.0.961.38
Framework: WinForms (x86), .NET Framework 4.8
OS:
- Windows Server 2019
- Windows Server 2016
- Windows Server 2012 R2
- Windows 10 Pro
Repro Steps
When closing the application or form.
Screenshots
Additional context
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.