Skip to content

Crash every time at startup with 'Code 5' #184298

Open

Description

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

  • VS Code Version: 1.78.2
  • OS Version: macOS Ventura 13.4 (Apple M1 Pro)

Steps to Reproduce:

  1. Startup VSCode in any way.
  2. There are two windows opening, a second window is always opened with the text The editor could not be opened because the file was not found.
  3. A few seconds later the window crashes with: The window terminated unexpectedly (reason: 'crashed', code: '5')
  4. On the second window you can still continue working.

Something along the same lines was also reported in this and users reported that they saw the same issue after the OP reported not seeing the problem anymore.

Copy of closed:
#180916

Attached find the crash report
vscode-crash.zip

Activity

  1. martijnburger commented on Jul 17, 2023

    @martijnburger
    Author

    Up!

  2. Marshall-L-D commented on Aug 2, 2023

    @Marshall-L-D

    This is happening to me on Mac Ventura 13.4.1 with VS Code:
    Version: 1.80.2
    Commit: 2ccd690
    Date: 2023-07-27T21:05:41.366Z
    Electron: 22.3.14
    ElectronBuildId: 22695494
    Chromium: 108.0.5359.215
    Node.js: 16.17.1
    V8: 10.8.168.25-electron.0
    OS: Darwin x64 22.5.0

    I attempted to open a large file several days ago. That caused a crash. I closed VS Code and now each time I open VS Code I get the crash with reason code 5. It keeps attempting to load the large file on open. I have the setting "Restore Windows" set to none and always have. The large file no longer exists on my system and still it seems to be attempting to load it on every restart.

  3. martijnburger commented on Aug 8, 2023

    @martijnburger
    Author

    Great addition Marshall D (@Marshall-L-D) . This is exactly how the issue started on my side too. Let's hope for a quick response from Microsoft.

  4. Marshall-L-D commented on Aug 15, 2023

    @Marshall-L-D

    Got tired of waiting on a fix and since every day my VSCODE startup would attempt to load this old 1.46GB file and crash. I started looking around. Finally found where VSCODE stores its temporary data on Mac, ~/Library/Application Support/Code/.

    There was a directory "Backups" containing a numbered directory with a 1.46GB file. I deleted that subdirectory and contents under ~/Library/Application Support/code/Backups/. Now my VSCODE comes up cleanly, no crash.

    I hope this helps others who run into this issue.

  5. deepak1556 commented on Aug 16, 2023

    @deepak1556
    Collaborator

    the workbench process crash due to out of memory when performing TextDecoder.decode(), Peng Lyu (@rebornix) I am not sure how textdecoding kicks in when opening a file, are we processing the entire file into memory for decoding which might explain the memory cap ?

    Martijn Burger (@martijnburger) can you provide a minimal repro to help us debug this issue further, thanks!

  6. added
    info-needed
    on Aug 16, 2023
  7. martijnburger commented on Aug 21, 2023

    @martijnburger
    Author
    1. Open a file that is too large for VS Code with that memory allocation.
    2. Let VS Code open with more memory allocation.
    3. Let it crash because it is still to large.
    4. Do this on a Apple Silicon Mac.
    5. It will crash everytime at startup looking for this file.
  8. martijnburger commented on Sep 12, 2023

    @martijnburger
    Author

    Robo (@deepak1556) What is going to happen now?

  9. deepak1556 commented on Sep 12, 2023

    @deepak1556
    Collaborator

    The issue should be fixed once #167719 gets addressed. We cannot increase the memory cap for the process due to a limitation from the runtime, so a workaround until then would be to use our remote tunnels feature https://code.visualstudio.com/docs/remote/tunnels for viewing the affected files.

  10. added
    bug
    freeze-slow-crash-leak
    file-io
    and removed
    info-needed
    on Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugfile-iofreeze-slow-crash-leak

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions