Skip to content

Renderer crashes with CHECK in DidCreateScriptContext after same-process window.open (regression in 42.10.0) #53521

Closed

Description

@riurisniti

Preflight Checklist

Electron Version

42.11.2 (also reproduced on 42.10.0, 42.10.1, 42.11.0, 42.11.1)

What operating system(s) are you using?

Windows

Operating System Version

Windows 11 Pro, build 26200

What arch are you using?

x64

Last Known Working Electron version

42.9.3

Does the issue also appear in Chromium / Google Chrome?

No

Expected Behavior

Opening a same-process child window with window.open('') from a renderer (contextIsolation: false, sandbox: false) should not crash the renderer.

Actual Behavior

After the app calls window.open('', anyName) (same-process child window; the returned handle can even be discarded), the renderer process crashes silently — exit code 0x80000003 (STATUS_BREAKPOINT), no JS error, no FATAL log line:

  • if the child window is hidden (show: false / 1px off-screen), the renderer dies ~0.5s after the open, with no further app activity;
  • if the child window is visible, the renderer stays alive until the next user interaction (click / SPA route change) in the opener, then dies.

All same-process windows die together and the app enters a crash-reload loop. 100% reproducible in our production app (8x8 Work — large React SPA); we have not managed to reproduce it in a standalone fiddle despite extensive attempts (details below), which points at a renderer-state-dependent race.

The crash is CHECK(!environments_.contains(render_frame)) in ElectronRendererClient::DidCreateScriptContext (electron_renderer_client.cc:138), reached via lazy blink::LocalWindowProxy::Initialize — full symbolicated stacks below. Bisected to 42.10.0; introduced by #53042.

Testcase Gist URL

https://gist.github.com/riurisniti/a881f20a9cfca62d3e3738d9f13f5c71

Additional Information

Appologies for the AI generated info dump - not everyday I encouter such esoteric Electron errors so I had to make do.

Note: the gist is a faithful environment, not a crashing one - it replays the exact arming step and both detonation choreographies that crash our app 100% of the time, but survives standalone; see the investigation below for why.

AI Agent result

The regression bisects cleanly to 42.10.0 and is still present in 42.11.2. 42.9.3 is the last good version. Since #53042 was also backported to 43.x/44.x (#53040), we expect those lines to be affected as well — this currently blocks us from upgrading past 42.9.x on any line.

Renderer configuration: contextIsolation: false, sandbox: false, nodeIntegration: false, preload on the opener window, webSecurity: false.

Happy to share minidumps privately and to run instrumented builds / patches against our app, which reproduces this within seconds on every launch.

In-depth investigation

Symbolicated crash stack

Identical stack shape (same stack-offset layout) in minidumps from 42.11.1 (electron.exe.pdb debug id 7097E67EA20201714C4C44205044422E1, crash at electron.exe+0x38bcf67) and 42.11.2 (debug id 37048362CA69C9374C4C44205044422E1, crash at electron.exe+0x38d6d67), symbolicated against symbols.electronjs.org:

v8::Object::Get -> v8::internal::Runtime::GetObjectProperty     (a property read)
-> blink::LocalWindowProxy::Initialize()                        (lazy context init)
-> v8::Isolate::InstallConditionalFeatures
-> content::RenderFrameImpl::DidInstallConditionalFeatures
-> electron::ElectronRenderFrameObserver::DidInstallConditionalFeatures (+0xB2 into fn)
-> ElectronRendererClient::DidCreateScriptContext
-> CHECK(!environments_.contains(render_frame))                 (line 138)

I.e. a lazily initialized script context (created on first property access through a window proxy, not by a navigation — our frame-lifecycle tracing shows zero navigations/frame creations in the ~1.4s before death) hits a RenderFrame that already has an entry in environments_.

Suspected mechanism

#53042 added the per-RenderFrame environments_ map. WillReleaseScriptContext erases an entry only when env->context() == context. window.open('') gives the child frame an initial-empty-document context (env registered), then commits the real about:blank document in the same RenderFrame. If the first context's release doesn't match the erase condition (or hasn't happened) by the time the committed document's context is lazily created on first proxy access, the CHECK fires. The visibility dependence (hidden child → dies in ~0.5s; visible child → dies on next opener interaction) suggests the fatal lazy init is driven by occlusion/backgrounding work in the hidden case and by interaction-driven work in the visible case.

Reduction results (in our app, each verified by A/B launches)

  • Trigger is fully generic: one bare window.open('', name) suffices. Reproduced with our production window name/features, with a featureless 8-char name, and with a plain non-portal name. Return value discarded.
  • Child preload irrelevant: crashes both when the child inherits the opener preload and when it is stripped (webPreferences: { preload: '' } override — child provably has no preload; browser logs "preload script must have absolute path" and drops it).
  • DevTools ruled out: crashes with devtools fully disabled (no DevTools webContents exist).
  • Our overlay/portal management (hide/setBounds IPC), a meetings iframe subsystem, and everything else app-specific were individually disabled — the crash persists through all of them.
  • The crash also reproduces when the window.open is delayed 20s until the app is fully settled/idle — it is armed by the child window's existence, not by a boot-time race.
  • The 0xC0000005 (illegal access) crashes sometimes seen ~0.3s into the post-crash reload appear to be a secondary cascade — possibly the class of bug fix: illegal access errors when a same-process child window or subframe closes #53042 aimed to fix.

Standalone reproduction attempts (all survived)

15+ fiddle/harness scenarios reconstructing the app's conditions: exact webPreferences (contextIsolation:false, sandbox:false, webSecurity:false, preload), file:// and http origins, our full chromium switch set, same-name double-opens and open/close churn, continuous and single-shot delayed property polling of live and stale window handles, iframe srcdoc/data navigation churn, child hide/show/1px choreography with synthetic input events, visible+focused opener, our real ~500KB preload bundle, and app-scale heap replication (~650MB live objects, 8GB --max-old-space-size, GC pressure). None crash. Whatever completes the race appears to be a structural property of a large real-world renderer's heap/object graph.

Environment notes

Activity

  1. added theissue type on Sep 4, 2026
  2. added
    has-repro-gist
    on Sep 4, 2026
  3. MarshallOfSound commented on Sep 4, 2026

    @MarshallOfSound
    Member

    Hey @riurisniti Looks like this case did actually crash before aswell (just later in the chain, navigating the child window caused a crash, it now crashes earlier). Should be fixed today. Ty for the report

  4. riurisniti commented on Sep 7, 2026

    @riurisniti
    Author

    Thanks @MarshallOfSound for the prompt fix! I'll test it out as soon as a new patch is released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

42-x-ybug 🪲has-repro-gistplatform/windows

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions