emmetio / sublime-tern

TernJS plugin for Sublime Text
222 stars 13 forks source link

Sublime tern hangs the editor. #36

Open aeisenberg opened 10 years ago

aeisenberg commented 10 years ago

Startup seems to work as expected. There is a short delay as the project is being indexed by tern and then sublime behaves as normal until I start typing in a JS file. After pressing any character key (ie- [A-Za-z$_] inside of a place where an identifier is expected, tern seems to kick in and I get a spinning beach ball of death. I need to force quite sublime text.

I can provide more information if you need. On startup, I have the following in my log:

`` startup, version: 3059 osx x64 channel: stable executable: /Applications/Sublime Text.app/Contents/MacOS/Sublime Text working dir: / packages path: /Users/andrew.eisenberg/Library/Application Support/Sublime Text 3/Packages state path: /Users/andrew.eisenberg/Library/Application Support/Sublime Text 3/Local hardware concurrency: 8 zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages zip path: /Users/andrew.eisenberg/Library/Application Support/Sublime Text 3/Installed Packages found 8 files for base name Default.sublime-keymap found 1 files for base name Default.sublime-mousemap found 6 files for base name Main.sublime-menu loading bindings loading pointer bindings found 1 files for base name Default.sublime-theme theme loaded app ready startup cache, total files: 171 cache hits: 171 pre session restore time: 0.19474 using gpu buffer for window using gamma: 2 (err: 6.9282) first paint time: 0.270349 startup time: 0.294589 launching: /Applications/Sublime Text.app/Contents/MacOS/plugin_host reloading plugin Default.block reloading plugin Default.comment reloading plugin Default.copy_path reloading plugin Default.delete_word reloading plugin Default.detect_indentation reloading plugin Default.duplicate_line reloading plugin Default.echo reloading plugin Default.exec reloading plugin Default.fold reloading plugin Default.font reloading plugin Default.goto_line reloading plugin Default.history_list reloading plugin Default.indentation reloading plugin Default.kill_ring reloading plugin Default.mark reloading plugin Default.new_templates reloading plugin Default.open_file_settings reloading plugin Default.open_in_browser reloading plugin Default.pane reloading plugin Default.paragraph reloading plugin Default.paste_from_history reloading plugin Default.save_on_focus_lost reloading plugin Default.scroll reloading plugin Default.set_unsaved_view_name reloading plugin Default.side_bar reloading plugin Default.sort reloading plugin Default.swap_line reloading plugin Default.switch_file reloading plugin Default.symbol reloading plugin Default.transform reloading plugin Default.transpose reloading plugin Default.trim_trailing_white_space reloading plugin CSS.css_completions reloading plugin Diff.diff reloading plugin HTML.encode_html_entities reloading plugin HTML.html_completions reloading plugin Emmet.emmet-plugin reloading plugin JsFormat.js_formatter reloading plugin Package Control.Package Control reloading plugin TernJS.tern reloading plugin JSHint Gutter.JSHint plugins loaded TernJS: No need to update PyV8 Syncing project/xxx/foobar..sublime-project Starting TernJS server for /xxx/foobar.sublime-project with 1 libs and 3064 files Syncing project empty Starting TernJS server for empty with 1 libs and 0 files loaded 2010 snippets Emmet: No need to update PyV8 Package Control: Skipping automatic upgrade, last run at 2013-12-27 10:04:12, next run at 2013-12-27 11:04:12 or after

altano commented 10 years ago

I'm seeing the same symptom. I hit ctrl+space in the .js file and the tern plugin immediately hung ST, which is now chewing 100% of a CPU core (and has been for >10min).

I can see in Process Explorer that it is a thread with the _PyV8.pyd module on the stack that is chewing up CPU. The fact that the only plugin I'm using that is using PyV8 that I'm aware of is this TernJS plugin, combined with the fact that I just installed this plugin, makes me think that is what's going on.

I'm using Sublime Text 2.0.2 on Windows.

Let me know what more info I can provide. In the mean time, I think I'm going to uninstall the plugin.

mthenw commented 10 years ago

same here :(

rashidul0405 commented 10 years ago

same issue in my case as well.

Env: OSX Mavericks ST3

I installed using package manager as well as tried git clone into sublime packages folder.

peterfoeng commented 10 years ago

Experiencing the same issue here in the installed file keeps coming back even though I have deleted it...any clue?

sbking commented 10 years ago

Same issue in OSX Mavericks and ST3.

f1nnix commented 10 years ago

Same issue in OSX Mavericks and ST2. Fresh install, via Sublime Package Control.

mayank-finoit commented 10 years ago

same issue in OSX Lion ST3

pebcakerror commented 10 years ago

ditto with Win 8.1 and ST2

david0178418 commented 10 years ago

Same here: ST3 on Arch Linux. Kernel: 3.16.1-1-ARCH

It only seems to affect saved projects. I copied the folder contents of my project to another director, opened it, and it worked fine. Then, I deleted all but one js file from the project and even deleted the contents of that js file. It hung while trying to open that.

johnpc commented 9 years ago

Same issue, OSX 10.9.4 and ST2, installed via Sublime Package Control

zz85 commented 9 years ago

I cleared out all my package control files to prevent plugin_host from crashing. not sure if there's a better way.

jtremback commented 9 years ago

Same. @david0178418 what are the exact steps that you used to fix the problem?

david0178418 commented 9 years ago

@jtremback I actually wasn't able to resolve it. After I narrowed it down to the reproduction steps I noted above, I disabled the plugin. I'll try reactivating it and see if anything has changed on my end.

jtremback commented 9 years ago

There are several identical issues around this on this repo, and it appears to be abandoned.

I recommend https://github.com/marijnh/tern_for_sublime which is written by the author of Tern, runs using node.js, and actually works.

@sergeche I respect the hard work that must have gone into this, but can you please remove this package from the Sublime package manager if you are not going to maintain it?