Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

One-line 123 KB json crashes Atom every time when language-json enabled #89

@Torniojaws

Description

@Torniojaws

Prerequisites

Description

When you open a JSON file (123 KB filesize) that has no line breaks, language-json crashes Atom 100 % of the time. If you disable language-json, the file opens without issues.

Steps to Reproduce

  1. Create a JSON that is at least 123 KB and has no linebreaks (the file I have also has unicode characters, in case it matters)
  2. Open the file in Atom with language-json enabled
  3. Atom crashes every time (cannot interact with any file, and eventually the OS says Atom is frozen
  4. Also happens when Atom is started in safe mode

If you disable language-json and open the same file, there are no issues, even with a 1 MB json.

Expected behavior:

Should not crash the editor

Actual behavior:

Crashes the editor

Reproduces how often:

100 %

Versions

Atom 1.58.0
Electron 9.4.4
Chrome 83..0.4103.122
Node 12.14.1

apm 2.6.2
npm 6.14.13
node 12.14.1 x64
atom 1.58.0
python 2.7.18
git 2.3.0.1

MacOS 12.0 Monterey

Additional Information

When it crashes, there is a yellow message that appears:

Linter: Large/Minified file detected

Adding inline linter markers are skipped for this file for performance reasons (linter pane is still active)

There are two buttons: "Force enable" and "Change threshold", but they cannot be pressed. The editor has already crashed at this point and does not recover without force-closing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions