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 221932 - Blocked background scan
Summary: Blocked background scan
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: CDI (show other bugs)
Version: 7.2
Hardware: All All
: P2 normal (vote)
Assignee: Denis Anisimov
URL:
Keywords:
Depends on: 210526
Blocks:
  Show dependency tree
 
Reported: 2012-11-12 09:41 UTC by Exceptions Reporter
Modified: 2014-11-14 15:16 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 194963


Attachments
stacktrace (2.12 KB, text/plain)
2012-11-12 09:41 UTC, Exceptions Reporter
Details
Log NB (556.64 KB, application/octet-stream)
2014-11-10 13:33 UTC, iluvtr
Details
Awful slow completion because of CDI scanning (142.90 KB, image/png)
2014-11-10 13:39 UTC, iluvtr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2012-11-12 09:41:16 UTC
This issue was reported manually by sdedic.
It already has 1 duplicates 


Build: NetBeans IDE 7.2 (Build 201207171143)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.3-b01, Java(TM) SE Runtime Environment, 1.7.0_07-b10
OS: Windows 7

Stacktrace: 
java.lang.Exception: Scan canceled.
   at java.lang.Thread.getStackTrace(Thread.java:1567)
   at org.netbeans.modules.parsing.impl.indexing.LogContext.create(LogContext.java:113)
   at org.netbeans.modules.parsing.impl.indexing.LogContext.create(LogContext.java:106)
   at org.netbeans.modules.parsing.impl.indexing.PathRegistry.scheduleFirer(PathRegistry.java:820)
   at org.netbeans.modules.parsing.impl.indexing.PathRegistry.resetCacheAndFire(PathRegistry.java:814)
   at org.netbeans.modules.parsing.impl.indexing.PathRegistry.access$500(PathRegistry.java:85)
Comment 1 Exceptions Reporter 2012-11-12 09:41:18 UTC
Created attachment 127591 [details]
stacktrace
Comment 2 Svata Dedic 2012-11-12 09:52:22 UTC
Originally reported as scan_cancelled report. 

Editor parsing loop analyzes webbeans, blocks repository updater. 
Lot of warnings "org.netbeans.modules.web.beans.model.spi.WebBeansModelProvider]: ClassIndex.getElements() was interrupted".

Please check if the behaviour is correct; thanks.
Comment 3 Denis Anisimov 2012-11-21 06:41:52 UTC
(In reply to comment #2)
> Originally reported as scan_cancelled report. 
> 
> Editor parsing loop analyzes webbeans, blocks repository updater. 
> Lot of warnings
> "org.netbeans.modules.web.beans.model.spi.WebBeansModelProvider]:
> ClassIndex.getElements() was interrupted".
> 
> Please check if the behaviour is correct; thanks.

I don't see any references to the CDI area in the report.
There is only one reference to the web.beans module in your last 
comment as a warning. 
There is an editor error/hints analyzer implemented via JavaSourceTaskFactory 
service as EditorAwareJavaSourceTaskFactory subclass.
I believe this analyzer relates to the issue.
But the analyzer is implemented correctly with conformance to the contract 
of JavaSourceTaskFactory with Priority.LOW priority.
It doesn't have any issues except big amount of Java model computation.
The only thing which could be corrected here is disallowing for 
EditorAwareJavaSourceTaskFactory to be executed during scan.
Because now its subclass uses TaskIndexingMode.ALLOWED_DURING_SCAN.
Comment 4 Svata Dedic 2012-11-21 06:55:03 UTC
If the behaviour - you explained that the message is just a warning - is OK, and does not mean the computation takes long, or is repeated uselessly over and over, then please resolve the defect as invalid
Comment 5 Svata Dedic 2012-11-21 06:55:03 UTC
If the behaviour - you explained that the message is just a warning - is OK, and does not mean the computation takes long, or is repeated uselessly over and over, then please resolve the defect as invalid
Comment 6 Denis Anisimov 2012-11-21 10:26:56 UTC
OK, I've removed the TaskIndexingMode.ALLOWED_DURING_SCAN mode from the analyzer.
Nothing else could be done here.
web-main#223892e8aa93
Comment 7 Quality Engineering 2012-11-22 02:43:47 UTC
Integrated into 'main-golden', will be available in build *201211220002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/223892e8aa93
User: Denis Anisimov <ads@netbeans.org>
Log: Fix for BZ#221932 - Blocked background scan.
Comment 8 iluvtr 2014-11-10 13:33:47 UTC
Created attachment 150392 [details]
Log NB
Comment 9 iluvtr 2014-11-10 13:35:50 UTC
As you can see in the log I'm attaching this problem stills in NB 8.0.1, the IDE gets really unusable because of the excessive scanning and keeps 'Scanning classpath...' when hitting Autocompletion, or for a simple go to type, takes awful longer
Comment 10 iluvtr 2014-11-10 13:39:20 UTC
Created attachment 150393 [details]
Awful slow completion because of CDI scanning
Comment 11 Svata Dedic 2014-11-10 20:47:10 UTC
Please do not change the "Version" field to newer versions. According to NB Bugzilla process, Version is the version where the defect is first observed. If it is not fixed, it's assumed the defect is present in all released versions starting from the reported one up to the most recent reports. It's possible to move Version back if the defect is found in yet older version of the software.
Comment 12 Sergey Petrov 2014-11-14 15:16:48 UTC
change status back as 248570 is filed