You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug 442049 - Eclipse 4.4 (JSDT) Attempting to copy from .js files in project, using ctrl+c or right-click menu, hangs/crashes JSDT in a big project #159
When I attempt to copy some of my source code using ctrl+c or the right-click menu "copy" command in any of the .js files in one of my Node.js projects, Nodeclipse hangs every time. It spins the CPU up to 100% and takes up all available memory.
Just unzip the file to a directory and import it into your workspace, then try to copy source code out of any of the .js files in the project. For instance, server.js in the root directory exhibits the problem on my PC.
Note that this issue does not exist in some of my other Node.js projects. The project I'm working on here is the standard "mean.io" boilerplate, so many people are likely to encounter the same problem if they try out Nodeclipse as mean.io is quite popular. I HAVE tried regenerating the project file for the project using "nodeclipse -prepare" (after deleting the old project files) and that generated a new project which I reimported, however the issue still exists.
Do you know what's going on here?
Nodeclipse version (From the about box):
Enide Studio 2014 based on preview of Eclipse 4.4 M4 Luna
C:\Enide\workspace\testmeanapp1>java -version
java version "1.8.0_11"
Java(TM) SE Runtime Environment (build 1.8.0_11-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode)
OS:
C:\Enide\workspace\testmeanapp1>systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
OS Name: Microsoft Windows 8
OS Version: 6.2.9200 N/A Build 9200
I remember a year ago I ran into similar or saw similar on Stackoverflow.
This is JSDT issue. When you edit .js file Eclipse standard javaScript Editor from WetTools is used.
To check used version check Help -> Installation Details
It should be similar to this (1.6.0):
As you are using older Eclipse stack, trying to update to the latest 4.4.0 (released in June) on installing on fresh Eclipse Luna is first step to check.
Update: I managed to download zip. It is 170MB compressed into 62MB
( What a huge size for a Node project! loooking further ...)
Most of them are under node_modules (150MB) in 60 folders, including things like forever that should be installed globally. Seems to be too much stuff.
Better to check if it is about mean.io but creating new project with mean.io only.
I did install Eclipse and Nodeclipse freshly after I encountered the bug. I also used a clean installation of Mean.IO, the bug still occurred.
Also, it shouldn't matter if I have alot of node_modules, Eclipse should be able to handle large projects. JetBrains WebStorm handles the same project just fine.
After you downloaded the zip and loaded the project, were you able to replicate the bug (did Eclipse hang when you tried copying from the source of a JavaScript file in the project)?
changed the title [-]Attempting to copy from .js files in project, using ctrl+c or right-click menu, hangs/crashes Nodeclipse[/-][+]Attempting to copy from .js files in project, using ctrl+c or right-click menu, hangs/crashes JSDT[/+]on Aug 25, 2014
changed the title [-]Attempting to copy from .js files in project, using ctrl+c or right-click menu, hangs/crashes JSDT[/-][+]Attempting to copy from .js files in project, using ctrl+c or right-click menu, hangs/crashes JSDT in a big project (posibly mean.io specific)[/+]on Aug 25, 2014
changed the title [-]Attempting to copy from .js files in project, using ctrl+c or right-click menu, hangs/crashes JSDT in a big project (posibly mean.io specific)[/-][+]Attempting to copy from .js files in project, using ctrl+c or right-click menu, hangs/crashes JSDT in a big project (possibly mean.io specific)[/+]on Aug 25, 2014
@andreialecu Thanks for sharing. Did you managed finally to get project working?
Did removing jsNature was enough ? (.jsdtscope matters only if the project has jsNature)
By the way I only removed jsNature from the project I was editing at the
time, not from the other, big one (deployd). I had 3 node projects in my
workspace at the time.
I had this workspace configuration for several days with no issues.
This started happening suddenly after a big refactor in one of the projects
where I broke up a 2000 line file into about 6 files.
I also tried cleaning the workspace cache with no effect.
Alright, as a test, I just readded the deployd project to the workspace and the problem started happening again immediately.
I then removed the jsNature line from the deployd project and that fixed it! I can copy and paste inside my other project, and I can keep deployd in my workspace.
The main problem I see is the lack of memory (and the many of OOM Exceptions in JSDT Parser). Increasing the available memory settings could help, but the chance is very small here... The parser/Compiler is most problematic field at the moment...
You can try to update JSDT to the latest WTP 3.6.2/3.7 (JSDT Core plug-in should be of v.1.3.200) if you didn't update this yet - there was a change in Compiler... But, i'm not sure it's a related issue.
And yes, the size of the project (and sideway projects that are live within the same workspace) matters.
hammer 100% solution is to remove JsNature for that one project
more subtle is to disable only some JSDT features Window>Preferences>JavaScript>Editor>Mark Occurrences
and maybe even Window->Preferences->General->Editors->Text Editors->Hyperlinking
recommended by JSDT maintainers (for further observation): (by @vrubezhny )
get latest JSDT version
increase available memory settings
use resource filters to hide more files in folders like build/dist/bower/vendor (by @ppartida )
And generally:
pay attention what step you have taken when working with any software.
Activity
paulvi commentedon Aug 12, 2014
Thank you for reporting.
I remember a year ago I ran into similar or saw similar on Stackoverflow.
This is JSDT issue. When you edit .js file Eclipse standard javaScript Editor from WetTools is used.
To check used version check Help -> Installation Details
It should be similar to this (1.6.0):
As you are using older Eclipse stack, trying to update to the latest 4.4.0 (released in June) on installing on fresh Eclipse Luna is first step to check.
Then if it is still their raise an issue on https://bugs.eclipse.org/bugs/ against JSDT
(and share link here)
I can't download zip, could you please email me at ***************
paulvi commentedon Aug 12, 2014
Also check in Project properties if JS sematic validation is turned off (JSHint should be used instead)
.project
.settings\org.eclipse.wst.jsdt.core.prefs
paulvi commentedon Aug 12, 2014
Update: I managed to download zip. It is 170MB compressed into 62MB
( What a huge size for a Node project! loooking further ...)
Most of them are under node_modules (150MB) in 60 folders, including things like forever that should be installed globally. Seems to be too much stuff.
Better to check if it is about mean.io but creating new project with mean.io only.
neatcode commentedon Aug 17, 2014
I did install Eclipse and Nodeclipse freshly after I encountered the bug. I also used a clean installation of Mean.IO, the bug still occurred.
Also, it shouldn't matter if I have alot of node_modules, Eclipse should be able to handle large projects. JetBrains WebStorm handles the same project just fine.
After you downloaded the zip and loaded the project, were you able to replicate the bug (did Eclipse hang when you tried copying from the source of a JavaScript file in the project)?
paulvi commentedon Aug 19, 2014
I just don't know what max size of source JSDT is capable of handling...
I got Eclipse 4.4 Luna freezing when just expanding
testmeanapp1under JavaScript Resourcethen after 10-20 seconds I got "GC overhead limit exceeded"
Eclipse is using 75% or 3 of 4 core of CPU
paulvi commentedon Aug 19, 2014
after Eclipse restart, it freezes again during initial build...
after closing the problematic project Eclipse is still using 75% or 3 of 4 core of CPU
paulvi commentedon Aug 19, 2014
I submitted bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=442049 "Bug 442049 - Eclipse 4.4 (JSDT 1.6.0) freezes when expending project node under JavaScript Resource and/or making copy/paste operations"
please vote for it and follow
paulvi commentedon Aug 20, 2014
Work-around is to remove
org.eclipse.wst.jsdt.core.jsNaturenature in.projectHint: on Windows you can use https://github.com/culmat/eExplorer to edit files inside closed Eclipse project
There is also Terminals that comes with Enide Studio
[-]Attempting to copy from .js files in project, using ctrl+c or right-click menu, hangs/crashes Nodeclipse[/-][+]Attempting to copy from .js files in project, using ctrl+c or right-click menu, hangs/crashes JSDT[/+][-]Attempting to copy from .js files in project, using ctrl+c or right-click menu, hangs/crashes JSDT[/-][+]Attempting to copy from .js files in project, using ctrl+c or right-click menu, hangs/crashes JSDT in a big project (posibly mean.io specific)[/+][-]Attempting to copy from .js files in project, using ctrl+c or right-click menu, hangs/crashes JSDT in a big project (posibly mean.io specific)[/-][+]Attempting to copy from .js files in project, using ctrl+c or right-click menu, hangs/crashes JSDT in a big project (possibly mean.io specific)[/+]18 remaining items
paulvi commentedon Dec 25, 2014
@andreialecu Thanks for sharing. Did you managed finally to get project working?
Did removing
jsNaturewas enough ? (.jsdtscopematters only if the project hasjsNature)If Yes, then this is JSDT issue, and should be reported to
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=JSDT
andreialecu commentedon Dec 25, 2014
Removing jsNature didn't help in my case. I also uninstalled the js hint
plugin to no effect.
Only thing that helped was to remove the other big project from my
workspace. I didn't need it, so it was an acceptable workaround.
There are other reports of this problem here:
http://stackoverflow.com/questions/20392791/eclipse-hangs-on-copy-cut-for-javascript-files
http://stackoverflow.com/questions/25040701/eclipse-hangs-on-javascript-files-when-i-try-copy-cut-and-ctrlspace
http://stackoverflow.com/questions/1294135/eclipse-hang-when-copying-pasting-code
https://bugs.eclipse.org/bugs/show_bug.cgi?id=317249
https://bugs.eclipse.org/bugs/show_bug.cgi?id=323283
I tried most of those solutions but none of them worked.
andreialecu commentedon Dec 25, 2014
By the way I only removed jsNature from the project I was editing at the
time, not from the other, big one (deployd). I had 3 node projects in my
workspace at the time.
I had this workspace configuration for several days with no issues.
This started happening suddenly after a big refactor in one of the projects
where I broke up a 2000 line file into about 6 files.
I also tried cleaning the workspace cache with no effect.
andreialecu commentedon Dec 25, 2014
Alright, as a test, I just readded the deployd project to the workspace and the problem started happening again immediately.
I then removed the jsNature line from the deployd project and that fixed it! I can copy and paste inside my other project, and I can keep deployd in my workspace.
Hope this helps
vrubezhny commentedon Dec 25, 2014
@andreialecu, could you attach /.metadata/.log file (or/and .log backup files if it's empty) somehow?
andreialecu commentedon Dec 25, 2014
@vrubezhny log file is here: https://www.dropbox.com/s/rgae95brqjfuz0t/log.txt?dl=0
vrubezhny commentedon Dec 25, 2014
@andreialecu, thanks for your logs!
The main problem I see is the lack of memory (and the many of OOM Exceptions in JSDT Parser). Increasing the available memory settings could help, but the chance is very small here... The parser/Compiler is most problematic field at the moment...
You can try to update JSDT to the latest WTP 3.6.2/3.7 (JSDT Core plug-in should be of v.1.3.200) if you didn't update this yet - there was a change in Compiler... But, i'm not sure it's a related issue.
And yes, the size of the project (and sideway projects that are live within the same workspace) matters.
Thanks.
porfiriopartida commentedon Dec 27, 2014
I don't know if this helps, found this thread looking for JS Copy freezing my Eclipse 4.3 for Mac.
I unchecked everything in the JS Validator + removed the JS Nature without any help, increased the heap to 4gb but still the same issue.
In my case, hiding from Eclipse all build/dist/bower/vendor folder/files worked.. (resource filters)
Cheers.
paulvi commentedon Dec 30, 2014
Current summary:
Window>Preferences>JavaScript>Editor>Mark Occurrencesand maybe even
Window->Preferences->General->Editors->Text Editors->HyperlinkingAnd generally:
Please add more solution not here but at
http://stackoverflow.com/questions/3515422/why-does-eclipse-hang-on-copy-paste-in-javascript-files
( the first issue raised Aug 18 '10)
paulvi commentedon Sep 22, 2015
@elvisvoer and all
I am going to disable JSDT by default because of this and ES6 support #194
disable JSDT #70 #159 #194
.gitignore for Eclipse or Nodeclipse "Enide Studio"
paulvi commentedon Jan 11, 2018
I guess this have been fixed in Eclipse long time ago.
Closing as old.