NetBeans background scanning projects takes too long
Asked Answered
M

16

37

NetBeans background scanning projects takes too long. Every time when I open netbeans it scanning for ages. I used NetBeans 7.2 and it works perfecly. Now I formatted pc and reinstalled windows, install the same version of NetBeans 7.2, and it works to slow.

Mandy answered 2/3, 2015 at 13:41 Comment(2)
During RnD your projects becomes messy sometimes. You try things. Before taking drastic actions like uninstall and reinstall, try to recollect: You didn't delete a directory with stuff you used for temp- write or read reasons in your project with Explorer or by terminal command? And you forgot you added that path also to the list of directories in project-properties. Check this first.Nyctophobia
I've just installed Netbeans 12.5 in 2021 and I have exactly the same problem.Bethesde
O
10

Having the same issue with 8.0.2 when a project has JS resources I tracked it down in my case to a problem with the javascript2 editor module which has been updated over the original version shipping with netbeans 8.0.2.

I simply solved it by removing the updated module.

On Linux:

rm ~/.netbeans/8.0.2/modules/org-netbeans-modules-javascript2-editor.jar

However, after letting the netbeans updater download the module a second time, the problem didn't appear again.

In Netbeans 8.1, the location of this file is at: ide/modules/org-netbeans-modules-javascript2-editor.jar.

Osteen answered 7/3, 2015 at 18:56 Comment(4)
Same problem here since yesterday, but on Windows. Removing that jar helped in the sense that it didnt get stuck. I then traced the problem to a JS-file in my php project that had a multiline comment-block. Removing that solved the problem as wel for me. Strangely, when I create JS-file with multiline comment in Netbeans, this doesn't happen, when I add the multiline comment outside Netbeans, it happens. I will try and create a proper bug report for this.Futtock
For me that module was in ~/netbeans-8.0/ide/modules and it works, after upgrade reinstalls it! How did you know?Urinate
I just looked at the thread stack of netbeans to see whats going on and found the class which may cause the problemOsteen
I have NetBeans 8.0.2 and I do NOT have a JavaScript module in ./modules/ at all. Still, my startup background scanning took over 40 minutes. It was apparently due to ~14,000 file changes/adds/deletes in a project that I mount over SSHFS. info at freephile.org/wiki/NetBeansIncomprehension
B
10

I have the same problem in netbeans but i found solution by unselect the check from auto scan background in your netbeans IDE go to tools and then Option and select then to miscellaneous and select file tab inside miscellaneous and you will find check as "enable of auto-scanning of the source unselect that one and netbeans will be fast then i hope it will help you in fasting your IDE too

enter image description here

Bicapsular answered 27/5, 2016 at 12:25 Comment(2)
Good move, but unfortunately not enough. I would add the "unnecessary" directories to the "Ignored Folders" list in the project's "Properties". Netbeans states the following "Note: Code analysis ignores Ignored Folders automatically." I hope this help!Crushing
have diisabled ignore.dotted.file as well . Now it is on the same pane of tab in new apache netbeansChamaeleon
E
6

After latest update of Netbean 8.0.2 I have the same problem that scaning process did not stop and go forever with CPU usage on 25%.

When I replace javascrip editor files in C:\Program Files\NetBeans 8.0.2\ide\modules on Windows 7 with old one then scaning project process start work again. You can take those file from this repo.

Ephrayim answered 10/3, 2015 at 12:9 Comment(6)
Problem seems solved with this issue, but now netbeans ask me to upgrade the Javascript2 Editor from version 0.44.3 to 0.44.4. I think that 0.44.4 is the buggy version, so we need to wait 0.44.5 or later, right?Ramify
You can try to update and see what hapened =) My netbean do not asked for any updatesEphrayim
Just tryed, it becomes unresponsive again! We need to wait the guys @NetBeans to solve it!Ramify
Now I check for latest update in my netbeans and take it. Have no problem with project scaning.Ephrayim
Wich JavascriptEditor version?Ramify
version: 0.44.4 (buggy version was 0.44.3 for me)Ephrayim
H
3

i'm facing the same issue, but it works fine after increase the heap size by adding -J-Xmx2048m in <NETBEANS_DIR>\etc\netbeans.conf

