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

Closing out a child form while the find in page bar is open crashes webview2 in parent form #1097

Closed
TheZooKeeper opened this issue Mar 19, 2021 · 7 comments
Assignees
Labels
bug Something isn't working tracked We are tracking this work internally.

Comments

@TheZooKeeper
Copy link

TheZooKeeper commented Mar 19, 2021

Description
Closing out a child form while the find in page bar is open crashes webview2 in parent form. I get a CoreWebView2ProcessFailedEvent ProcessFailedKind of BrowserProcessExited {0}

Stack
System.Transactions Critical: 0 : http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/UnhandledUnhandled exceptionAuctionPro.exeSystem.Runtime.InteropServices.COMException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089The group or resource is not in the correct state to perform the requested operation. (Exception from HRESULT: 0x8007139F) at Microsoft.Web.WebView2.Core.Raw.ICoreWebView2Controller.set_Bounds(tagRECT Bounds)
at Microsoft.Web.WebView2.Core.CoreWebView2Controller.set_Bounds(Rectangle value)
at Microsoft.Web.WebView2.WinForms.WebView2.OnSizeChanged(EventArgs e)
at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
at System.Windows.Forms.Control.UpdateBounds()
at System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at Microsoft.Web.WebView2.WinForms.WebView2.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)System.Runtime.InteropServices.COMException (0x8007139F): The group or resource is not in the correct state to perform the requested operation. (Exception from HRESULT: 0x8007139F)
at Microsoft.Web.WebView2.Core.Raw.ICoreWebView2Controller.set_Bounds(tagRECT Bounds)
at Microsoft.Web.WebView2.Core.CoreWebView2Controller.set_Bounds(Rectangle value)
at Microsoft.Web.WebView2.WinForms.WebView2.OnSizeChanged(EventArgs e)
at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
at System.Windows.Forms.Control.UpdateBounds()
at System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at Microsoft.Web.WebView2.WinForms.WebView2.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in Microsoft.Web.WebView2.Core.dll
The group or resource is not in the correct state to perform the requested operation. (Exception from HRESULT: 0x8007139F)

Version
SDK: 1.0.774.44
Runtime: edg/89.0.774.57"
Framework: WinForms
OS: Win10 1909

Repro Steps
I included a link to a repo that has a test app. The methods show/Showdialog in frmMain.cs produce different bugs. To produce the bug:

  1. Start the app
  2. Press Button1
  3. Press cntrl+f
  4. without closing the find form, close frmChild
  5. In this case, the error pops up when you close the main form

Link To Example
https://github.com/TheZooKeeper/Webview2CrashTest

AB#32257574

@TheZooKeeper TheZooKeeper added the bug Something isn't working label Mar 19, 2021
@champnic
Copy link
Member

Hey @TheZooKeeper - thanks for the bug report, and I appreciate the repro app! I've opened this as a bug on our backlog to take a look.

@champnic champnic self-assigned this Mar 26, 2021
@champnic champnic added the tracked We are tracking this work internally. label Mar 26, 2021
@MikeCheel
Copy link

I also have users experiencing this error. Any progress or work arounds?

@champnic
Copy link
Member

We have folks actively looking at this bug and believe we have a root cause. I'll let you know when we have a fix available to try.

@MikeCheel
Copy link

Not sure if this is part of it or not but it is being reported that setting the userDataFolder parameter to a folder inside Environment.SpecialFolder.ApplicationData (roaming user app data folder) can also cause the issues when users are on the same server using the app at the same time. They think that switching to the local application data folder will fix it. I am going to try and see if it fixes this for me.

@champnic
Copy link
Member

champnic commented Aug 3, 2021

This should be fixed in runtimes 93.0.952.0+. Thanks!

@champnic champnic closed this as completed Aug 3, 2021
@TheZooKeeper
Copy link
Author

Do we have a planned general release for that runtime. I see it is in the canary branch.

@champnic
Copy link
Member

Stable WebView2 Runtime should ship version 93 around the beginning of September (around 2 weeks from now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tracked We are tracking this work internally.
Projects
None yet
Development

No branches or pull requests

3 participants