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 226091 - file status badges not being updated
Summary: file status badges not being updated
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P2 normal with 1 vote (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: REGRESSION
: 226096 226419 226629 226724 227207 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-14 00:54 UTC by pbelbin
Modified: 2013-07-31 09:37 UTC (History)
15 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Message log (335.06 KB, text/x-log)
2013-02-26 08:42 UTC, Ondrej Brejla
Details
screenshot showing the problem (55.26 KB, image/png)
2013-03-12 13:47 UTC, gholmer
Details
nbm file for 7.3 with the fix (94.95 KB, application/octet-stream)
2013-03-21 11:18 UTC, Jaroslav Tulach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pbelbin 2013-02-14 00:54:14 UTC
[ BUILD # : fcs ]
[ JDK VERSION : other ]

I created a small javafx project, and, after having done some edit / compile /
run cycles, I find that the badge in the projects hierarchy does not reflect
the status of the compilation of the files any more.
Comment 1 pbelbin 2013-02-14 16:07:53 UTC
further, once the problem happens, the badges also fail to update in other cases, such as using F9 on a package.

ie: none of the files in the package get updated to indicate they've been compiled, even though the compilation clearly has happened successfully.

you may have to run the javafx app before the issue creeps in.

I was able to:

a) open netbeans.
b) edit a source file (badge shows it needs compiling)
c) compile it.  
d) run it.
e) edit the same source file
f) compile it.  (badge is now no longer updating and shows it still needs compiling).
Comment 2 pbelbin 2013-02-14 16:12:03 UTC
about the project:

It's the javafx with separate preloader app variety.

it has (on the build/deployment pane) for the main app:

Request unrestricted access (Enable Signing) checked.

the certificate is: self-signing.

and, I also note that when building, I see the following error/warning:

Duplicated project name in import. Project jfx-impl defined first in C:\nbp73trunk\byos4LaptopFx\nbproject\jfx-impl.xml and again in C:\nbp73trunk\byos4LaptopFxPreloader\nbproject\jfx-impl.xml
Comment 3 Petr Somol 2013-02-18 15:08:10 UTC
I confirm it is reproducible on my PC, using Win7 64 and NB daily build from 18 FEB 2013. Actually it happens not just in the context described in Comment #1, it seems to be failing even with plain Java projects if there are dependencies among them. Also, currently no badges are shown when I create a Java Class Library project, no matter whether the sources get edited/rebuilt or not. The behavior is unstable, sometimes restarting IDE helps, at other times it does not.

The problem most likely is not FX specific; there seems to be something broken either in general project UI support or even in file system listening.

(Remark: the warning "Duplicated project name in import..." mentioned in Comment #2 is unrelated to this issue, see Issue #208484)
Comment 4 Tomas Zezula 2013-02-19 12:33:16 UTC
The FileBuiltQuery is not part of ClassPath module, it's in general queries.
Comment 5 Antonin Nebuzelsky 2013-02-19 13:57:33 UTC
-> projects / generic infra
Comment 6 Tomas Zezula 2013-02-19 16:45:16 UTC
I was looking at it, namely I was looking at GLobFileBuiltQuery.
Here is the result:
The StatusImpl was correctly created and listener to target added.
The StatusImpl was not freed (the listener exists), but the events from FS are not delivered.
Reassigning to openide/fs.
Comment 7 Tomas Zezula 2013-02-21 08:16:48 UTC
*** Bug 226419 has been marked as a duplicate of this bug. ***
Comment 8 Jiri Prox 2013-02-25 09:09:24 UTC
*** Bug 226629 has been marked as a duplicate of this bug. ***
Comment 9 Jaroslav Tulach 2013-02-26 07:48:54 UTC
I don't understand why this should be P2 bug.

You can run with -J-Dorg.netbeans.modules.masterfs.watcher.level=FINE and attach your log file. That would give us a bit more clue of what is going on.
Comment 10 Ondrej Brejla 2013-02-26 08:42:22 UTC
Created attachment 131884 [details]
Message log

Here is my message log.

I opened NB, waited for scan, made a modification in one file, clean and build, and a badge is still on file.

Hope it will help a bit.
Comment 11 MackSix 2013-02-26 12:34:30 UTC
(In reply to comment #9)
> I don't understand why this should be P2 bug.
> 

This doesn't happen in 7.2.1, so it's regression. According to the bug priority chart, regression in functionality is a P1. I don't understand how it is not a P1. Maybe I don't understand the priority chart? I think maybe the priority chart needs to be updated with a better explanation if this is the case because I have filed P1 bugs before based on regression that held up releases. These were issues that had less of an impact on usability than this bug.
Comment 12 Tomas Danek 2013-02-27 12:00:26 UTC
if it's a regression, it certainly deserves P2 IMO...
Comment 13 Tomas Mysik 2013-02-27 12:02:58 UTC
Perhaps a patch candidate?
Comment 14 Jiri Prox 2013-02-27 12:18:43 UTC
*** Bug 226724 has been marked as a duplicate of this bug. ***
Comment 15 Tomas Danek 2013-02-27 14:24:09 UTC
good idea.
(In reply to comment #13)
> Perhaps a patch candidate?
Comment 16 Petr Somol 2013-03-08 13:10:31 UTC
*** Bug 227207 has been marked as a duplicate of this bug. ***
Comment 17 gholmer 2013-03-12 13:47:14 UTC
Created attachment 132515 [details]
screenshot showing the problem
Comment 18 Marian Mirilovic 2013-03-13 17:39:13 UTC
Another Regression and high-priority issue, please evaluate ASAP. Thanks in advance.
Comment 19 Antonin Nebuzelsky 2013-03-18 13:11:13 UTC
jtulach, what is the status of fixing this for 7.3 patch 1?
Comment 20 ecerichter 2013-03-19 17:26:19 UTC
Also happens on DEV 201303142300.
Comment 21 Jaroslav Tulach 2013-03-20 18:18:59 UTC
I managed to reproduce the problem. No events are delivered to just invalidated FileObjects. Following change seems to improve the situation a bit:

--- <html>BaseFileObj.java (<b>Feb 15, 2013 12:15:30 PM</b>)</html>
+++ <html><b>Current File</b></html>
@@ -842,6 +842,8 @@
                 } else if (isData()) {
                     refreshExistingParent(expected, fire);
                 }
+            } else {
+                fireFileDeletedEvent(expected);
             }
         } finally {
             stopWatch.stop();
Comment 22 Jaroslav Tulach 2013-03-20 18:19:13 UTC
I managed to reproduce the problem. No events are delivered to just invalidated FileObjects. Following change seems to improve the situation a bit:

--- <html>BaseFileObj.java (<b>Feb 15, 2013 12:15:30 PM</b>)</html>
+++ <html><b>Current File</b></html>
@@ -842,6 +842,8 @@
                 } else if (isData()) {
                     refreshExistingParent(expected, fire);
                 }
+            } else {
+                fireFileDeletedEvent(expected);
             }
         } finally {
             stopWatch.stop();
Comment 23 Jaroslav Tulach 2013-03-21 11:11:36 UTC
ergonomics#f160b375b879
Comment 24 Jaroslav Tulach 2013-03-21 11:18:37 UTC
Created attachment 132899 [details]
nbm file for 7.3 with the fix

The NBM should be good for testing. A deeper code review could be beneficial with this kind of change where anything can go wrong.
Comment 25 Jaroslav Tulach 2013-03-21 11:28:48 UTC
Command

$ ant -f masterfs/build.xml test

passed OK on release73 branch on my Linux computer.
Comment 26 Jiri Skrivanek 2013-03-21 14:15:25 UTC
I tried attached NBM with 7.3 and haven't found any regression so far. Since I am not able to reproduce the original problem I tried to 
- create Java project
- disable compile on save
- add some classes
- clean and build
- modify code
- clean and build
- delete build folder in Files view
- clean and build
- etc.

All badges were updated correctly.
Comment 27 gholmer 2013-03-21 14:42:00 UTC
How to apply the NBM? I'd like to test it.
Comment 28 Jaroslav Tulach 2013-03-21 16:36:58 UTC
changeset:   da870d360bc2
branch:      release73
tag:         tip
parent:      4c9ad2fab74f
parent:      f160b375b879
user:        Jaroslav Tulach <jtulach@netbeans.org>
date:        Thu Mar 21 17:35:44 2013 +0100
summary:     Merge of #226091 into 7.3 patch 1 + increment of spec. version number
Comment 29 Jaroslav Tulach 2013-03-21 16:40:01 UTC
(In reply to comment #27)
> How to apply the NBM? I'd like to test it.

Tools/Plugins/Downloaded.
Comment 30 gholmer 2013-03-21 16:54:29 UTC
I tried that; I get "Plugin 'Master Filesystem' is already installed".
Comment 31 gholmer 2013-03-21 20:32:50 UTC
Sorry, I was running a dev build.
Comment 32 Quality Engineering 2013-03-22 01:54:21 UTC
Integrated into 'main-golden', will be available in build *201303212300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/f160b375b879
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #226091: Don't forget to deliver events for existing file objects deep under a folder that disappears
Comment 33 Quality Engineering 2013-03-22 20:39:49 UTC
Integrated into 'releases', will be available in build *201303221808* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/f160b375b879
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #226091: Don't forget to deliver events for existing file objects deep under a folder that disappears
Comment 34 Jan Lahoda 2013-07-31 09:37:08 UTC
*** Bug 226096 has been marked as a duplicate of this bug. ***