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 177622 - Standard headers are shown with unresolved include references in Ubuntu 9.10
Summary: Standard headers are shown with unresolved include references in Ubuntu 9.10
Status: RESOLVED WORKSFORME
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 6.x
Hardware: PC All
: P3 normal with 1 vote (vote)
Assignee: nnnnnk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-25 12:03 UTC by _ gordonp
Modified: 2010-05-13 04:47 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ gordonp 2009-11-25 12:03:05 UTC
I just recreated some projects using a nightly from 11/23. When I
open many files (both C and C++) I get includes with yellow unresolved
icons (text is "There are unresolved includes inside <xxx> ...").

I've seen this for <string.h>, <syslog.h>, <sys/types.h>, and
<sys/stat.h>.

After Ctrl-clicking on the unresolved headers, I traverse to a point
where it looks like code assistance is confused by <features.h> and
<sys/cdefs.h> (both include the other in guarded conditional includes).

I duplicated this in new sample apps the 1st time I tried, but not
the 2nd time I tried. So its possible you won't see this 100% of the
time. Is probably related to this Linux version (or possibly the GNU
gcc/g++ version which is 4.4.1).
Comment 1 rwerp 2010-01-03 17:42:49 UTC
I have the same problem under Windows, when using the Cygwin C++ toolchain (gcc 4.3.4).
Comment 2 nnnnnk 2010-04-22 21:24:35 UTC
I'd created all sample projects om my Ubuntu 9.10 with gcc 4.4.1 and opened all source files.
Everything was fine.

Then I opened old project and saw something similar.
And it seems that the reason is the file with whitespace in the name.

See log:
Getting files from project system for CppApplication_4...
Getting files from project system took  0 ms for CppApplication_4
FILES COUNT for CppApplication_4:
Source files:	1
Header files:	0
Total files:	1
Waited on disposeLock: 0 ms for CppApplication_4
FILLING PARSER QUEUE took 12 ms for CppApplication_4
java.lang.IllegalStateException: Empty preprocessor handlers for /home/nick/NetBeansProjects/CppApplication_2/test File.cpp
	at org.netbeans.modules.cnd.modelimpl.impl.services.FileInfoQueryImpl.getMacroUsages(FileInfoQueryImpl.java:248)
	at org.netbeans.modules.cnd.highlight.semantic.ModelUtils.getMacroBlocks(ModelUtils.java:111)
	at org.netbeans.modules.cnd.highlight.semantic.SemanticEntitiesProvider$4.getBlocks(SemanticEntitiesProvider.java:150)
	at org.netbeans.modules.cnd.highlight.semantic.SemanticHighlighter.update(SemanticHighlighter.java:195)
	at org.netbeans.modules.cnd.highlight.semantic.SemanticHighlighter.update(SemanticHighlighter.java:161)
	at org.netbeans.modules.cnd.highlight.semantic.SemanticHighlighter.run(SemanticHighlighter.java:295)
	at org.netbeans.modules.cnd.model.tasks.CsmFileTaskFactory$5.run(CsmFileTaskFactory.java:466)
	at org.netbeans.modules.cnd.model.tasks.CsmFileTaskFactory$CsmSafeRunnable.run(CsmFileTaskFactory.java:483)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1413)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1952)
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Resolving dependencies took: 2 ms
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Complete indexing of 0 binary roots took: 0 ms
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Complete indexing of 0 source roots took: 0 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Resolving dependencies took: 11 ms
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Complete indexing of 0 binary roots took: 0 ms
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: jar:file:/var/tmp/nick/nb-copy/ide/jsstubs/allstubs.zip!/ took: 202 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Complete indexing of 1 source roots took: 202 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
java.lang.IllegalStateException: Empty preprocessor handlers for /home/nick/NetBeansProjects/CppApplication_2/Test.cpp
	at org.netbeans.modules.cnd.modelimpl.impl.services.FileInfoQueryImpl.getMacroUsages(FileInfoQueryImpl.java:248)
	at org.netbeans.modules.cnd.highlight.semantic.ModelUtils.getMacroBlocks(ModelUtils.java:111)
	at org.netbeans.modules.cnd.highlight.semantic.SemanticEntitiesProvider$4.getBlocks(SemanticEntitiesProvider.java:150)
	at org.netbeans.modules.cnd.highlight.semantic.SemanticHighlighter.update(SemanticHighlighter.java:195)
	at org.netbeans.modules.cnd.highlight.semantic.SemanticHighlighter.update(SemanticHighlighter.java:161)
	at org.netbeans.modules.cnd.highlight.semantic.SemanticHighlighter.run(SemanticHighlighter.java:295)
	at org.netbeans.modules.cnd.model.tasks.CsmFileTaskFactory$5.run(CsmFileTaskFactory.java:466)
	at org.netbeans.modules.cnd.model.tasks.CsmFileTaskFactory$CsmSafeRunnable.run(CsmFileTaskFactory.java:483)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1413)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1952)
Comment 3 _ gordonp 2010-05-12 18:07:54 UTC
> And it seems that the reason is the file with whitespace in the name

When I reported this it was not in project(s) with embedded spaces.
Comment 4 Vladimir Voskresensky 2010-05-13 04:47:50 UTC
Hi Gordon,
We can not reproduce it. Can you try dev bits to check if it's gone.
Thanks,
Vladimir.