mine looks like this:

 netbeans_default_options="-J-client -J-Xss2m -J-Xms2048m -J-Xmx2048m -J-XX:PermSize=32m ......
Homoiousian answered 7/8, 2015 at 3:6 Comment(1)
That was curious. I've set my heap to 1200m and initially it didn't helpt at all. But after like 10 minutes it suddenly worked. Btw I've tried out uran1980's method, so I have his jars.Chrysarobin
K
3

Try the following :
1) Go to Window-->Files. This opens the Files Tab.
2) In the Files Tab for each opened project open the nbproject folder and inside it open the project.properties file.
3) Now in this file below the property "excludes" there are file references listed for all your referred Libraries (JARs)
4) There might be some repeated file references with paths that may be old or on someone else's machine(if you are working in a group and transferred projects from someone's machine)
5) Delete those old path references.
Example -
excludes=
file.reference.xyz.jar=../not/correct/path.jar //delete this line
file.reference.xyz.jar-1=../correct/path.jar //remove -1
....
includes=**

6)Also locate the property "javac.classpath" and delete the unnecessary classpath entries corresponding to the deleted references as described above.
Example -
javac.classpath=\
${file.reference.xyz.jar}:\ //keep this line
${file.reference.xyz.jar-1}:\ //delete this line
....
javac.compilerargs=

7) So now the file reference mentioned in the file reference section and the javac.classpath property is same and points to a valid Library (JAR) address on your machine or network.
Example -
excludes=
file.reference.xyz.jar=../correct/path.jar //the correct reference & path
....
includes=**
....
javac.classpath=\
${file.reference.xyz.jar}:\ //the correct classpath entry for reference
....
javac.compilerargs=
....

The reason the above procedure worked (in my case) is because it prevents Netbeans from scanning unnecessary Library paths that may not be present on your machine/network.

Kinghorn answered 2/4, 2016 at 7:31 Comment(2)
Strategy that I used: "Tools"->"Options" excluded files that I suspected were the issue using the "Ignored Files Pattern" regex. Scanning completed. Then removed the exclusions from the regex one by one, files scanned normally. Also unclick "Enable auto-scanning". But my project is yuge, 270K+ lines.Prohibitory
Voted down because you can't get to the file menu because NetBeans is hanging... seriouslyBattement
P
3

On Windows 10 64bit I had the same problem with Netbeans IDE 8.1 I restarted Netbeans as administrator and the problem was solved. Then I closed Netbeans and started normally and the problem was still gone.

Product Version: NetBeans IDE 8.1 (Build 201510222201)
Updates: NetBeans IDE is updated to version NetBeans 8.1 Patch 1
Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27
System: Windows 10 version 10.0 running on amd64; Cp1252; nl_NL (nb)
Piping answered 9/3, 2017 at 7:30 Comment(1)
Somehow this solution increased the performance on Netbeans 8.2 win 10.Facula
A
2

OS: Windows 7 x64.

The following worked for me:

I fully uninstalled Netbeans (ticked all boxes in uninstaller). For those who couldn't you'll need to go to C:\Users\%username%\AppData\Roaming\NetBeans\8.0.2 and delete a file called 'lock'. This is normally removed when the program exits but if you need to force terminate it'll remain there.

After that I uninstalled JDK and JRE then downloaded Java Platform (JDK) 8u40: http://www.oracle.com/technetwork/java/javase/downloads/index.html

And Netbeans 8.0.2: https://netbeans.org/downloads/

Installed JDK (which installs JRE too), after that Netbeans. Once complete I loaded up projects where background scanning got stuck and it seems to have fixed it. Will post updates if it starts happening again.

Ardath answered 11/3, 2015 at 13:13 Comment(1)
I did these mostly-same steps just 2 days ago (different JDK) - NB 8.0.2, JDK 7_79, Win 7 64 bit. (I must use Java 7 for the project, Java 8 not allowed) The background scanning of projects occurs over and over again throughout the day. It does not get stuck but it uses up CPU. I've disabled it in the Options but it still happens.Champion
F
1

I actually made a bug report for this issue. It was fixed and pushed to the update channels yesterday. So for anyone still having this specific bug, let Netbeans check for updates. :)

