Project: Birt
Bug 274785 Editing Crosstab Aggregation binding for several times will lead OutofMemory
Reported: 2009-05-04 03:43:14 | Status: verified fixed

Description: Editing Crosstab Aggregation binding for several times will lead OutofMemory Build number: 2.5.0.v20090504-0630 Steps to reproduce: 1, New a crosstab 2, New a Aggregation binding 3, Edit it or reopen it for several times 4, check the memory usage of eclipse in Windows Task Manager after each editing Actual result: After several operation in step3 OutofMemory happened. Error log: java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Unknown Source) at java.util.Timer.<init>(Unknown Source) at java.util.Timer.<init>(Unknown Source) at org.eclipse.birt.data.engine.impl.DataEngineSession.<init>(DataEngineSession.java:95) at org.eclipse.birt.data.engine.impl.DataEngineImpl.<init>(DataEngineImpl.java:111) at org.eclipse.birt.data.engine.impl.DataEngineFactory.createDataEngine(DataEngineFactory.java:46) at org.eclipse.birt.data.engine.api.DataEngine.newDataEngine(DataEngine.java:155) at org.eclipse.birt.data.engine.api.DataEngine.newDataEngine(DataEngine.java:133) at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.<init>(DataRequestSessionImpl.java:135) at org.eclipse.birt.report.data.adapter.impl.DataAdapterFactory.createSession(DataAdapterFactory.java:30) at org.eclipse.birt.report.data.adapter.api.DataRequestSession.newSession(DataRequestSession.java:78) at org.eclipse.birt.report.data.adapter.api.DataRequestSession.newSession(DataRequestSession.java:61) at org.eclipse.birt.report.designer.data.ui.util.DataUtil.getAggregationManager(DataUtil.java:59) at org.eclipse.birt.report.designer.internal.ui.views.attributes.provider.DataSetColumnBindingsFormHandleProvider.getColumnText(DataSetColumnBindingsFormHandleProvider.java:271) at org.eclipse.birt.report.designer.internal.ui.views.attributes.widget.SortingFormPropertyDescriptor$FormLabelProvider.getColumnText(SortingFormPropertyDescriptor.java:767) at org.eclipse.jface.viewers.TableColumnViewerLabelProvider.update(TableColumnViewerLabelProvider.java:70) at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:145) at org.eclipse.jface.viewers.AbstractTableViewer.doUpdateItem(AbstractTableViewer.java:399) at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:481) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.runtime.Platform.run(Platform.java:888) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2111) at org.eclipse.jface.viewers.AbstractTableViewer.internalRefreshAll(AbstractTableViewer.java:752) at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:649) at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:636) at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:1457) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1392) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1353) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1455) at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:537) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1414) at org.eclipse.birt.report.designer.internal.ui.views.attributes.widget.SortingFormPropertyDescriptor.postElementEvent(SortingFormPropertyDescriptor.java:916) at org.eclipse.birt.report.designer.internal.ui.views.attributes.page.BindingPage.postElementEvent(BindingPage.java:152) at org.eclipse.birt.report.designer.internal.ui.editors.parts.event.ModelEventManager.postModelEvent(ModelEventManager.java:123) at org.eclipse.birt.report.designer.internal.ui.editors.parts.event.ModelEventManager.postEvent(ModelEventManager.java:97) at org.eclipse.birt.report.designer.internal.ui.editors.parts.event.ModelEventManager.access$0(ModelEventManager.java:89) at org.eclipse.birt.report.designer.internal.ui.editors.parts.event.ModelEventManager$1.stackChanged(ModelEventManager.java:57) at org.eclipse.birt.report.model.activity.ActivityStack.sendNotifcations(ActivityStack.java:870) at org.eclipse.birt.report.model.activity.ActivityStack.commit(ActivityStack.java:740) at org.eclipse.birt.report.designer.internal.ui.views.attributes.provider.AbstractSortingFormHandleProvider.edit(AbstractSortingFormHandleProvider.java:73) at org.eclipse.birt.report.designer.internal.ui.views.attributes.widget.SortingFormPropertyDescriptor.edit(SortingFormPropertyDescriptor.java:456) at org.eclipse.birt.report.designer.internal.ui.views.attributes.widget.SortingFormPropertyDescriptor.handleTableMouseDoubleClickEvent(SortingFormPropertyDescriptor.java:834) at org.eclipse.birt.report.designer.internal.ui.views.attributes.widget.SortingFormPropertyDescriptor$4.mouseDoubleClick(SortingFormPropertyDescriptor.java:340) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:183) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311)

Files changed in fix:
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/data/ui/util/DataUtil.java