-
Notifications
You must be signed in to change notification settings - Fork 50
One-line 123 KB json crashes Atom every time when language-json enabled #89
Description
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: https://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: https://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
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
- 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)
- Open the file in Atom with language-json enabled
- Atom crashes every time (cannot interact with any file, and eventually the OS says Atom is frozen
- 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.