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 203417 - AssertionError: not a file /home/anba/devel/HEAD/gen2/h/generated/ParxDefs.h
Summary: AssertionError: not a file /home/anba/devel/HEAD/gen2/h/generated/ParxDefs.h
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
: 197491 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-10 09:05 UTC by anba
Modified: 2012-03-28 16:40 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 181824


Attachments
stacktrace (6.51 KB, text/plain)
2011-10-10 09:06 UTC, anba
Details

Note You need to log in before you can comment on or make changes to this bug.
Description anba 2011-10-10 09:05:59 UTC
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)
Comment 1 anba 2011-10-10 09:06:03 UTC
Created attachment 111756 [details]
stacktrace
Comment 2 Alexander Simon 2011-10-17 10:43:46 UTC
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).
Comment 3 Vladimir Voskresensky 2011-10-17 14:23:21 UTC
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"
Comment 4 Vladimir Voskresensky 2011-10-17 16:32:44 UTC
I left assert, because find it useful and fixed logic with symlinks instead.
http://hg.netbeans.org/cnd-main/rev/bce956ea8d8c
Comment 5 anba 2011-10-18 05:24:52 UTC
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.
Comment 6 Vladimir Voskresensky 2011-10-18 09:51:24 UTC
Thanks. I will update assert check for that as well
Comment 7 Vladimir Voskresensky 2011-10-18 10:49:11 UTC
http://hg.netbeans.org/cnd-main/rev/522b0bb04c03
Comment 8 Quality Engineering 2011-10-18 14:14:25 UTC
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
Comment 9 Quality Engineering 2011-10-19 14:15:23 UTC
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
Comment 10 Vladimir Voskresensky 2012-03-28 16:40:16 UTC
*** Bug 197491 has been marked as a duplicate of this bug. ***