-
Notifications
You must be signed in to change notification settings - Fork 453
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
Beautification with Executables sometimes causes freeze/crash #1728
Comments
autopep8
sometimes causes crash
I have similar problem with javascript. If the code is more complexed, with a lot of functions, Atom freezes after pressing CTRL+ALT+B (Atom-beautify version 0.30.1). CPU is then 100%. I didn't have problems with 0.29.x version. The only solution is to kill Atom process. |
I do expect first load / beautification to take some time. I always find first load very slow -- a couple seconds -- and subsequent loads are fast, since the executable paths are cached. I have no experienced this before. What version of Atom are you each using? I'll try again later to reproduce, however our CI builds are passing:
This is what is being tested for Python + @Zajc : JavaScript is handled differently than Thanks! |
I have the same problem with Ruby, but I'm also unable to debug it, because the editor freezes... |
@Glavin001 I am using Atom (Linux distro) version 1.17.2. $ atom --version
Atom : 1.17.2
Electron: 1.3.15
Chrome : 52.0.2743.82
Node : 6.5.0 also (though I don't think it is relevant): $ uname -a
Linux ThinkPad-Edge-E540 4.4.0-79-generic #100-Ubuntu SMP Wed May 17 19:58:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux I have been able to successfully reproduce the error in the following way: opening the file from the command line. That is, if I do $ atom test.py and then beautify (either by the Packages drop down menu) or by executing |
Oooh, that's interesting! I think this would be equivalent to how I personally run Atom on my Mac (via Finder). I will try using |
I have the same problem with php-cs-fixer after today update. |
I've just checked to make sure what I reported holds true (on my machine at least) with Atom 1.18.0 (which just appeared in $ atom --version
Atom : 1.18.0
Electron: 1.3.15
Chrome : 52.0.2743.82
Node : 6.5.0 |
JavaScript. I cannot create
|
Ok thanks for trying @Zajc. @foutrelis did some investigation and discovered an issue with
This is interesting because the |
Great news! Looks like Atom already does the same thing Atom-Beautify does to load the environment variables correctly! See https://github.com/atom/atom/blob/7b1aadc9b361c4e6257f88d94fe9bf531341a407/src/update-process-env.js#L79 This means I can simply remove the code from Atom-Beautify and expect the |
Oh and looks like Atom itself had the same issue! atom/atom#13084 |
Having problems with tests: https://discuss.atom.io/t/specs-do-not-load-shell-environment-variables-activationhooks-core-loaded-shell-environment/44199 |
Same issue here, 100% disk usage in my machine and atom freezes. The interesting is that when running within my Vagrant box there is no problem at all! |
I have not heard of a great fix yet. I am going to patch the specs using the old method Atom-Beautify was using -- which works for me, Travis CI, and AppVeyor 👍 -- and remove it for the package itself such that you guys should no longer have issues! Working on this now. Wish me luck! 😄 |
@Glavin001 Many thanks for quickly going after this! |
Get ready for testing! Just waiting for CI builds to finish: #1735 |
Fixes #1728. Remove Shell-Env from Executable, use Atom's process.env instead
Published to v0.30.3 |
Please test and let me know if it works or does not work. Thanks! |
After the upgrade to v0.30.3 I'm experiencing the same (CPU 100%, freeze) behaviour when trying to beautify the JavaScript code. Edit: If JavaScript code is not complex it can be beautified. When it has (a lot of) functions the Editor freezes when CTRL+ALT+B is pressed. |
@Glavin001 Everything is working as expected now with $ atom --version
Atom : 1.18.0
Electron: 1.3.15
Chrome : 52.0.2743.82
Node : 6.5.0 Many thanks! I've tested with your |
Description
In
atom-beautify
v0.30.1 beautification withautopep8
will regularly (but not always 😕) cause Atom to lockup (only for Beautification withautopep8
, Beautification withuncrustify
is fine for C++ files) and need me to manually kill it from the command line.Steps to Reproduce
Atom Beautify: Beautify Editor
so that beautification withautopep8
occursDebug
The freeze happens when running in debug mode too, so no error logs output can be generated.
Checklist
I have:
so I know this is not a duplicate issue
Atom Beautify: Help Debug Editor
command in Atom and added link fordebug.md
Gist to this issueThe text was updated successfully, but these errors were encountered: