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 206445 - [71cat] MavenForBinaryQueryImpl$BinResult.fireChanged from routine project reload
Summary: [71cat] MavenForBinaryQueryImpl$BinResult.fireChanged from routine project re...
Status: RESOLVED INCOMPLETE
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on: 206632
Blocks:
  Show dependency tree
 
Reported: 2011-12-15 15:28 UTC by jmborer
Modified: 2012-05-28 07:47 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 183813


Attachments
stacktrace (2.21 KB, text/plain)
2011-12-15 15:28 UTC, jmborer
Details
stacktrace (1.94 KB, text/plain)
2011-12-15 16:28 UTC, dds.dhawal
Details
stacktrace (2.28 KB, text/plain)
2011-12-15 16:34 UTC, dds.dhawal
Details
stacktrace (2.12 KB, text/plain)
2011-12-16 06:19 UTC, mkrivan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jmborer 2011-12-15 15:28:24 UTC
Build: NetBeans IDE 7.1 (Build 201112051121)
VM: Java HotSpot(TM) Client VM, 20.1-b02, Java(TM) SE Runtime Environment, 1.6.0_26-b03
OS: Windows XP

Stacktrace: 
java.lang.Exception: Scan canceled.
   at java.lang.Thread.getStackTrace(Thread.java:1479)
   at org.netbeans.modules.parsing.impl.indexing.LogContext.create(LogContext.java:74)
   at org.netbeans.modules.parsing.impl.indexing.LogContext.create(LogContext.java:67)
   at org.netbeans.modules.parsing.impl.indexing.PathRegistry.scheduleFirer(PathRegistry.java:769)
   at org.netbeans.modules.parsing.impl.indexing.PathRegistry.resetCacheAndFire(PathRegistry.java:764)
   at org.netbeans.modules.parsing.impl.indexing.PathRegistry.access$500(PathRegistry.java:83)
Comment 1 jmborer 2011-12-15 15:28:26 UTC
Created attachment 114230 [details]
stacktrace
Comment 2 Tomas Zezula 2011-12-15 15:34:17 UTC
The maven project triggers unexpected scan during work (no changes done by user).
   ...
   at org.netbeans.modules.maven.api.NbMavenProject.doFireReload(NbMavenProject.java:486)
   at org.netbeans.modules.maven.api.NbMavenProject.access$200(NbMavenProject.java:89)
   at org.netbeans.modules.maven.api.NbMavenProject$AccessorImpl.doFireReload(NbMavenProject.java:130)
   at org.netbeans.modules.maven.NbMavenProjectImpl.fireProjectReload(NbMavenProjectImpl.java:489)
   at org.netbeans.modules.maven.api.NbMavenProject.fireProjectReload(NbMavenProject.java:480)
   at org.netbeans.modules.maven.api.NbMavenProject.fireMavenProjectReload(NbMavenProject.java:499)
   at org.netbeans.modules.maven.execute.MavenCommandLineExecutor$1.run(MavenCommandLineExecutor.java:227)
Comment 3 dds.dhawal 2011-12-15 16:28:37 UTC
Created attachment 114231 [details]
stacktrace
Comment 4 dds.dhawal 2011-12-15 16:34:36 UTC
Created attachment 114232 [details]
stacktrace
Comment 5 Jesse Glick 2011-12-15 18:18:36 UTC
After building a Maven project, the POM is automatically reloaded, as often some missing plugin etc. will have been downloaded by that time. Could perhaps be made conditional on there having been a warning on the project metadata before. Anyway, the question is whether SourceForBinaryQuery gets a gratuitous change event even when nothing has actually changed, or whether the reported cases are those in which the IDE's understanding of metadata actually did change as a result of new files created during the build (in which case this is not a bug).
Comment 6 Exceptions Reporter 2011-12-16 03:13:40 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=183813
Comment 7 mkrivan 2011-12-16 06:19:39 UTC
Created attachment 114247 [details]
stacktrace

I wanted to open a quite large php project and the scanning projects stopping at 66% and do not move forward. I have tried many times to repeat it and did not success. Do you have any ideas what can be the problem? How can I solve it?
Comment 8 Tomas Zezula 2011-12-16 08:11:25 UTC
The other duplicates has nothing in common with this. The stack of exception is deep and the statistics server marks them as a duplicate.

I've split them into:
http://statistics.netbeans.org/analytics/detail.do?id=183844 which seems as legal scan (project was opened)
http://statistics.netbeans.org/analytics/detail.do?id=183843 also PHP project was opened.
Comment 9 Milos Kleint 2012-03-19 07:36:24 UTC
Arrays.equals(res.getCached(), res.getRoots()) is used to guard firing of events from the result object.

a possible incorrect firing could be caused by different ordering of items in the arrays. most items should be deterministic, the only item I'm not entire sure about is:
project.getLookup().lookupAll(JavaLikeRootProvider.class)
Comment 10 Milos Kleint 2012-05-28 07:47:14 UTC
without knowing how the maven's SFBQI changed (why it fired) and if the firing was correct or not, we cannot really move forward..

added logging to org.netbeans.modules.maven.queries.MavenForBinaryQueryImpl

see http://bits.netbeans.org/dev/javadoc/org-openide-util/org/openide/util/doc-files/logging.html for details on how to enable logging..

http://hg.netbeans.org/core-main/rev/13e4de284172

closing as INCOMPLETE, please reopen with additional data.