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 54856 - [41cat] Very unreliable compile status badging
Summary: [41cat] Very unreliable compile status badging
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 4.x
Hardware: PC All
: P2 blocker (vote)
Assignee: rmatous
URL:
Keywords: REGRESSION
: 55584 55806 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-02-11 09:30 UTC by Milan Kubec
Modified: 2008-12-22 22:46 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
zipped test project (9.06 KB, application/octet-stream)
2005-03-23 10:22 UTC, Milan Kubec
Details
another test project (14.12 KB, application/octet-stream)
2005-03-23 10:34 UTC, Milan Kubec
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Kubec 2005-02-11 09:30:05 UTC
[dev-200502061900, JDK 1.5.0_02]

I created very simple j2se project with three
packages with one main class in each package. I
expanded all package nodes in Explorer and was
doing compilation of selected files (in editor or
in Explorer) or (clean) build of entire project
and compile status badging of those files in
Explorer didn't reflect reality, it was basically
random.
Comment 1 Jan Becicka 2005-02-14 09:26:52 UTC
It is probably regression caused by fix of issue 53237. Honzo, can you
take a look at it?
Comment 2 Jan Pokorsky 2005-02-14 15:00:44 UTC
I do not think it relates to issue #53237. IMO it is a bug of the
ant/project. I have added logging for GlobFileBuiltQuery and it seems
that JavaNode icon is in sync with the GlobFileBuiltQuery.Status.
GFBQS simply does not fire changes reliably.
Comment 3 Jan Chalupa 2005-02-17 08:46:03 UTC
Tomas, please look at this.

Milan, if you think this is a regression. Do you have any idea when
(approximately) it could occur? Does it work correctly in NB 4.0?
Comment 4 Milan Kubec 2005-02-17 10:14:15 UTC
I will check that.
Comment 5 Milan Kubec 2005-02-17 12:15:30 UTC
Problem appeared in build 200501092025.
Comment 6 Jan Chalupa 2005-02-17 12:24:01 UTC
Radek, IIRC you integrated the new masterfs around that time (Jan 9).
Could it be related? I'm not saying it is, just guessing -- perhaps,
some events not fired from the filesystem...?
Comment 7 rmatous 2005-02-17 12:39:28 UTC
See: #53203: GlobFileBuiltQueryTest.testChangeFiring is failing. This
issue was opened and fixed 2005-01-11. 

Marked as duplicate of #53203. If someone can reproduce on current
builds please reopen. I'm not.

*** This issue has been marked as a duplicate of 53203 ***
Comment 8 Tomas Zezula 2005-02-17 13:38:46 UTC
I've spent some time debugging it and it seems that the
FileChangeSupport listens on "classes" folder but it does not get an
event from it. The listener was added in the
FileChangeSupport.locateCurrent () and was not removed either in
FileChangeSupport.locateCurrent () or in FileChangeSupport.run ()
Seems a bug in FileSystems.
Comment 9 Jan Chalupa 2005-02-17 14:04:46 UTC
This issue was reported on Feb 11, so unless I'm missing something, it
can hardly be a duplicate of bug that was fixed on Jan 11. Also,
Tomas' evaluation suggests that the problem still exists.

Re-assigning to filesystems.
Comment 10 Milan Kubec 2005-02-17 14:09:37 UTC
Sorry, not working for me in dev-200502151900. Probably different
issue, see Tomas's last comment.
Comment 11 rmatous 2005-02-17 14:19:26 UTC
I saw dev-200502151900 and didn't notice [dev-200502061900]. When it
was reported is more or less unimportant because even today are
sometimes filled issues against NB3.5 or 3.6. 

Definitely sorry.
Comment 12 Tomas Zezula 2005-02-18 10:26:23 UTC
Agree with Radek, that this feature is not so important. I personally
would remove it at all. I am not sure if it is P2, probalbly P3 is enough.
Comment 13 Milan Kubec 2005-02-18 10:32:12 UTC
First of all it's major regression and the functionality is highly
visible in the Explorer and it looks really bad if it shows those
badges randomly. Please keep it as P2.
Comment 14 rmatous 2005-02-21 16:13:46 UTC
Fixed in trunk. 

org/netbeans/modules/masterfs/filebasedfs/children/ChildrenSupport.java?r1=1.4&r2=1.5
  
org/netbeans/modules/masterfs/filebasedfs/fileobjects/BaseFileObj.java.diff?r1=1.7&r2=1.8
org/netbeans/modules/masterfs/filebasedfs/fileobjects/FileObj.java.diff?r1=1.3&r2=1.4
org/netbeans/modules/masterfs/filebasedfs/fileobjects/FolderObj.java.diff?r1=1.2&r2=1.3
Comment 15 Milan Kubec 2005-02-24 12:56:31 UTC
Verified in dev-200502231900.
Comment 16 Milan Kubec 2005-02-28 09:56:29 UTC
*** Issue 55584 has been marked as a duplicate of this issue. ***
Comment 17 Tomas Zezula 2005-03-04 08:34:14 UTC
*** Issue 55806 has been marked as a duplicate of this issue. ***
Comment 18 Milan Kubec 2005-03-07 10:45:58 UTC
*** Issue 55806 has been marked as a duplicate of this issue. ***
Comment 19 Milan Kubec 2005-03-07 10:47:11 UTC
Still reproducible in dev-200503061900.
Comment 20 Milan Kubec 2005-03-07 10:47:57 UTC
Found by NetCAT participant.
Comment 21 rmatous 2005-03-07 10:56:13 UTC
OK, but WORKSFORME. Then please provide steps how to reproduce.
Comment 22 Milan Kubec 2005-03-07 11:30:02 UTC
Steps to reproduce:
1) Open J2SEProject with java sources
2) Expand packages nodes with sources
3) Select some java source file and click Compile File in its context
menu - maybe will work, maybe not
4) Select another java source file node and do the same
5) Do the same action on package node - Compile Package
6) Do Clean build for the project
7) Repeat any of 3) 4) 5) and 6)
Compile statuses are random.
Comment 23 Milan Kubec 2005-03-07 11:39:17 UTC
Justification for P2:
- it's regression
- it's highly visible feature of source nodes in Explorer
- users relly on those badges to verify that file (project) is compiled
Comment 24 rmatous 2005-03-07 14:08:36 UTC
/cvs/ant/project/src/org/netbeans/modules/project/ant/FileChangeSupport.java
new revision: 1.3; previous revision: 1.2
Comment 25 Jesse Glick 2005-03-14 20:18:01 UTC
Uh, this looks like a very important fix, yet the actual source code change (in
FileChangeSupport.java) is just one line whose purpose is far from obvious (not
even any comment in this issue explaining it). Where is the unit test
demonstrating the bug and confirming that the fix works??
Comment 26 rmatous 2005-03-15 08:13:51 UTC
I thought the line is more then obvious. FileChangeListeners used to be ever
notified about children (add, remove) just in case that getChildren were called
and internal cache was initialized (this is used in all filesystems tests). 

The only difference between NB4.1 and 4.0 is that
AbstractFileObject.getFileObject internally called getChildren and thus cache
was completely initialized and events were fired even if you required just one
child.
Comment 27 Milan Kubec 2005-03-15 12:56:37 UTC
Verified in dev-200503141900.
Comment 28 Milan Kubec 2005-03-23 10:21:45 UTC
Back again. Reproducible in dev-200503221900.

1) Open attached project 
2) Do Clean Project
3) Compile Package on <default package>
4) Compile Package on newpackage
5) Do Clean Project
6) Do Build Project
And any combination of 2) - 6)
Compile status is out of sync.

Would be possible to write the unit test that Jesse mentioned.

Justification for P2:
- it's regression
- it's highly visible feature of source nodes in Explorer
- users rely on those badges to verify that file (project) is compiled
Comment 29 Milan Kubec 2005-03-23 10:22:56 UTC
Created attachment 21049 [details]
zipped test project
Comment 30 Milan Kubec 2005-03-23 10:34:06 UTC
Created attachment 21051 [details]
another test project
Comment 31 Milan Kubec 2005-03-23 10:36:54 UTC
I've attached another test project that contains multiple source roots, where
compile status badging are not reliable as well.
Comment 32 rmatous 2005-03-23 16:04:57 UTC
Regression caused by #56285. 
Comment 33 rmatous 2005-03-24 12:10:58 UTC
/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/MasterFileObject.java,v
 new revision: 1.40; previous revision: 1.39
Comment 34 Milan Kubec 2005-03-25 09:42:23 UTC
Seems to be reliable again in build dev-200503242007. Verified.