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 244445, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related. Build: NetBeans IDE Dev (Build 201501120001) VM: Java HotSpot(TM) 64-Bit Server VM, 24.45-b08, Java(TM) SE Runtime Environment, 1.7.0_45-b18 OS: Windows 7 User Comments: GUEST: first run of nighly build Stacktrace: java.lang.AssertionError: Path must be absolute: Y:/src/buildroot-at91/output/staging/usr/include at org.netbeans.modules.remote.impl.RemoteLogger.assertTrue(RemoteLogger.java:125) at org.netbeans.modules.remote.impl.fs.RemoteFileSystemProvider.toURL(RemoteFileSystemProvider.java:333) at org.netbeans.modules.remote.spi.FileSystemProvider.toUrl(FileSystemProvider.java:356) at org.netbeans.modules.cnd.remote.fs.CndFileSystemProviderImpl.toUrlImpl(CndFileSystemProviderImpl.java:114) at org.netbeans.modules.cnd.spi.utils.CndFileSystemProvider$DefaultProvider.toUrlImpl(CndFileSystemProvider.java:447) at org.netbeans.modules.cnd.spi.utils.CndFileSystemProvider.toUrl(CndFileSystemProvider.java:158)
Created attachment 151481 [details] stacktrace
Volodya, please take a look
I can easily reproduce my case (with empty path): open a full remote project and add "/" as include path, that's it. The stack that converts "/" into "" is: "CreateFilesWorker A00 [vkvashin@localhost:23]" at org.netbeans.modules.dlight.libs.common.PathUtilities.normalizeUnixPath(PathUtilities.java:119) at org.netbeans.modules.remote.impl.fs.RemoteFileSystem.normalizeAbsolutePath(RemoteFileSystem.java:284) at org.netbeans.modules.remote.impl.fs.RemoteFileSystemProvider.normalizeAbsolutePath(RemoteFileSystemProvider.java:92) at org.netbeans.modules.remote.spi.FileSystemProvider.normalizeAbsolutePath(FileSystemProvider.java:173) at org.netbeans.modules.cnd.remote.fs.CndFileSystemProviderImpl.normalizeAbsolutePathImpl(CndFileSystemProviderImpl.java:135) at org.netbeans.modules.cnd.spi.utils.CndFileSystemProvider$DefaultProvider.normalizeAbsolutePathImpl(CndFileSystemProvider.java:497) at org.netbeans.modules.cnd.spi.utils.CndFileSystemProvider.normalizeAbsolutePath(CndFileSystemProvider.java:186) at org.netbeans.modules.cnd.utils.cache.CndFileUtils.normalizeAbsolutePath(CndFileUtils.java:321) at org.netbeans.modules.cnd.utils.FSPath.<init>(FSPath.java:78) at org.netbeans.modules.cnd.makeproject.api.configurations.Item.getUserIncludePaths(Item.java:722) at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase.getIncludeHandler(ProjectBase.java:1457) at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase.createPreprocHandler(ProjectBase.java:1449) at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase.preCreateIfNeed(ProjectBase.java:1153) at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectBase.createIfNeed(ProjectBase.java:1161) at org.netbeans.modules.cnd.modelimpl.csm.core.CreateFilesWorker$CreateFileRunnable.createProjectFilesIfNeedRun(CreateFilesWorker.java:230) at org.netbeans.modules.cnd.modelimpl.csm.core.CreateFilesWorker$CreateFileRunnable.run(CreateFilesWorker.java:189) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443) at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
I guess situation with non-absolute (from remote point of view) path "Y:/src/buildroot" can be reproduced if we add "Y:/src/buildroot" to include paths. The issue here is that Item.getUserIncludePaths() uses not CndFileSystemProvider.isAbsolute(fileSystem, p), but CndPathUtilities.isPathAbsolute(p), which is incorrect
http://hg.netbeans.org/cnd-main/rev/f3ff6cec1ed6
Sorry, why did you introduce new method "isPathAbsolute(FileSystem fs, String path)": public static boolean isPathAbsolute(FileSystem fs, String path) { return CndFileSystemProvider.isAbsolute(fs, path); } The class already had the method: public static boolean isAbsolute(FileSystem fileSystem, String path) { return CndFileSystemProvider.isAbsolute(fileSystem, path); } Please redo the fix. By the way you forgot to increment spec version.
(In reply to Alexander Simon from comment #6) > why did you introduce new method > public static boolean isPathAbsolute(FileSystem fs, String path) { > ... > The class already had the method: > public static boolean isAbsolute(FileSystem fileSystem, String path) { > ... That was done with intent. The problem is that we have isAbsolute(String) method. Intent was to make each one who sees isAbsolute(String) in completion list see isAbsolute(FileSystem, String) right near, to help him/her to make proper choice. In theory, I could remove old method at all, but there are abut 100 (sic!) modules that depend on cnd.util, including external microchip ones - so such refactoring could be quite painful. And I've just pushed spec version increment - thanks for letting me know http://hg.netbeans.org/cnd-main/rev/1cfcb9b1d0c8
Integrated into 'main-silver', will be available in build *201506230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/f3ff6cec1ed6 User: Vladimir Kvashin <vkvashin@netbeans.org> Log: fixed #249777 - AssertionError: Path must be absolute: Y:/src/buildroot-at91/output/staging/usr/include