Zelaux / HjsonSupportPlugin

Plugin for Intellij idea to support hjson
3 stars 1 forks source link

IDE becomes unresponsive and runs out of memory #1

Open paulikaila-wl opened 11 months ago

paulikaila-wl commented 11 months ago

First of all, thank you for the plugin. It makes it quite a bit nicer to modify HJSON -files in the IDE (GoLand).

However I have to keep the plugin disabled most of the time when doing bigger edits in my HJSON files as the plugin makes the IDE unresponsive and run out of memory if there are syntax errors in the files. This seems to be the case especially when I've been copying JSON content into an existing HJSON file to be able to massage the JSON into HJSON format.

I tried to create a minimal reproduction of the issue, which is why the example looks contrived. But with these steps, I'm able to consistently reproduce the issue.

To quickly make the IDE unresponsive (you won't even see the contents you paste into the file):

  1. Create a new HJSON -file
  2. Paste the following lines into the file:
    {
    "{
    }"
    }

To progressively make the IDE unresponsive:

  1. Create a new HJSON -file
  2. Add the following lines:
    {
    {
    }
    }
  3. Surround the internal curly braces with quotes:
    {
    "{
    }"
    }
manosbatsis commented 10 months ago

Same, also happens when mixing curly braces and /* */ comments.