Skip to content

EmbeddedBrowserWebView.dll calls CoReleaseServerProcess during instance cleanup, resulting in corrupted COM initialization for EXE-server  #4226

Closed
@pontusn

Description

@pontusn

What happened?

Our application embed WebView2 for multiple purposes, one is to handle an HTML-based login-dialog.

This dialog is displayed during initialization, after COM-objects have been registered, but before any APIs are available to external clients.

Starting with WebView2 v120 we have now identified that COM-objects provided by the EXE itself are not available,

The root cause seems to be calls to CoReleaseServerProcess when the WebView2 instance hosted in our login-dialog is cleaned up. The call effectively suspend all registered COM-objects via an implict call to CoSuspendClassObjects, resulting in various application errors at later stages.

Expected:
External DLLs (such as WebView2-integration) loaded by host process should not affect COM-state.

Importance

Blocking. My app's basic functions are not working due to this issue.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

120.9.2210.61

SDK Version

1.0.2151.40

Framework

Win32

Operating System

Windows 10, Windows 11

OS Version

No response

Repro steps

  1. Register EXE-level objects via _Module.RegisterClassObjects(CLSCTX_LOCAL_SERVER, REGCLS_MULTIPLEUSE)
  2. Create, display and destroy dialog the host WebView2 using Win32/COM
  3. Try to use previously registered COM-objects via CoCreateInstanance

Result:

  • Externally creatable object will result in a new main process, which also fail due to login-dialog
  • Objects that are only available within the process will result in COM-level errors (Class not registered)

Repros in Edge Browser

No

Regression

Regression in newer Runtime

Last working version (if regression)

119.x

AB#48130619

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtrackedWe are tracking this work internally.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions