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.
This bug was originally marked as duplicate of bug 196425, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related. Build: NetBeans IDE 7.1 Beta (Build 201109252201) VM: Java HotSpot(TM) Server VM, 20.2-b06, Java(TM) SE Runtime Environment, 1.6.0_27-b07 OS: Linux User Comments: anba: Compiling outside of IDE which creates the file name in the assertion. Stacktrace: java.lang.AssertionError: not a file /home/anba/devel/HEAD/gen2/h/generated/ParxDefs.h at org.netbeans.modules.cnd.apt.support.ResolvedPath.<init>(ResolvedPath.java:73) at org.netbeans.modules.cnd.apt.utils.APTIncludeUtils.resolveFilePath(APTIncludeUtils.java:113) at org.netbeans.modules.cnd.apt.impl.support.APTIncludeResolverImpl.resolveFilePath(APTIncludeResolverImpl.java:129) at org.netbeans.modules.cnd.apt.impl.support.APTIncludeResolverImpl.resolveInclude(APTIncludeResolverImpl.java:90) at org.netbeans.modules.cnd.apt.support.APTAbstractWalker.onInclude(APTAbstractWalker.java:100) at org.netbeans.modules.cnd.apt.support.APTWalker.onAPT(APTWalker.java:223)
Created attachment 111756 [details] stacktrace
Please remove wrong assert. Assert is wrong because last cached file state can differ from state of real file system (probably due to delaying of native file system notifications).
The problem is: - we have file.h which is link to ../include/orig_file.h - in file.cc we #include "file.h" => everything is OK then remove orig_file.h file and press space in file.cc => file.h exists, but it's not a file, because symlink is broken => assert "not a file"
I left assert, because find it useful and fixed logic with symlinks instead. http://hg.netbeans.org/cnd-main/rev/bce956ea8d8c
My original problem had nothing to do with synlinks. In my source code there is no symlink. This file is created during the compile process. If you try to edit during the compile process (e.g. because you need to compile outside of netbeans) this assertion may appear.
Thanks. I will update assert check for that as well
http://hg.netbeans.org/cnd-main/rev/522b0bb04c03
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/bce956ea8d8c User: Vladimir Voskresensky <vv159170@netbeans.org> Log: fixed #203417 - AssertionError: not a file /home/anba/devel/HEAD/gen2/h/generated/ParxDefs.h - broken symlink is treated as not existing file
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/522b0bb04c03 User: Vladimir Voskresensky <vv159170@netbeans.org> Log: fixed #203417 - AssertionError: not a file /home/anba/devel/HEAD/gen2/h/generated/ParxDefs.h - debug trace
*** Bug 197491 has been marked as a duplicate of this bug. ***