This scenario worked nicely in Oracle Solaris Studio build 16.0, but it fails in build 17.0 or NetBeans 7.0RC1.
- Launch IDE on Solaris 10 (I think RedHat 5 has same problem too)
- Create "C/C++ Project with Existing Sources" project
- Expand some node in Projects tab
- Create test.txt file in some external terminal (gnome terminal)
- Wait test.txt in Projects tab
==> files doesn't appear
In Solaris Express new file appears. On everest (Solaris 10) files doesn't appear
Sasha, could it be side effect of using addRecursiveListener on systems without native support for native listeners? (Solaris 11 has such support, while Solaris 10 not)
It's working properly on Ubuntu and fails on Solaris 10.
(In reply to comment #0)
> This scenario worked nicely in Oracle Solaris Studio build 16.0, but it fails
> in build 17.0 or NetBeans 7.0RC1.
My assumption is: it's caused by migration from "listener per folder" to recursive listener per source root.
It is 100% reproducible on system without fs native support (or with turned off native listeners -J-Dorg.netbeans.modules.masterfs.watcher.disable=true)
It's asymmetrical behavior of NB FileSystem events.
externally created file does not appear in "Project"/"Files"/"Favorites" views at all.
Other investigation on systems without native listeners (or listeners OFF) shows:
- if I add /var/tmp/folder to favorites and externally create file in /var/tmp/folder => Favorites is updated after focus gained
- but if I add to favorites folder which is under recursive listening (i.e. source folder of usual project) => externally created file never appears neither in Favorites nor in Projects/Files views
please find attached test to reproduce the issue easier:
unpack attached archive => you'll have "testcase" folder
- run IDE with -J-Dorg.netbeans.modules.masterfs.watcher.disable=true
- add to Favorites "testcase" folder
- expand tescase/Quote_9 folder
- externally create file tescase/Quote_9/file.c
- switch to IDE and observe that after delay file.c appears in Favorites view
- open project testcase/quote_9_1
-- make sure that file.c is visible in Project and Files view under "Quote_9" folder
- externally create file tescase/Quote_9/file2.c and switch back to IDE
=> file2.c is not visible in any of views (projects/files/favorites)
One more strange thing:
- if close project => exception appears http://netbeans.org/bugzilla/show_bug.cgi?id=197008
Created attachment 107219 [details]
project to reproduce issue with recursive listeners on systems without native file liesteners support
Probably connected to bug 190462 or directly problem of bug 26230
ergonomics#19ceb32e9a7d (feel free to hg pull -r 19ceb32e9a7d http://hg.netbeans.org/ergonomics to test the change before it propagates).
looks like caused tests failures
1. everything works locally. It is going to be tough to find out where the problem is.
2. still, please verify the fix in real field
3. in case the test continues to fail, it is possible to comment out the assert for a while
4. next week I am on vactation - e.g. unlikely I will backport the fix myself.
Was broken, because deadlock does not support native listeners. I needed to disable the test in such case: ergonomics#deb68c4fd6e6
Jarda, the bug was *exactly* about systems without native listeners support. How test written for such case can be broken on system without native listeners support???
When there is a addRecursiveListener(dir), then the manual refresh skips files under dir on systems that support native listeners. That is what the test checks. But the test needs to be disabled on system that don't support native listeners (as in such case recursive listeners don't prevent manual refreshes).
verified in cnd-main
Please, integrate into release70
Transplanted into releases (branch release70):
could you please verify also in 7.0 post rc1 build and mark as verified? thanks in advance