Community
Participate
Working Groups
Build ID: eclipse.buildId=I20070517-1700 Steps To Reproduce: 1. Create managed build project with name "Hello Japan" 2. Create sample application Hello World and build 3. Set breakpoint and attempt to start debugging Expected result Debugging session starts Actual result: Error message (log below). More information: eclipse.buildId=I20070517-1700 java.version=1.6.0_01 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Framework arguments: -startup C:\Program Files\eclipse\plugins\org.eclipse.equinox.launcher_1.0.0.v20070516.jar Command-line arguments: -os win32 -ws win32 -arch x86 -startup C:\Program Files\eclipse\plugins\org.eclipse.equinox.launcher_1.0.0.v20070516.jar Error Wed Jun 06 11:37:50 PDT 2007 Failed to set program arguments, environment or working directory. org.eclipse.cdt.debug.core.cdi.CDIException: Unable to set working directory: "D:\\Profiles\\xfq473\\workspace\\Hello Japan": Invalid argument.[] at org.eclipse.cdt.debug.mi.core.cdi.model.RuntimeOptions.setWorkingDirectory(RuntimeOptions.java:108) at org.eclipse.cdt.launch.internal.LocalCDILaunchDelegate.setRuntimeOptions(LocalCDILaunchDelegate.java:418) at org.eclipse.cdt.launch.internal.LocalCDILaunchDelegate.launchLocalDebugSession(LocalCDILaunchDelegate.java:141) at org.eclipse.cdt.launch.internal.LocalCDILaunchDelegate.launchDebugger(LocalCDILaunchDelegate.java:105) at org.eclipse.cdt.launch.internal.LocalCDILaunchDelegate.launch(LocalCDILaunchDelegate.java:65) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:766) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:608) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:899) at org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlugin.java:1102) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Our handling of spaces in filenames has been weak, mainly because very few C/C++ developers do that (I guess they all have Unix backgrounds). We should address this accross the board, though.
As part of this review, the code should be tested for support of non-ASCII file names, e.g., 日本語.c
Well, it appears that we also need to upgrade Bugzilla. The example was a file name in Japanese.
I confirm this bug with Eclipse 3.5.2 on Ubuntu 10.10.
I get a different error, both when building and debugging. java.lang.IllegalArgumentException at java.net.URI.create(URI.java:859) at java.net.URI.resolve(URI.java:1045) at org.eclipse.cdt.managedbuilder.internal.core.AdditionalInput.getArtifactTimeStamp(AdditionalInput.java:383) at org.eclipse.cdt.managedbuilder.internal.core.AdditionalInput.needsRebuild(AdditionalInput.java:344) at org.eclipse.cdt.managedbuilder.internal.core.InputType.needsRebuild(InputType.java:1671) at org.eclipse.cdt.managedbuilder.internal.core.Tool.needsRebuild(Tool.java:3382) at org.eclipse.cdt.managedbuilder.internal.core.ToolChain.needsRebuild(ToolChain.java:2106) at org.eclipse.cdt.managedbuilder.internal.core.FolderInfo.needsRebuild(FolderInfo.java:346) at org.eclipse.cdt.managedbuilder.internal.core.Configuration.needsRebuild(Configuration.java:1733) at org.eclipse.cdt.managedbuilder.internal.core.Configuration.needsRebuild(Configuration.java:1716) <snip> Caused by: java.net.URISyntaxException: Illegal character in path at index 5: Hello Japan at java.net.URI$Parser.fail(URI.java:2825) at java.net.URI$Parser.checkChars(URI.java:2998) at java.net.URI$Parser.parseHierarchical(URI.java:3082) at java.net.URI$Parser.parse(URI.java:3040) at java.net.URI.<init>(URI.java:595) at java.net.URI.create(URI.java:857) ... 34 more
Created attachment 208073 [details] Use URIUtil to encode the URI before adding it to the base URI This patch fixes the URI error. I can now create a new project with spaces, run and debug without errors.
I was once told by a professor that the first thing he does when teaching students C programming (using the CDT) is to not put spaces in their project names. It would be great if this were fixed :)
That is in fact the exact reason why I'm fixing this bug, as I also teach C++ using the CDT :)
Note that the issue referred to in comment #5 was introduced fairly recently in CDT 8.0.2. In CDT 8.0.2 the failing method org.eclipse.cdt.managedbuilder.internal.core.AdditionalInput.getArtifactTimeStamp(IToolChain) was introduced.
(In reply to comment #9) > Note that the issue referred to in comment #5 was introduced fairly recently in > CDT 8.0.2. In CDT 8.0.2 the failing method > org.eclipse.cdt.managedbuilder.internal.core.AdditionalInput.getArtifactTimeStamp(IToolChain) > was introduced. (In reply to comment #9) > Note that the issue referred to in comment #5 was introduced fairly recently in > CDT 8.0.2. In CDT 8.0.2 the failing method > org.eclipse.cdt.managedbuilder.internal.core.AdditionalInput.getArtifactTimeStamp(IToolChain) > was introduced. That one is now fixed in 8.1.0, see Bug 377295.