Skip to content

Crash in VSCode due to a regression in Electron 32.2.6 and window.setVibrancy #236772

Closed
@illixion

Description

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.97.0-insider (commit 89f8089)
  • OS Version: macOS 15.1.1 (24B91)

I'm a maintainer of a popular extension for VSCode that adds transparency effects to the main VSCode window. However, my extension started crashing VSCode on macOS when the user right-clicks in the VSCode window with it active. This issue began with VSCode v1.96.0 and currently occurs in the latest stable and Insider releases.

After researching, I discovered this is due to a regression introduced in Electron v32.2.6, which was patched in this PR and backported to v32.2.7, available as of 16 days ago. Below is the v32.2.7 patch notes excerpt highlighting this fix:

Fixed an possible crash when using draggable regions and BaseWindows to get the context-menu event. electron/electron#44954 (Also in 33, 34)

This issue affects users who rely on extensions or customizations that enable vibrancy effects on macOS, which is a popular feature for many developers. Without the fix in Electron v32.2.7, these users are forced to downgrade VSCode, which is not ideal.

Steps to Reproduce:

  1. Inject a custom JavaScript into the main Electron thread:
import electron from 'electron';

electron.app.on('browser-window-created', (_, window) => {
  window.webContents.on('dom-ready', () => {
    window.setVibrancy('fullscreen-ui');
  });
});
  1. When the VSCode window is created, right-clicking will not work and often cause the main process to crash with a segfault, along with a log like this: [1212/171542.178855:WARNING:in_range_cast.h(38)] value -634136515 out of range

This can also be reproduced by using the extension directly if preferred:

  1. Install my extension, version v1.1.41 (latest blocks installation due to this bug)
  2. Use Command Palette action "Enable Vibrancy"
  3. After restarting VSCode, right-clicking will stop working and often cause the main process to crash with a segfault

Request

Please consider updating the Electron version used in VSCode to v32.2.7, as it resolves this regression and improves stability for macOS users. This would allow extensions like mine, which rely on Electron's setVibrancy functionality, to work without causing crashes.

If further details or testing are needed, I’d be happy to assist.

Activity

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

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugelectronIssues and items related to Electronfreeze-slow-crash-leakVS Code crashing, performance, freeze and memory leak issuesinsiders-releasedPatch has been released in VS Code InsidersupstreamIssue identified as 'upstream' component related (exists outside of VS Code)upstream-issue-fixedThe underlying upstream issue has been fixed

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions