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 136047 - incorrect error badges creates infinite loop
Summary: incorrect error badges creates infinite loop
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Rastislav Komara
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-29 00:22 UTC by Rich Unger
Modified: 2009-11-02 10:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
simple project (2.05 KB, application/x-compressed)
2008-06-13 00:30 UTC, Rich Unger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rich Unger 2008-05-29 00:22:39 UTC
Running the trunk, with jglick's automatic project type.


I get the error:
WARNING [org.netbeans.modules.java.source.tasklist.IncorrectErrorBadges]: Incorrect error badges detected,
file=/home/runger/dev/app/main/core/sfdc/java/src/common/search/server/index/TermDeleter.java.

...which fires off a recompile (of a very large source tree, BTW).
...which does not fix the incorrect error badge
...which fires off the recompile again, ad infinitum.

So, 2 problems:
1. I don't know what's causing the incorrect error badge to begin with.
2. The handler for this error condition doesn't fix the original problem, which causes an infinite loop.  There should
be a termination condition in this loop somewhere (have we tried to fix this particular incorrect error badge by
recompiling before?)

What information can I provide to help track down the root cause of the IEB?
Comment 1 Jan Lahoda 2008-05-29 23:41:29 UTC
Steps to reproduce would be perfect. Otherwise, it may take a while until we find the cause. First, the errors that are
causing the incorrect error badge may give us a lead. These can be found like this:
-in ${nbuser.dir}/var/cache/index/<highest-number>/s<number>/errors are stored all errors from batch "compile". The
number maps to the given source root through ${nbuser.dir}/var/cache/index/<highest-number>/segments .
-while having the file with incorrect badge open, select Tools/Tasklist, and select Current File in the tasklist window.
Should show the batch compile errors for the given file.

Thanks.

Comment 2 Rich Unger 2008-05-30 00:31:08 UTC
The errors are:
ERROR:105:cannot find symbol
symbol  \d method open(org.apache.lucene.store.Directory,java.util.List<org.apache.lucene.index.Term>)
location\d class org.apache.lucene.index.IndexReader
ERROR:105:incompatible types
found   \d org.apache.lucene.index.IndexReader.open
required\d org.apache.lucene.index.IndexReader

It looks like the problem stems from the handling of files that we patch.  So, IndexReader is a class in Lucene which we
patch (kind of like NB modules do in http://wiki.netbeans.org/DevFaqModulePatching), and it's referred to from
TermDeleter.  Perhaps the source parser is getting the 2 versions confused?

BTW, when I open TermDeleter, there's an error badge in the editor's tab, but the square at the top-right is green.
Comment 3 Rich Unger 2008-06-13 00:30:51 UTC
Created attachment 62773 [details]
simple project
Comment 4 Rich Unger 2008-06-13 00:33:42 UTC
Attached project, when loaded with contrib/autoproject, produces an incorrect error badge for, I believe, the same
reason my large codebase does.  This particular example doesn't go into the same infinite loop, though.  Don't know if
that helps.
Comment 5 Rich Unger 2008-07-25 17:23:52 UTC
Just FYI, I'm still seeing this, despite the attached sample project no longer creating an error badge.  My actual
sources still create an error badge that results in an infinite loop, though thus far I've been unable to isolate a good
test case.
Comment 6 Jan Lahoda 2008-12-05 14:22:00 UTC
Precise steps to reproduce would be welcome.
Comment 7 Rastislav Komara 2009-02-03 10:52:47 UTC
Overtake.
Comment 8 Rastislav Komara 2009-03-24 11:08:15 UTC
Can't successfully reproduce. Awaiting reporter interaction (Exact steps to reproduce, userdir (at least messages.log))
. Planing for future. Will be closed within next 6 months if there will be no interaction from reporter.
Comment 9 David Strupl 2009-03-31 15:57:16 UTC
Resolving all issues with milestone "future" as LATER. If you feel strongly that
it should be implemented please reopen and set the target milestone to "next".
Comment 10 Quality Engineering 2009-11-02 10:56:37 UTC
NetBeans.org Migration: changing resolution from LATER to WONTFIX