Atom freezes then crashes when trying to highlight syntax


I’ve got a JavaScript I’m trying to edit that’s about 30,000 lines long. And when I open it, atom will start applying syntax highlights and after a couple seconds atom locks up and crashes. If when I open it I quickly change the language type to plain text and it doesn’t try to colour everything atom still runs fine though. I’ve tried changing the UI/Syntax themes and disabling all my downloaded packages but it still happens.


Can you share the file (or have another one) that reproduces the issue?



Thanks very much! I’ll hand this to the team and see if they can track down what might be causing the problem. We’re planning on improving the grammar parsing in the long run but the key people who will be tasked with that project are currently out on :baby: leave :grinning: Every reproduction though helps us narrow things down. Thanks again!


So I tried to open the script again today and atom froze but I left it for about 45 minutes and eventually it did unfreeze with all the syntax highlighted


I just tried your file using my grammar language-babel and it opens OK. The default javascript grammar seems to stall. You can try my grammar it might unblock you.


Thank you! It works great. It froze for a second when I opened the file and I was worried but then it loaded fine