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 166527 - Running project blocked by indexing
Summary: Running project blocked by indexing
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 4 votes (vote)
Assignee: Tomas Zezula
URL:
Keywords:
: 167724 (view as bug list)
Depends on: 168294
Blocks: 133943
  Show dependency tree
 
Reported: 2009-06-04 10:03 UTC by Vitezslav Stejskal
Modified: 2009-09-03 21:53 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vitezslav Stejskal 2009-06-04 10:03:20 UTC
As reported on several occasions in other issues mentioning problems with indexing/scanning running a j2se project is
blocked by indexing due to the need for resolving the project's main class, which in turn needs access to the index.
Comment 1 Jesse Glick 2009-06-05 21:17:57 UTC
"Resolve" the main class how? The main class is defined in the project's run config. AFAIK all you are doing is
verifying that the class exists so you can show a dialog rather than print a NCDFE if it does not, which is nice but far
lower priority than the major performance issue.
Comment 2 tkellerer 2009-06-10 09:01:46 UTC
I can't understand why this is only P3 (and why it's postponed to 6.8)

For me having to wait for 30-45 seconds when hitting "run" is nearly a blocker. 
Comment 3 Jiri Prox 2009-06-24 16:01:52 UTC
Is it possible to fix this in prior a port the fix into 6.7patch1 if it isn't too dangerous?
thanks
Comment 4 Vitezslav Stejskal 2009-06-25 09:26:35 UTC
I don't have the fix yet, so I don't know.
Comment 5 Tomas Zezula 2009-07-07 09:12:01 UTC
I have a fix allowing run|debug the project|file in the time of background scan. But there is a problem with compile on save, when the compile on save is 
turned on I have to wait on the background scan as before. The class files used in compile on save are produced and affected by background scan.
Comment 6 Tomas Zezula 2009-07-07 09:20:03 UTC
Also there is a problem with debugger. The project part works fine, the debugger stops on the break point but step next causes access to java model which 
stops the debugger.
Comment 7 Tomas Zezula 2009-07-07 12:22:55 UTC
Fixed with limitations described above.
1) The project cannot be started during bg scan when the compile on save is active (explained above).
2) The debugger  cannot be started during bg scan as the debugger blocks the AWT. I will try to find some solution with Martin E.
http://hg.netbeans.org/jet-main/rev/3655e3539716
http://hg.netbeans.org/jet-main/rev/833e1b8c611f
Comment 8 Jesse Glick 2009-07-07 14:42:07 UTC
#1 is to be expected, I think.
Comment 9 greggwon 2009-07-07 19:23:39 UTC
I think it makes sense for the debugger to wait, since the user is most likely, really interested in any changes when
"compile on save" is selected.  But, I also wonder, if more feedback to the user, on these "waiting moments" would not
be appropriate.  If the background "indexing" could have some progress feedback to the user that would make it more
probable that the user could get some comfort that the IDE is doing something that is "good" for them.

But, the most important thing, is that if I am compiling a depended on project, the dependee project compilation and
indexing should not impact my work.  There really needs to be a way to say "I'm only interested in results for
Project-X" so that any "wait" operation is conditionalized on that associated work.

I could imagine locks with project granularity being created and held/used by the indexing so that if I say "run X" and
project X has dependent indexing/compiling happening, that two things happen.  One, any such pending work is moved into
the front of the queue, as possible.  And two, when all work I am dependent on is completed, my run can start while the
other work is going on in the background.
Comment 10 Quality Engineering 2009-07-08 05:37:21 UTC
Integrated into 'main-golden', will be available in build *200907080200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/3655e3539716
User: Tomas Zezula <tzezula@netbeans.org>
Log: #166527:Running project blocked by indexing
Comment 11 Jiri Prox 2009-07-08 16:47:29 UTC
v.
Comment 12 David Strupl 2009-07-09 10:00:52 UTC
Be carefull when applying the patch for this into release67 - you *must* include also patch for 168294!
Comment 13 pgebauer 2009-07-10 23:36:37 UTC
The fix has been ported into the release67_fixes repository.
http://hg.netbeans.org/release67_fixes/rev/d202b9af980e
Comment 14 Jiri Prox 2009-07-16 16:22:48 UTC
v in 6.7.1
Comment 15 Vitezslav Stejskal 2009-09-03 21:53:34 UTC
*** Issue 167724 has been marked as a duplicate of this issue. ***