This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 257109 - Netbeans background scanning of projects hangs
Summary: Netbeans background scanning of projects hangs
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 8.1
Hardware: Macintosh Mac OS X
: P3 normal with 2 votes (vote)
Assignee: Svata Dedic
Depends on:
Reported: 2015-12-11 09:29 UTC by bbreukelen
Modified: 2017-10-10 08:46 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

IDE log (48.16 KB, text/plain)
2015-12-11 09:29 UTC, bbreukelen
dumps (17.14 KB, application/x-zip)
2016-01-04 22:02 UTC, Jiri Prox
The process Background scanning of projects" never completes (58.03 KB, image/jpeg)
2017-07-13 05:01 UTC, rajeev840

Note You need to log in before you can comment on or make changes to this bug.
Description bbreukelen 2015-12-11 09:29:15 UTC
I had this issue where Netbeans background scanning hangs at every project I open.
I use Netbeans for PHP/HTML/Javascript projects.

When I first encountered the issue I was using version 8.0.2.
Netbeans would work fine, but the background scanning task would hang at 50% and consume a LOT of CPU.
Manually stopping the background scan crashes Netbeans.

I then updated to version 8.1 just now and the same thing happens with the one difference that it hangs at 25% instead of 50%.

Product Version = NetBeans IDE 8.1 (Build 201510222201)
Operating System = Mac OS X version 10.7.5 running on x86_64
Java; VM; Vendor = 1.8.0_60
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.60-b23

Reproducibility: Happens every time

  * Open dialog Foo
  * Click on button "Click me"

  nothing happens

  message pops u
Comment 1 bbreukelen 2015-12-11 09:29:19 UTC
Created attachment 157757 [details]
IDE log
Comment 2 Jiri Prox 2015-12-11 10:43:36 UTC
Try deleting cache dir. You can find its location in the About dialog.

If it does not help, please capture several thread dump while the scanning is stuck and attach is here. 

Comment 3 bbreukelen 2016-01-04 15:23:09 UTC
Hi, I replied with all the requested info on 2015-12-11.
Can you please confirm that you received it as I don't see it here?

Comment 4 Jiri Prox 2016-01-04 22:02:26 UTC
From the reporter:

I deleted the cache. I didn't fix the issue but it did change it a bit.
Now it sometimes hangs at 100% and sometimes at 25%.

I created a few dumps.
The dumps from process 89504 were hanging at 25% and those of 88879 were hanging at 100%.
Comment 5 Jiri Prox 2016-01-04 22:02:44 UTC
Created attachment 157998 [details]
Comment 6 Svata Dedic 2016-01-07 10:26:51 UTC
sadly the dumps do not seem useful: they show repo update working/running, reading files as it is supposed to do.

Please try to stop the background scan; it should capture some info in the log showing why indexer runs or re-runs and how long individual indexers take to process source roots.
Comment 7 Svata Dedic 2016-04-26 13:12:24 UTC
No response -> incomplete.
Comment 8 Nowres 2017-02-08 14:21:34 UTC
I think this comes when we have large projects (many tree levels, especially when we have node_modules), for smaller projects I don't have the problem.
Comment 9 Nowres 2017-02-09 10:07:41 UTC
I no more have this problem when I added node_modules to file ignore pattern
Comment 10 rajeev840 2017-07-13 05:01:48 UTC
Created attachment 164752 [details]
The process Background scanning of projects" never completes

The process Background scanning of projects" never completes in netbean 8.2
Comment 11 rajeev840 2017-07-13 05:03:18 UTC
#Comment 10


Please help me out to solve the problem (see Comment 10)
Comment 12 dkfi 2017-08-16 09:07:44 UTC
Hi ! I don't know if this is also your case but I just managed to solve a very similar scanning project hang by setting a manual proxy server (host and port) in the IDE options. Netbeans probably doesn't support proxy auto configuration scripts (.pac) which we happened to be using in our network.
Comment 13 TonyGirling 2017-10-10 08:46:00 UTC
I too was suffering from a hanging background process.   I even resorted to deleting NetBeans and re-installing.

I also unchecked the Preference to avoid scanning but every time it hung on 100%.

Turns out I just needed to be patient.  The CPU was maxed out spinning for a very long time, but eventually it did complete.

On brand new installation it took over 11 min CPU time to complete a scan of a project folder that a contained a single WordPress Theme. Not full WordPress installation, no plugins.  Just a single Theme.

That was on a MacBook with solid state disk etc.

[I'm off to demo/debug on client site - scared to close NetBeans and re-start]