Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Certain JS files cause Tern (and therefore Brackets) to crash #3827

Closed
jrowny opened this issue May 14, 2013 · 8 comments
Closed

Certain JS files cause Tern (and therefore Brackets) to crash #3827

jrowny opened this issue May 14, 2013 · 8 comments

Comments

@jrowny
Copy link
Contributor

jrowny commented May 14, 2013

Setup a project with these 3 files: https://gist.github.com/jrowny/31af730a02b2d2dfddeb

You might need to restart brackets for this to go bonkers. The angular.js file appears to crash Tern/brackets. Both minified and unminified. This may be due to a webworker running out of memory according to @eztierney. Code hinting does not work and triggers the crash. It can take up to 30 seconds to a minute before the crash happens.

@jrowny
Copy link
Contributor Author

jrowny commented May 14, 2013

Also, a bug in Tern was created here: ternjs/tern#142 by @eztierney

@ghost ghost assigned eztierney May 14, 2013
@peterflynn
Copy link
Member

@jrowny is it a full crash at the native level? Like the OS force-quits the whole Brackets process?

@eztierney
Copy link
Contributor

I've reproduced, and the Brackets process doesn't die - it turns into a blank window, and becomes totally unresponsive, I can't even quit, so I have to kill the process from activity monitor.

@peterflynn
Copy link
Member

Yikes. Marking high priority and nominating for Sprint 25 -- at least until we have more info on how easily hit this is (lots of projects use Angular).

@eztierney
Copy link
Contributor

Marijn has posted a fix for tern - I will check it out and hopefully get this fixed today.

It might be worth looking into if there is anyway to get chrome to behave better, when running out of memory. Wouldn't be ideal, but if we could keep brackets up and running even without hinting it would be better than crashing.

@eztierney
Copy link
Contributor

Confirmed that this is fixed by marijns fix - memory usage is more reasonable again, and the hints come up in a reasonable amount of time, even with a minified angular.js file.

I also tested with the other frameworks in todomvc, and they all work now (agilityjs, angularjs, backbone, canjs, closure, dojo, emberjs, jquery, knockback, knockoutjs, maria, spine, YUI).

Will have a pull request shortly.

eztierney added a commit to eztierney/brackets that referenced this issue May 15, 2013
Updated to a version of tern that fixes the bug.
Take out the excludes of minified libraries, as they all work now that the bug is fixed.
Stil exclude require and jquery files since we have json defs files for those that have better type information.
Fixes Issue adobe#3827
@eztierney
Copy link
Contributor

fixed
d092dd2

@jodyzhang
Copy link
Contributor

verified, not saw crashes, so closed it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants