PR# 11834 Target Output misbehaves if .exe suffix is given

Problem Report Summary
Submitter: peter_gummer
Category: EiffelStudio
Priority: High
Date: 2007/01/15
Class: Bug
Severity: Serious
Number: 11834
Release: 5.7.65008
Confidential: No
Status: Closed
Responsible:
Environment: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1
Synopsis: Target Output misbehaves if .exe suffix is given

Description
The steps below produce an error dialog:

  Cannot load the program "C:\bug\EIFGENs\bug\W_code\x.exe"

The reason is that the generated program is actually "C:\bug\EIFGENs\bug\W_code\x.exe.exe".

After spending hours tracking down the cause of a run-time bug to this, I isolated it to this in my ECF:

  <setting name="executable_name" value="x.exe"/>

I have fixed it by doing this instead:

  <setting name="executable_name" value="x"/>

Perhaps this is by design, but it's a real gotcha. At the very least the on-line help should state that the executable name should not include the suffix; but even so it would have taken me hours to figure this out. I believe it should optionally accept a .exe or .dll suffix.
To Reproduce
1. Create a directory "C:\bug".

2. Save "C:\bug\root_class.e":

  class ROOT_CLASS end

3. Save "C:\bug\bug.ecf":

<?xml version="1.0" encoding="ISO-8859-1"?><system xmlns="http://www.eiffel.com/developers/xml/configuration-1-0-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-0-0 http://www.eiffel.com/developers/xml/configuration-1-0-0.xsd" name="bug" uuid="D162B005-1528-4A90-ADC7-D75AD71199A4">
	<target name="bug">
		<root class="ROOT_CLASS"/>
		<option warning="true">
			<assertions precondition="true" postcondition="false" check="false" invariant="false" loop="false"/>
		</option>
		<setting name="executable_name" value="x.exe"/>
		<precompile name="base_pre" location="$ISE_PRECOMP\base.ecf"/>
		<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
		<cluster name="root_cluster" location=".\" recursive="true"/>
	</target>
</system>

4. Double-click "bug.ecf".

5. In the Choose Your Directory dialog, click OK.

6. After it compiles, hit F5 to run it. You will see the error message.
Problem Report Interactions
From:misterieking    Date:2009/07/09    Status: Closed    Download   
This issue is now fixed, thanks for the report.