Bug 441401 - Indexer crashes with an C++ UNC include path
Summary: Indexer crashes with an C++ UNC include path
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-indexer (show other bugs)
Version: 8.4.0   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-08 04:15 EDT by Emanuel Reisinger CLA
Modified: 2020-09-04 15:18 EDT (History)
1 user (show)

See Also:


Attachments
Eclipse .log (831.67 KB, application/octet-stream)
2014-08-08 04:15 EDT, Emanuel Reisinger CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emanuel Reisinger CLA 2014-08-08 04:15:18 EDT
Created attachment 245821 [details]
Eclipse .log

If an UNC path (\\Server\directory\to\include) is added to the C++ Include Paths (project properties->C/C++ General->Path and Symbols->Includes->GNU C++) the indexer crashes with a java.lang.NullPointerException.
UNC for C Includes works well.

The top of stack trace (Full stack trace attached - .log):
java.lang.NullPointerException
	at org.eclipse.remote.core.RemoteServicesUtils.toURI(RemoteServicesUtils.java:126)
	at org.eclipse.ptp.internal.rdt.sync.cdt.core.SyncUNCPathConverter.toURI(SyncUNCPathConverter.java:36)
	at org.eclipse.ptp.internal.rdt.sync.cdt.core.SyncUNCPathConverter.toURI(SyncUNCPathConverter.java:49)
	at org.eclipse.cdt.internal.core.UNCPathConverterImpl.toURI(UNCPathConverterImpl.java:89)
	at org.eclipse.cdt.internal.core.pdom.indexer.FileExistsCache.isFile(FileExistsCache.java:63)
	at org.eclipse.cdt.internal.core.pdom.indexer.ProjectIndexerInputAdapter.resolveIncludeFile(ProjectIndexerInputAdapter.java:114)
	at org.eclipse.cdt.internal.core.index.IndexBasedFileContentProvider.isIncludedWithPragmaOnceSemantics(IndexBasedFileContentProvider.java:113)

We are using Synchronized C/C++ Projects to develop (using Eclipse/CDT XLC/C++) an AIX server application on Windows PCs. It's not possible to use Eclipse on AIX side. Therefore coding on Windows and compiling (xlC) on AIX side. Because of this development environment it's necessary to include the header files from the AIX server via UNC path in Eclipse. What works for C Includes but not for C++ Includes since Luna. With Kepler it works for C++, too.

A workaround is to include the AIX header files through a windows network drive (e.g. Z:/includes). In a samba share (folder name includes) on AIX I created links to the required include directories and added the includes in Eclipse through the network drive.
Content of folder includes on AIX:
cxxtest -> /usr/cxxtest
informix_esql -> /informix/incl/esql
informix_public -> /informix/incl/public
optfree -> /opt/freeware/include
usr -> /usr/include
vacpp -> /usr/vacpp/include

Eclipse C++ Includes in Path and Symbols:
Z:/includes/usr                   instead of \\server\usr\include
Z:/includes/vacpp                 instead of \\server\usr\vacpp\include
Z:/includes/infromix_esql         instead of \\server\informix\incl\esql
Z:/includes/infromix_public       instead of \\server\informix\incl\public
Z:/includes/cxxtest               instead of \\server\usr\cxxtest
Z:/includes/optfree               instead of \\server\opt\freeware\include