Bug 44196 - [Readme] Eclipse freezes running ant script using "Run Ant..."
Summary: [Readme] Eclipse freezes running ant script using "Run Ant..."
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 2.1.1   Edit
Hardware: PC Windows 98
: P3 normal (vote)
Target Milestone: 3.0 RC4   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords: readme
: 49460 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-10-05 04:45 EDT by Jörn Guy Süß CLA
Modified: 2004-08-05 11:17 EDT (History)
2 users (show)

See Also:


Attachments
Build file causing eclipse to freeze (original) (27.23 KB, text/xml)
2003-10-06 15:47 EDT, Jörn Guy Süß CLA
no flags Details
library file used to cause inconsistency and error message in configuration dialog (111.08 KB, application/x-zip-compressed)
2003-10-13 07:33 EDT, Jörn Guy Süß CLA
no flags Details
DTD referred to by problematic build.xml (129.48 KB, text/xml)
2003-10-28 05:46 EST, Jörn Guy Süß CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jörn Guy Süß CLA 2003-10-05 04:45:41 EDT
Using the context menu, "Run Ant..." is executed on a build file. 
A "command.com" shell window appears and holds the focus. Eclipse is blocked 
and can only be aborted using task manager or Process Viewer (pview.exe)

Additional info:
-This behavior has been verfified with ant-related environment variables 
removed from the environment.
-Buffers for execution are provided: shell=c:\command.com /p /e:32000
- Using "Run->External tools->build.xml" the shell window flashes and disappears

Hypothesis:
Path information is not set up correctly or mangled due to a W2k /W98 shell 
inconsistency. Context menu launches blocking using System.exec, Menu launches 
in a thread.
Comment 1 Darin Swanson CLA 2003-10-06 11:03:41 EDT
Can you provide the sample build.xml file?
Comment 2 Jörn Guy Süß CLA 2003-10-06 15:47:21 EDT
Created attachment 6341 [details]
Build file causing eclipse to freeze (original)

This is the unedited version. As another test,	I have removed all targets from
the file. Yo and behold! The interface starts up correctly... Will make some
further tests.
Comment 3 Darin Swanson CLA 2003-10-07 17:56:50 EDT
I cannot reproduce on Win 2000 using the supplied buildfile.
Can you please give the exact steps you are using?
The "Run Ant..." context menu entry only realizes the launch configuration 
dialog...it does not run the build. I can realize the launch configuration 
dialog for this build file.
Comment 4 Jörn Guy Süß CLA 2003-10-08 05:15:48 EDT
To be precise: The _configuration dialog_ does not appear and causes the 
freeze. STEPS:

1) Run IDE
2) Switch to Resource Perspective or Diplay it, Deselect Working Sets if in 
effect
3) Right click on build.xml to display Context Menu
4) Select "Run Ant..." with a left click

Effect: command.com shell window opens in foreground, application freezes and 
is listed as "Not Responding" in Task Manager

If I take out all the tasks, leaving just the project element, the dialog 
appears. There are 192 MB physical RAM available on my machine. Would the 
dialog fail if the task ran out of mem?
Comment 5 Darin Swanson CLA 2003-10-08 12:08:30 EDT
Yes...we essentially configure for an Ant build to parse the Ant targets in 
the build file to display in the launch configuration dialog. This loads a 
fair number of classes.

Does this happen every X times?
We do have bug 24448 which explains the current set of known memory problems 
and workarounds.
Comment 6 Jörn Guy Süß CLA 2003-10-08 13:06:11 EDT
No, it happens everytime. I have tried unloading everything that is not 
essential but to no avail. I know that ant is leaking as I have taken to using 
Eclipse under Solaris. If the process sizes are similar, I should still be in 
within bounds on my Limbos 98 system. I will try with a slimmed down version of 
the file. If that succeeds, I will report. 
Comment 7 Jörn Guy Süß CLA 2003-10-11 11:21:51 EDT
News: If the ant libraries are inconsistent, the configuration dialog launches 
quickly and correctly, indicating the failure condition. Assuming that the 
build is probably launched in an external VM using System.exec, the difference 
in command line quoting between W98 and W2k could be responsible for the 
failing launch. Is there any chance to get a glimpse at the command line, maybe 
from a log file?
Comment 8 Darin Swanson CLA 2003-10-12 21:26:07 EDT
In 2.1.1 Ant is always launched within the same VM as Eclipse....no 
Runtime.exec.
After a build, look in the debug view, select the Ant build, right click, 
Properties and you can have a look at the classpath etc that is used for the 
Ant build that occurs in the same VM as Eclipse.

What does "ant libraries are inconsistent" mean?
Comment 9 Jörn Guy Süß CLA 2003-10-13 07:30:45 EDT
Using: Window (Menu) -> Preferences -> Ant -> Runtime, I added xml_apis.jar 
(attached) to the "Runtime classpath" by mistake, trying to rule out classpath 
inconsistencies. With this setting, the configuration dialog apears and 
displays an error in the top line: "(class: org/apache/xerces/parsers ... 
method: configurePipeline ()V) Incompatible type for getting or setting field"
as would be expected, because of incompatible (inconsistent) library versions.
So I can see the dialog, but I cannot build. If I remove the problem by taking 
out the library, the dialog does not appear and the eclipse freezes as 
described earlier. Thus, I also cannot access the classpath information 
recorded in Debug , because I cannot perform a build.
Comment 10 Jörn Guy Süß CLA 2003-10-13 07:33:33 EDT
Created attachment 6411 [details]
library file used to cause inconsistency and error message in configuration dialog
Comment 11 Darin Swanson CLA 2003-10-22 14:13:42 EDT
Adding the Xerces JARs to the Ant runtime classpath will always cause 
trouble..see the Eclipse readme, known issues section.

I am suspious of the ant.dtd.
Can you provide this?
Can you try the buildfile without this line?
<!DOCTYPE project SYSTEM "file:./etc/ant/ant.dtd">
Can you try on a Eclipse 3.0 stream build (M4?)


Comment 12 Jörn Guy Süß CLA 2003-10-28 05:46:38 EST
Created attachment 6565 [details]
DTD referred to by problematic build.xml
Comment 13 Jörn Guy Süß CLA 2003-10-28 05:48:13 EST
I have tried Eclipse 3.0 stream build (M4), same problem occurs, except that a 
process indicator panel opens before the command.com window opens.
Comment 14 Jörn Guy Süß CLA 2003-11-01 17:52:16 EST
I have found the source of the error in the build file. It was the line:
<property environment="env"/>
that caused the freeze. Seems to be a real W9X-problem, since invocation of sub-
shells is well-defined on other systems. I removed the line and fixed 
dependencies. It works fine now. Anything else I could contribute?
Comment 15 Darin Swanson CLA 2003-11-01 18:25:28 EST
Thanks Jorn.

We will add a readme item if we still claim to support Win98 for 3.0.
Comment 16 Darin Swanson CLA 2004-01-02 12:12:19 EST
*** Bug 49460 has been marked as a duplicate of this bug. ***
Comment 17 Sebastian Davids CLA 2004-02-08 10:50:34 EST
I filed a PR with ANT for <property environment="env"/>; they try to gather the
environment variables in the wrong way.

http://issues.apache.org/bugzilla/show_bug.cgi?id=26770
Comment 18 Darin Swanson CLA 2004-06-22 17:04:24 EDT
Added to the Ant readme.
Comment 19 Darin Swanson CLA 2004-06-22 17:04:38 EDT
Please verify DarinW.
Comment 20 Darin Wright CLA 2004-08-05 11:17:22 EDT
Verified.