Bugfix: https://netbeans.org/bugzilla/show_bug.cgi?id=250985

Futtock answered 12/3, 2015 at 10:30 Comment(1)
Your link is no longer valid.Bourgeois
J
1

On Ubuntu 18.04 / Netbeans 10.0, I had the same problem.

  • [FAIL] Deleted cache
  • [FAIL] Deleted project-specific "nbproject" dir
  • [FAIL] Closed the offending project (mouseover the progress bar to identify which one) --> restart NB --> create new project
  • [SUCCESS] Nuked the project from the F/S --> re-cloned --> restarted NB. I also renamed the directory itself, in case there was some other cache that pointed to the old dirname.
Jurat answered 14/8, 2019 at 22:43 Comment(0)
C
0

Please try NetBeans 8.0.2 from https://netbeans.org/downloads/

NetBeans 7.2 is too old and you will not get any support anymore.

Chandra answered 3/3, 2015 at 11:1 Comment(6)
I'm using 8.0.2 and the "background scanning of projects" has been going on for over an hour. Always at 100%.Dallis
I am using latest version too still this seems a common problem for all netbeans versionsCartogram
With 8.0.2, I am stuck at 25%... It simply does not end... :sGertrudgertruda
Same here with 8.0.2 when a maven project has JS resources.Osteen
Same here with a new installation of NetBeans 8.0.2.Toponym
Same here with NetBeans 8.0.2. After looking at ps output, and inspecting /etc/netbeans.conf, I located my messages.log file. By this time NetBeans actually finished scanning my projects. The scanning took over 40 minutes to inventory over 14,000 new/modified/deleted files over an SSHFS link.Incomprehension
B
0

I was having the same problem with Netbeans 8.1, Windows 10. It was also hanging when I tried to compile and refactor. It would sometimes say 100% done yet continue background scanning for hours. I closed the project in which this was happening, and switched to a simple project and the problem went away. So I examined my code. I had class A extending class B, then class B importing class A. When I changed this, the endless looping in Ant stopped.

Benares answered 13/4, 2016 at 3:32 Comment(1)
Yes, it is specific to a single project, but could also be helpful to other users in that it was also "Every time when I open netbeans" because I typically leave the same set of projects up when I close the IDE, and the IDE therefore starts up with those projects open every time. If I opened it without any projects in place, I imagine it would not do any background scanning of projects.Benares
M
0

Always I fix such Netbeans related problems by deleting cache directory.

Directory location can be seen on About dialog window. For me, the path is

C:\Users\USER\AppData\Local\NetBeans\Cache\YOUR_VERSION

Musician answered 21/9, 2016 at 8:38 Comment(0)
S
0

This problem is related to one of the project opened in your IDE. As I had been facing the same issue but, after spending two hours on that issue I finally fixed that. Close project one by one or check and close the project where background processing is taking time. After closing the project delete the .nbproject folder and re-import the same project into your IDE.

Seabrooke answered 10/10, 2016 at 0:48 Comment(0)
N
0

It should be called foreground scanning of projects. Closing the program and restarting solves it for me sometimes.

Novobiocin answered 30/3, 2017 at 13:3 Comment(0)
W
0

I had the same problem but in my case I was on Windows 10 and running NetBeans 8.1.

Before I formatted my laptop I copied and backed up C:\Users\user_name\AppData\Roaming\NetBeans\8.1 and C:\Users\user_name\AppData\Local\NetBeans\Cache folders

Then i followed the below steps:

  1. Install NetBeans and run it.
  2. Closed NetBeans
  3. Go to C:\Users\user_name\AppData\Roaming\NetBeans\8.1 and C:\Users\user_name\AppData\Local\NetBeans\Cache folders and replace them with the backed up folders.
  4. Run NetBeans again

I hope this solves your problem!!

Wavemeter answered 14/7, 2017 at 10:4 Comment(0)
C
0

In my Laravel case ,got this "forever scanning" because the project was created in another IDE. I put the old IDE related folders .idea , vendor , node_modules into myproject->Properties->Ignored folders . Relaunched NetBeans as admin. It will scan a little bit but next time wont stick on that.

Chamaeleon answered 24/6, 2021 at 21:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.