Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347499 - Hard lock when creating new C/C++ project
Summary: Hard lock when creating new C/C++ project
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 8.0   Edit
Assignee: Anton Leherbauer CLA
QA Contact: Doug Schaefer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-27 14:27 EDT by simon468 CLA
Modified: 2011-05-31 10:23 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description simon468 CLA 2011-05-27 14:27:40 EDT
Build Identifier: 20110218-0911

Creating a C++ project will cause eclipse to lockup depending on the contents of your autorun.bat file.  I use autorun.bat so that I can have a few aliases in my command prompt.  Recently I added 'C:' as the first line so that new terminals would start pointed at my C drive.  After doing this I was not able to work with C\C++ projects.  I found that the following command is being issued when creating a C project or converting to a C project:

cmd /c set PROCESSOR_ARCHITECTURE

Having the 'C:' as the first command in the .bat file caused eclipse to hang on the above call and never come back.  I was able to fix this by adding '@echo off' at the beginning of my .bat file.  There should be some way to put a timeout on that system call.

It does not crash, it just sits waiting for that call to return.

Reproducible: Always

Steps to Reproduce:
1.  Create an autorun.bat file
2.  Set the following registry with the path to your autorun.bat file:
HKEY_CURRENT_USER\Software\Microsoft\Command Processor
2.  Verify that it is being read (maybe add a doskey command or something)
3.  Add a line at the beginning of the file that will change drives.
Example:
C:
4.  Start eclipse and try to create a new C/C++ project
Comment 1 Anton Leherbauer CLA 2011-05-30 06:46:44 EDT
(In reply to comment #0)
> cmd /c set PROCESSOR_ARCHITECTURE

I guess we should run 

  cmd /c /d set PROCESSOR_ARCHITECTURE

to avoid the auto run commands.
Comment 2 Anton Leherbauer CLA 2011-05-30 06:58:53 EDT
(In reply to comment #1)
>   cmd /c /d set PROCESSOR_ARCHITECTURE

or rather

  cmd /d /c set PROCESSOR_ARCHITECTURE
Comment 3 Anton Leherbauer CLA 2011-05-31 09:30:58 EDT
Fixed in HEAD.
Comment 4 CDT Genie CLA 2011-05-31 10:23:10 EDT
*** cdt cvs genie on behalf of aleherbau ***
Bug 347499 - Hard lock when creating new C/C++ project

[*] Platform.java 1.10 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/Platform.java?root=Tools_Project&r1=1.9&r2=1.10