What happened?
We observed a crash during application shutdown while closing a WebView2-based browser instance.
The relevant call stack is:
EmbeddedBrowserWebView::RetryCreateWebView + 0x13b
EmbeddedBrowserWebView::CloseInternal + 0x282
EmbeddedBrowserWebView::Controller::Close + 0xaf
TaskSyncWindow::Destroy + 0x2f
The unexpected behavior is that RetryCreateWebView is entered from the controller close path. During the same shutdown sequence, a creation-related callback is dispatched and the process crashes.
Questions for the WebView2 team
- Under what conditions can CloseInternal or Controller::Close trigger RetryCreateWebView?
- Can a retry-create operation run while a WebView2 controller is being closed or destroyed?
- Can this happen when controller creation is still pending or when an asynchronous creation callback is already queued?
- Can closing a controller synchronously dispatch a controller-created or browser-created callback?
- Are callers required to cancel pending creation operations or drain callbacks before calling Close?
- Is there a documented shutdown sequence that prevents a pending create operation from retrying during close?
- Could this indicate a re-entrant close/create race in the wrapper or task-dispatch layer?
Observed sequence
- Application shutdown begins.
- A browser/controller close operation is requested.
- The close path enters CloseInternal.
- RetryCreateWebView is entered unexpectedly.
- A creation-related callback is dispatched during the close/destruction sequence.
- The process crashes in the callback path.
Expected behavior
Once controller shutdown has started, no new WebView2 creation or creation retry should be initiated, and no creation callback should access an object that is being destroyed.
Environment
- Runtime channel: Stable WebView2 Runtime
- WebView2 Runtime version: Not currently available
- WebView2 SDK version: Not currently available
- Framework: Native C++ wrapper
- Operating system: Windows
- Occurrence: Application/process shutdown
- Reproducibility: Intermittent
No application-specific source code is included in this report. We can provide a privately shared minidump or additional lifecycle logs if needed.
What happened?
We observed a crash during application shutdown while closing a WebView2-based browser instance.
The relevant call stack is:
The unexpected behavior is that RetryCreateWebView is entered from the controller close path. During the same shutdown sequence, a creation-related callback is dispatched and the process crashes.
Questions for the WebView2 team
Observed sequence
Expected behavior
Once controller shutdown has started, no new WebView2 creation or creation retry should be initiated, and no creation callback should access an object that is being destroyed.
Environment
No application-specific source code is included in this report. We can provide a privately shared minidump or additional lifecycle logs if needed.