-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible memory leak with the ANTLR Preview pane. #553
Comments
The grammar i am working on that is causing these problems can be found here. |
Hi. Yup. just fixed it!! check this one out #546 can you try to install that build? Almost ready for release. https://github.com/antlr/intellij-plugin-v4/files/8691177/antlr-intellij-plugin-v4-1.19-SNAPSHOT.zip |
(uninstall antlr plugin then "install from disk" that zip) |
The first thing to check is whether or not your partner works for empty or trivial input even from the command line. I suspect there's an infinite Loop in your grammar. Make sure to check for any warning messages from antlr about empty rules |
The memory "leak" even occurs when there's no input to parse in the preview pane, that's the odd thing. |
so no warnings in antlr console? Try hitting the red square parse cancel button |
Those mem objs are all from parsing gone nuts...not a leak per se. |
Yeah, something is hosed with parsing of that grammar itself. Seems like a bug in plugin |
Something in the grammar is causing static grammar analysis in plugin to go nuts but NOT from command line. |
Wow. it takes ANTLR 6s on my fast box to process your parser .g4 file!!!! I have a trivial main() that exhibits...it's antlr issue not plugin :) Confirmed command line is same time. |
@KitsuneAlex I moved issue to antlr, leaving this open... antlr/antlr4#3711 |
I've been using this plugin to work on my language since it's validation and visualization features are very very nice.
Since my parser has reached a certain size (~1600 lines), using the preview pane has become quite literally impossible.
It takes forever to rebuild what i suspect to be a cached pre-built parser for the current grammar, since i also suspect said
rebuild being initiated on every key-input event in the editor.. Not sure tho.
I did a little test today and found out that while using the preview pane, my JVM heap is completely used up.
I increased the maximum heap size for the IDE to 16GB, which was also used up.
I repeated the increasing until i couldn't spare any more memory on my system, which happened to be the 56GB mark (i have 64GB installed currently).
After reaching 56GB, the IDE just crashed, and i have no hs_err* file, nor another form of crash report and i'm kind of lost here,
since i am not much into IDEA-related APIs (yet).
OS: PopOS 22.04 LTS (Kernel 5.17.5-76051705-generic)
JVM: JetBrains Runtime 11.0.14.1+1-b2043.45 (amd64)
IDE: IntelliJ IDEA Ultimate 2022.1.1 (Build 221.5591.52)
Plugin Version: 1.18
The text was updated successfully, but these errors were encountered: