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 240371 - Error mark/badge is shown incorrectly or not shown at all
Summary: Error mark/badge is shown incorrectly or not shown at all
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 8.0
Hardware: PC All
: P1 normal with 2 votes (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords:
: 235050 240754 (view as bug list)
Depends on: 241780
Blocks:
  Show dependency tree
 
Reported: 2014-01-12 20:53 UTC by ceklock
Modified: 2014-02-14 02:52 UTC (History)
9 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
bug/error mark screenshot (121.13 KB, image/png)
2014-01-12 20:58 UTC, ceklock
Details
IDE log to help localize the bug (441.58 KB, text/plain)
2014-01-24 19:19 UTC, wissenstein
Details
Algorithms.zip (451.68 KB, application/x-zip-compressed)
2014-02-04 22:42 UTC, MackSix
Details
j3d-jre.zip (1.90 MB, application/x-zip-compressed)
2014-02-04 22:44 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ceklock 2014-01-12 20:53:15 UTC
[ BUILD # : 201401120002 ]
[ JDK VERSION : 1.7.0_45 ]

STEPS:
   * Get a project with many errors in classes;
   * Edit some classes to fix them and save;
   * Check the project tab, see if the fixed classes have a bug mark;
   * Check the class tab, see if the fixed classes have a bug mark;
   * It seems it happens more when there are classes that depend on classes
that are on error. If you fix the 'parent' class (a class that has errors and
is used in many places of the code), the error status does not seem to be fixed
on all the dependent classes.

ACTUAL:
   Sometimes there is a bug mark on the class tab and no bug mark on the
project tab. I don't know if the synchronization is taking time to run, but I
saw this happening many times in a small project. The most frequent issue is
the bug mark not disappearing from the class tab, even if there are no more
errors in the class.

EXPECTED:
   Synchronized bug mark. If there is a bug mark in a tab, the other should
also have a bug mark.
Comment 1 ceklock 2014-01-12 20:58:46 UTC
Created attachment 143875 [details]
bug/error mark screenshot
Comment 2 ceklock 2014-01-12 21:01:59 UTC
I called it "bug mark", but maybe the most correct is "error mark". I don't know the correct name.
Comment 3 Dusan Balek 2014-01-13 09:34:02 UTC
Unfortunately, I cannot reproduce the problem. Do you have a reproducible test case? Thanks.
Comment 4 adithyank 2014-01-13 10:58:30 UTC
It is a very frequently occurring issue for me. I have to close and open the class again to hide the error-mark on the tab title. I have another observation, if you open actions window (CTRL + 6), this error marks in the editor got cleared immediately.

Actually, the error status between the left side tree node, tab title, left side editor bar and the right side bar are not at all consistent.

This is very annoying issue at times.
Comment 5 wissenstein 2014-01-24 19:19:29 UTC
Created attachment 144352 [details]
IDE log to help localize the bug

Product Version = NetBeans IDE 8.0 Beta (Build 201401141042)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_21
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.21-b01

In my IDE instance, error mark is now remaining on the tab titled EditTournament2ActionBean.java despite I corrected the class code and error marks have disappeared from Projects pane and from the class source pane.
I attached the IDE log.
Comment 7 ceklock 2014-02-04 22:22:49 UTC
Another related bug:
https://netbeans.org/bugzilla/show_bug.cgi?id=226954
Comment 8 MackSix 2014-02-04 22:41:43 UTC
1. Start NetBeans with no userdir or cachedir. Make sure you have the Home Page open and leave it open.
2. Open project "Algorithms" and notice there is errors.
3. Open StdDraw3D.java in package edu.princeton.cs.introcs.
4. Notice error badge on document tab.
5. In Projects window, open Libraies folder context menu and add j3dcore.jar, j3dutils.jar and vecmath.jar
6. Wait for project scanning and see if error badge on document tab goes away.
7. If error badge persists, if you click on Start Page and then back again, it may go away.
8. In Libraries folder, highlight j3dcore.jar, j3dutils.jar and vecmath.jar and use context menuu to remove them.
9. Restart NetBeans (do not click on any document tabs that are open) and notice that j3dcore.jar, j3dutils.jar and vecmath.jar reappear in Libraries folder.
10. Repeat step 8 to remove them.
11. After project scan, see if error badge on StdDraw3D.java disappears. If so, click on the document tab to view StdDraw3D.java and see if error badge reappears. 
12. Restart NetBeans again (do not click on any document tabs) and this time the libraries are really gone. 
13. Repeat step 5 to add library jars again.
14. After project scanning, see if error badge on document tab went away.
15. If error is present on document tab, click on the tab to view StdDraw3D.java and the error badge may go away.
16. Repeat steps 8 through 15 up to 5 times.

Project is in Algorithms.zip and jar files are in j3d-jre.zip

Product Version: NetBeans IDE Dev (Build 201402030001)
Updates: Updates available
Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b69
Runtime: Java(TM) SE Runtime Environment 1.8.0-b127
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 9 MackSix 2014-02-04 22:42:41 UTC
Created attachment 144807 [details]
Algorithms.zip
Comment 10 MackSix 2014-02-04 22:44:16 UTC
Created attachment 144808 [details]
j3d-jre.zip

Remove the 3 jar files located in the lib/ext folder and place them somewhere convenient.
Comment 11 ceklock 2014-02-04 22:56:28 UTC
1) Create class file Test.java:

public class Test {

    public void test() {
        Test2 t2 = new Test2();
        t2.test();
    }
}


2) Create class file Test2.java:

public class Test2 {
    public void test() {

    }
}

3) Save the files and keep them opened in different tabs.

4) Comment the test() method of Test2 class. Save file. Test.java tab will show error badge (hopefully - see step 5).

5) Select Test.java tab. Error badge will disappear from the tab. But there are 2 situations here: if the error badge does not appear at step 4 it will appear after Test.java is selected. If the error badge appears at step 4 it will disappear after Test.java is selected.

6) Try again a couple of times and maybe the behavior will change. Trying again with IDE restart could be a good test also.
Comment 12 MackSix 2014-02-04 23:12:38 UTC
(In reply to ceklock from comment #11)

Carlos, I can repeat your steps from comment 11. It is an easier way to reproduce the issue than my steps.
Comment 13 Jiri Prox 2014-02-05 07:32:27 UTC
I can reproduce it as well



Product Version: NetBeans IDE Dev (Build 201402040001)
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b65
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b123
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\jprox\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\dev
Comment 14 Jiri Kovalsky 2014-02-05 08:44:26 UTC
Dusane, can you please take a look at this? Thanks a lot!
Comment 15 Jiri Prox 2014-02-05 13:10:07 UTC
*** Bug 240754 has been marked as a duplicate of this bug. ***
Comment 16 swpalmer 2014-02-11 17:04:04 UTC
I make an error in a .java file and save.  It shows up with the error indicator everywhere it is supposed to.  Then I exit NB and re-launch.  That puts me in the state where the file has the error and it is marked on the package, but not the file in the project view, and not on the tab in the editor.  This of course makes it hard to find as the the trail of error badges in the packages suddenly ends with no source file identified.

Soon as I make a change to that file and save, all the error badges are corrected.
Comment 17 Dusan Balek 2014-02-12 15:23:57 UTC
*** Bug 235050 has been marked as a duplicate of this bug. ***
Comment 18 Dusan Balek 2014-02-12 15:48:31 UTC
Both test cases (described in comments 8 and 11) are reproducible. Problem seems to be in core.multiview since the org.netbeans.modules.parsing.impl.indexing.errors.ErrorAnnotator returns correctly annotated icons when requested. Reassigning.
Comment 19 Svata Dedic 2014-02-12 16:13:27 UTC
Part of the issue reported as comment#8 has a different cause; after step (5), project config is not saved (project.properties on disk does not contain JAR references).
I've put some debug traces into project system and found out that the project properties are actually modified, but not saved on the disk -- this may cause the effect of step (9).

Issue filed against project system as issue #241780
Comment 20 Stanislav Aubrecht 2014-02-13 11:54:51 UTC
core-main 7405bc7d4ab6
Comment 21 Quality Engineering 2014-02-14 02:52:12 UTC
Integrated into 'main-silver', will be available in build *201402140001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/7405bc7d4ab6
User: S. Aubrecht <saubrecht@netbeans.org>
Log: #240371 -  Error mark/badge is shown incorrectly or not shown at all