Problems with the sandbox
I'm working through the custom language tutorial and have just finished the part where I have to create a lexer and parser and then run them in the Sandbox. I'm having several issues, and I have no idea whether they are related so I'll combine them all into one post.
1. Scanning files to index seems to never stop. I'm running everything from a network drive, but that doesn't bother CLion or IntelliJ proper. So I don't think that's the problem.
2. It runs out of memory and tells me to increase XMX. The problem is, the option to do so is greyed out in the sandbox IDE. I can do it in the main IDEA menu, but that setting doesn't seem to carry over to the sandbox. It's alarming that it is doing so as I get the warning before I've finished typing a single line of code. I feel like the default value should be able to handle a single line of code.
3. When my file is open, the main IDE is spitting out all kind of error messages from the sandbox constantly. Mostly these:
Caused by: com.intellij.util.io.PersistentEnumeratorBase$CorruptedException: PersistentEnumerator storage corrupted .../system/caches/names.dat
Caused by: java.lang.IllegalStateException: Index corrupted
Caused by: com.intellij.util.io.PersistentEnumeratorBase$CorruptedException: PersistentEnumerator storage corrupted .../system/index/idindex/compositeHashId
This is very frustrating, as I'm anxious to see if my lexer works as I intend it to. If anyone has any ideas, that'd be great. I'm working on my own language, rather than SimpleLanguage, but at this point its so very basic that there isn't much difference.
Please sign in to leave a comment.
Please try removing the sandbox directory completely. It sounds like some indexes were broken, this will force rebuilding them.
If it doesn't help, please provide a link to your repository.
That didn't resolve the issue. The code is local only for now, until I at least get past the first steps. Is there some other way to share it with you, maybe a zip file? There's a flashing exclamation mark that provided me with some crash logs. It appears to be crashing in the plugin Java (which doesn't make sense to me) and in the plugin TextMate Bundles. I've copied the crash logs into text files and placed them here:
https://drive.google.com/file/d/1t8PKEe89HR03acqI-cnoqKeR8JXkWR7I/view?usp=sharing
There was a stacktrace and some extra files for the Java crash, and only a stracktrace for TextMate. Let me know if that helps any, and how to best get you the code. I can make a temporary repository if need be, I just can't do it right this moment because I'm working.
On a hunch, I moved the project from the network drive to a local drive. That fixed every problem except for the out of memory issue. The option to Change Memory Settings is stilled grayed out in the sandbox version. How can I increase it?
I tried downloading the SimpleLanguage project to see if that one works, but when I opened the project it downloaded Gradle even though I already have it. I have a 10gb a month bandwidth limit on my satellite internet, but I let it do it. Then it tried to download IDEA again. Not sure why it wanted to do that but I stopped it. Can't test that until my bandwidth limit is lifted between midnight and 5am.
I got it fixed. For some reason, emitting an EOF token in the JFlex file causes an infinite loop, which was causing the out of memory error. I had to remove that.
Glad you got it working. The redownload is probably due to using different Gradle/target IDE Platform versions than you were using in your plugin, so it's expected. In general, we recommend keeping all projects on local disk for performance reasons.