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 256125 - [newcodemodel] Exception: Can not resolve file by path in macro directive: [[230-269] annotation=null/home/alsimon/NetBeansProjects/clucene-core-0.9.21b/src/CLucene/config/gunichartables.h #define G_UNICODE_MAX_TABL
Summary: [newcodemodel] Exception: Can not resolve file by path in macro directive: [[...
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-23 07:27 UTC by Alexander Simon
Modified: 2016-01-29 15:04 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 220722


Attachments
stacktrace (3.52 KB, text/plain)
2015-10-23 07:27 UTC, Alexander Simon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2015-10-23 07:27:43 UTC
Build: NetBeans IDE 8.1 (Build 20151023-7a65c9f583b6)
VM: Java HotSpot(TM) 64-Bit Server VM, 1.9.0-ea-b81, Java(TM) SE Runtime Environment, 1.9.0-ea-b81
OS: SunOS

User Comments:
alexvsimon: close project while test error highligting




Stacktrace: 
java.lang.Exception: Can not resolve file by path in macro directive: [[230-269] annotation=null/home/alsimon/NetBeansProjects/clucene-core-0.9.21b/src/CLucene/config/gunichartables.h #define G_UNICODE_MAX_TABLE_INDEX] used at [654328-654353] in file [PARSED FileImpl @1436042093:1217234878 /home/alsimon/NetBeansProjects/clucene-core-0.9.21b/src/CLucene/config/gunichartables.h prj:1318833356KeyBasedUID on ProjectKey /home/alsimon/NetBeansProjects/clucene-core-0.9.21b/N/ NOT_BEING_PARSED valid=true] included from [PARSED FileImpl @1436042093:1217234878 /home/alsimon/NetBeansProjects/clucene-core-0.9.21b/src/CLucene/config/gunichartables.h prj:1318833356KeyBasedUID on ProjectKey /home/alsimon/NetBeansProjects/clucene-core-0.9.21b/N/ NOT_BEING_PARSED valid=true]
@[Provider Unresolved Forward Declaration prosess /home/alsimon/NetBeansProjects/clucene-core-0.9.21b/src/CLucene/config/gunichartables.h (find declaration at /home/alsimon/NetBeansProjects/clucene-core-0.9.21b/src/CLucene/config/gunichartables.h[17,19], 
   at org.netbeans.modules.cnd.utils.CndUtils.severe(CndUtils.java:210)
   at org.netbeans.modules.cnd.utils.CndUtils.assertTrue(CndUtils.java:191)
   at org.netbeans.modules.cnd.modelimpl.parser.clank.MacroReference.createMacroReference(MacroReference.java:101)
   at org.netbeans.modules.cnd.modelimpl.parser.clank.ClankToCsmSupport.addMacroExpansions(ClankToCsmSupport.java:189)
   at org.netbeans.modules.cnd.modelimpl.parser.clank.ClankToCsmSupport.getMacroUsages(ClankToCsmSupport.java:164)
   at org.netbeans.modules.cnd.modelimpl.parser.clank.ClankTokenStreamProducer.getMacroUsages(ClankTokenStreamProducer.java:226)
Comment 1 Alexander Simon 2015-10-23 07:27:45 UTC
Created attachment 156927 [details]
stacktrace
Comment 2 Vladimir Kvashin 2015-12-21 11:56:24 UTC
It is uneasy to reproduce.

So far I was able to reproduce this via 2 ways:

1) by deleting the referenced file while error highlighting thread is suspended in debugger right before the assertion occurs.

2) by closing the dependent project that contains the file that contains macro definition.

Both scenarios models normal although infrequent situations, so this makes the assertion questionable. I'm going to change the processing of this error.
Comment 3 Vladimir Kvashin 2015-12-21 12:57:20 UTC
I would propose just to replace assertTrue with assertTrueInConsole
and also to add 
  if (TraceFlags.REPORT_PARSING_ERRORS || CndUtils.isUnitTestMode())
(so it will still be visible for us developers)
Comment 4 Vladimir Voskresensky 2015-12-21 13:00:54 UTC
I agree
Comment 5 Vladimir Kvashin 2015-12-22 16:02:14 UTC
pushed to enum:
  51a6c224f47b
Comment 6 Quality Engineering 2016-01-12 02:28:37 UTC
Integrated into 'main-silver', will be available in build *201601120002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/175a44e0a2ea
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: fixed #256125 - [newcodemodel] Exception: Can not resolve file by path in macro directive
(transplanted from 51a6c224f47b0b13b210f1ccc864f3097786bed8)
Comment 7 ilia 2016-01-27 14:54:04 UTC
  Fixes of this bug:
    http://hg.netbeans.org/releases/rev/51a6c224f47b