Skip to content

Using contentView.addChildView with a closed WebContentsView results in EXCEPTION_ACCESS_VIOLATION crash #47074

Closed
@nikitakot

Description

@nikitakot

Preflight Checklist

Electron Version

36.2.0

What operating system(s) are you using?

Windows

Operating System Version

Windows 11 Pro Version 24H2

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

Electron does not crash but error is thrown.
For typescript types - WebContentsView.webContents property should be optional. When webContents is destroyed the webContents becomes undefined, however WebContentsView does not reflect that.

Actual Behavior

Electron crashes with the following stack:

Received fatal exception EXCEPTION_ACCESS_VIOLATION
cppgc::internal::PersistentRegion::IsCreationThread [0x009F7DDB+174651]
cppgc::internal::PersistentRegion::IsCreationThread [0x009FBE61+191169]
cppgc::internal::PersistentRegion::IsCreationThread [0x009FBB79+190425]
cppgc::internal::PersistentRegion::IsCreationThread [0x009FB977+189911]
cppgc::internal::PersistentRegion::IsCreationThread [0x009FB89E+189694]
v8::internal::compiler::CompilationDependencies::FieldTypeDependencyOffTheRecord [0x03E802F6+1996774]
v8::internal::compiler::CompilationDependencies::FieldTypeDependencyOffTheRecord [0x03E7EE6A+1991514]
v8::internal::compiler::CompilationDependencies::FieldTypeDependencyOffTheRecord [0x03E7EE6A+1991514]
v8::internal::compiler::CompilationDependencies::FieldTypeDependencyOffTheRecord [0x03E7EE6A+1991514]
v8::internal::compiler::CompilationDependencies::FieldTypeDependencyOffTheRecord [0x03E7D1B9+1984169]
v8::internal::compiler::CompilationDependencies::FieldTypeDependencyOffTheRecord [0x03E7CFE1+1983697]
v8::internal::ThreadIsolation::StartOfJitAllocationAt [0x039D939C+77052]
v8::Function::Call [0x0399EC5D+397]
v8::Function::Call [0x0153DEDE+46]
node::SetCppgcReference [0x00BDFFF6+57622]
uv_timer_get_due_in [0x027C5306+246]
uv_run [0x027C22CE+1054]
node::loader::ModuleWrap::SelfSize [0x00AD5849+11209]
v8::internal::compiler::CompilationDependencies::FieldTypeDependencyOffTheRecord [0x0405B093+3941763]
Cr_z_crc32 [0x0416CFB9+859145]
v8::internal::compiler::CompilationDependencies::FieldTypeDependencyOffTheRecord [0x0404E98F+3890815]
uv_os_getpid [0x022717A2+4818]
GetHandleVerifier [0x02800380+76384]
uv_os_getpid [0x0229A69D+172493]
llhttp_get_errno [0x01962459+82681]
llhttp_get_errno [0x01963CAE+88910]
llhttp_get_errno [0x0195FD7D+72733]
v8_inspector::V8DebuggerId::V8DebuggerId [0x00E76AF9+435705]
v8_inspector::V8DebuggerId::V8DebuggerId [0x00E77B55+439893]
v8_inspector::V8DebuggerId::V8DebuggerId [0x00E77A2D+439597]
v8_inspector::V8DebuggerId::V8DebuggerId [0x00E7646F+434031]
v8_inspector::V8DebuggerId::V8DebuggerId [0x00E765E1+434401]
v8::SourceLocation::SourceLocation [0x009724B5+57589]
v8::SourceLocation::SourceLocation [0x009721C1+56833]
DeleteAce [0x758E0DE7+151]
DeleteAce [0x758E0D96+70]
RtlUserFiberStart [0x771393B7+23]

Electron exited with code 3221225477.

Testcase Gist URL

https://gist.github.com/nikitakot/96ac070f7d7f835a2fa1f1249b878c9c

Additional Information

No response

Metadata

Metadata

Assignees

Type

Projects

Status

🛑 Blocks Stable

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions