-
Notifications
You must be signed in to change notification settings - Fork 31
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
Typing (cemerick.austin/repl-env) in Clojure REPL causes OutOfMemoryError #39
Comments
jvisualvm shows one thread doing this:
|
Looks like the |
Some additional debugging info for tracking down the possible ClojureScript problem
I see it looping forever trying to print info about an autogenerated symbol |
In case it's helpful: When I use |
256MB is the recommended heap size when doing ClojureScript compilation; that's likely overkill, but should resolve any OutOfMemoryErrors encountered when using Austin. Add |
When I switch to 2134, I can still run The OutOfMemory error happens when I try to eval With max heap size set to 256, I get OutOfMemoryError. When I set max heap size to 1024 I have to wait a bit longer, but I still see the OutOfMemoryError. I can consistently reproduce this by creating a project:
And then use the project.clj here (and also pasted an example of a repl session): I'm using a new mac book pro, with jdk1.6.0_65. I'm pretty new to clojurescript so I definitely might be overlooking something obvious, but seems to be an issue between newer clojurescript versions and austin, maybe? Please let me know if I can help by sending more info or testing with different versions. repl-env works great with v2030 and it's so much fun to do live coding and see it show up in the browser! Thanks again! Dave |
Try binding the REPL environment to a var to prevent it from printing, e.g. I'm using 2156 at the moment, which works well. Give that a shot. |
New it must be something simple. That worked, thanks! |
It seems fairly easy to accidentally print a repl-env? It has happened a few times for me and is something I tend to forget that I shouldn't do. I'm currently using this as a work-around: (defmethod print-method cemerick.austin.BrowserEnv
[b w]
(.write w (str "#<BrowserEnv " b ">"))) |
Example session: https://www.refheap.com/7d37150b0fbe017920682f9ee/raw
It took me some time to figure out that the problem was caused by the printing of the object, not due to some problem with the
repl-env
itself.Not sure if this deserves some kind of warning in the README or a fix to not try to print an infinite amount of text.
If this does not reproduce on your machine, try this on Ubuntu 13.10
The text was updated successfully, but these errors were encountered: