Bug 26574 - OutOfMemoryError with AntView
Summary: OutOfMemoryError with AntView
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Ant-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: ui
Depends on:
Blocks:
 
Reported: 2002-11-18 03:59 EST by Bogdan Gourbich CLA
Modified: 2002-12-04 11:17 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bogdan Gourbich CLA 2002-11-18 03:59:40 EST
Hi , Eclipse team!
 At first, thanks for your work. Eclipse is effective tool for developers.

 I found the bug. 
 I heard about new ant tool in Eclipse and I wished to test it. So , I
downloaded Eclipse 2.1 M3.
 I create empty Java project , import build.xml from BEA Weblogivс 7.0 samples.
 That is :

<project name="jsp" default="all" basedir=".">

  <property environment="env"/>
  <property file="../../examples.properties"/>
  <property name="build.compiler" value="${JAVAC}"/>
  <property name="ejb_ear" value="ejb20_basic_beanManaged.ear"/>

  <!-- set global properties for this build -->
  <property name="source" value="."/>

  <target name="all" depends="copy"/>

  <target name="copy" depends="ejb_check, ejb_build">
    <copy todir="${EX_WEBAPP}">
      <fileset dir="${source}">
        <include name="*.jsp"/>
      </fileset>
    </copy>
  </target>
  
    <!-- Check for ejb.  This is required for the example.  -->
  <target name="ejb_check">
    <echo message="Checking for run dependencies"/>
    <available file="${APPLICATIONS}/${ejb_ear}" property="ejb.present"/>
  </target>

  <!-- Compiled ejb.  This is required for the example.  -->
  <target name="ejb_build" unless="ejb.present">
    <echo message="Building ${APPLICATIONS}/${ejb_ear}..."/>
    <ant dir="../ejb20/basic/beanManaged" antfile="build.xml" target="all"/>
  </target>

</project>


 After , I found Ant View and opened it. 
 I played about Ant View , opened targets, click on it  e.t.c  
 I did double  -  click in "ejb_check" , "ejb_build" , "copy" and "all" targets.
All was OK. Then I did right click and launch the "Refrech" command . After  I
observed CPU 100 % , Memory grew from ~25 Mb to 90 Mb during 10 seconds and
message window appeared to me "an OutOfMemoryError has occured " . I repeated
this sequence of operations once or twice. I constantly had "an OutOfMemoryError
has occured" 
   That is the contens of ".log" file :

!SESSION &#1085;&#1086;&#1103; 18, 2002 12:05:20.812 ---------------------------------------------
java.version=1.4.1_01
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=ru_RU
Command-line arguments: -os win32 -ws win32 -arch x86 -install
file:C:/Java/IBM/eclipse21M3/
!ENTRY org.eclipse.ui 4 4 &#1085;&#1086;&#1103; 18, 2002 12:05:20.812
!MESSAGE Unhandled exception caught in event loop.
!ENTRY org.eclipse.ui 4 0 &#1085;&#1086;&#1103; 18, 2002 12:05:20.828
!MESSAGE java.lang.OutOfMemoryError
!STACK 0
java.lang.OutOfMemoryError

 I hope this helps ,
 Bogdan
Comment 1 Saumendra Poddar CLA 2002-11-22 11:20:28 EST
I am frequently getting the following memory error message with M3

I am on a windows 2000 computer that has 520 mb of ram !!!
For a temporary workaround for this problem that I get, I start Eclipse:
C:\Eclipse\eclipse.exe -vmargs -Xmx256m
but it does not resolve the problem !!!!


"An out of memory error has occurred.
It is recommended to exit the workbench.
Subsequent errors may happen and may terminate the workbench without
warning.
See error log for more details.
Exit workspace?"


this is my log details

!ENTRY org.eclipse.ant.core 4 1 Nov 20, 2001 15:00:17.521
!MESSAGE file:D:/CodeStation/Workout10/src/build.xml:1: The default
attribute of project is required
!STACK 0
file:D:/CodeStation/Workout10/src/build.xml:1: The default attribute of
project is required
 at
org.apache.tools.ant.helper.ProjectHelperImpl.parse(ProjectHelperImpl.java:1
70)
 at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:117)
 at
org.eclipse.ant.internal.core.ant.InternalAntRunner.parseScript(InternalAntR
unner.java:273)
 at
org.eclipse.ant.internal.core.ant.InternalAntRunner.getTargets(InternalAntRu
nner.java:288)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.eclipse.ant.core.AntRunner.getAvailableTargets(AntRunner.java:202)
 at
org.eclipse.ui.externaltools.internal.ant.antview.views.AntViewContentProvid
er.parseAntBuildFile(AntViewContentProvider.java:203)
 at
org.eclipse.ui.externaltools.internal.ant.antview.views.AntViewContentProvid
er.initialize(AntViewContentProvider.java:188)
 at
org.eclipse.ui.externaltools.internal.ant.antview.views.AntViewContentProvid
er.getElements(AntViewContentProvider.java:77)
 at
org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.j
ava:393)
 at
org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren(AbstractTreeView
er.java:569)
 at
org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredVie
wer.java:342)
 at
org.eclipse.jface.viewers.StructuredViewer.getSortedChildren(StructuredViewe
r.java:443)
 at
org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeView
er.java:240)
 at
org.eclipse.jface.viewers.AbstractTreeViewer$2.run(AbstractTreeViewer.java:6
45)
 at
org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredVie
wer.java:684)
 at
org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged(AbstractTreeViewer
.java:637)
 at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:232)
 at
org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:87
1)
 at
org.eclipse.ui.externaltools.internal.ant.antview.views.AntView.createPartCo
ntrol(AntView.java:78)
 at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:135)
 at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java
:839)
 at org.eclipse.core.runtime.Platform.run(Platform.java:413)
 at org.eclipse.ui.internal.PartPane.createChildControl(PartPane.java:133)
 at org.eclipse.ui.internal.ViewPane.createChildControl(ViewPane.java:201)
 at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:177)
 at org.eclipse.ui.internal.ViewPane.createControl(ViewPane.java:180)
 at
org.eclipse.ui.internal.PartTabFolder.createPartTab(PartTabFolder.java:251)
 at
org.eclipse.ui.internal.PartTabFolder.replaceChild(PartTabFolder.java:689)
 at org.eclipse.ui.internal.PartTabFolder.replace(PartTabFolder.java:629)
 at
org.eclipse.ui.internal.PerspectivePresentation.addPart(PerspectivePresentat
ion.java:186)
 at org.eclipse.ui.internal.Perspective.showView(Perspective.java:1316)
 at
org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:555)
 at org.eclipse.ui.internal.WorkbenchPage.access$6(WorkbenchPage.java:534)
 at org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.java:2409)
 at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:65)
 at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:2406)
 at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:2396)
 at org.eclipse.ui.internal.ShowViewMenu.showOther(ShowViewMenu.java:181)
 at org.eclipse.ui.internal.ShowViewMenu.access$2(ShowViewMenu.java:167)
 at org.eclipse.ui.internal.ShowViewMenu$2.run(ShowViewMenu.java:41)
 at org.eclipse.jface.action.Action.runWithEvent(Action.java:769)
 at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(Action
ContributionItem.java:411)
 at
org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionCont
ributionItem.java:365)
 at
org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionI
tem.java:356)
 at
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(A
ctionContributionItem.java:48)
 at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77)
 at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825)
 at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1692)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1410)
 at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1435)
 at org.eclipse.ui.internal.Workbench.run(Workbench.java:1418)
 at
org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.jav
a:831)
 at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.eclipse.core.launcher.Main.basicRun(Main.java:247)
 at org.eclipse.core.launcher.Main.run(Main.java:703)
 at org.eclipse.core.launcher.Main.main(Main.java:539)
!ENTRY org.eclipse.ui 4 4 Nov 20, 2001 15:04:40.359
!MESSAGE Unhandled exception caught in event loop.
!ENTRY org.eclipse.ui 4 0 Nov 20, 2001 15:04:40.359
!MESSAGE java.lang.OutOfMemoryError
!STACK 0
java.lang.OutOfMemoryError


Can this be kindly be taken care !!!!
Comment 2 Jeff Duska CLA 2002-11-26 17:29:02 EST
I am not sure, if it is clear that this also happening in the Linux Motif 
M3 version of Eclipse. I've also noticed that it appears to happen more the 
first time the Ant View is shown. At least, this is when I seem to have the 
problem. 

For example, I just closed Eclipse. When I restarted Eclipse, I went into the 
AntView to rebuild the project.  The error occurred. 

HTH,

Jeff Duska
Comment 3 Darin Wright CLA 2002-12-04 11:17:04 EST
This is no longer relevant, as the Ant view has been re-written and no longer 
has a "refresh" button.