Community
Participate
Working Groups
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.
Can you provide the sample build.xml file?
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.
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.
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?
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.
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.
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?
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?
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.
Created attachment 6411 [details] library file used to cause inconsistency and error message in configuration dialog
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?)
Created attachment 6565 [details] DTD referred to by problematic build.xml
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.
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?
Thanks Jorn. We will add a readme item if we still claim to support Win98 for 3.0.
*** Bug 49460 has been marked as a duplicate of this bug. ***
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
Added to the Ant readme.
Please verify DarinW.
Verified.