Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323918 - [build] deleting a server leaves dangling references in the model
Summary: [build] deleting a server leaves dangling references in the model
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: 0.7   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-29 16:45 EDT by Benjamin Muskalla CLA
Modified: 2011-01-05 14:44 EST (History)
1 user (show)

See Also:


Attachments
mylyn/context/zip (47.40 KB, application/octet-stream)
2010-09-11 23:38 EDT, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Muskalla CLA 2010-08-29 16:45:58 EDT
Just deleted the my only repository and hit refresh in the build view. This is the output. Seems some jobs get cached even though the repository of them is gone. Not sure if this is related to bug 323917

org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The object 'org.eclipse.mylyn.builds.internal.core.BuildPlan@d854d8 (url: https://hudson.eclipse.org/hudson/job/cbi-amalgam-nightly/, name: cbi-amalgam-nightly, operations: [], elementStatus: null, refreshDate: Sun Aug 29 22:39:11 CEST 2010) (health: 80, id: cbi-amalgam-nightly, info: null, selected: true, summary: 1 out of the last 5 builds failed., state: STOPPED, status: FAILED, description: Nightly build using Dash Athena CBI, monitoring CVS every 6 hrs for changes


)' is not contained in a resource.
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.endSave(XMLSaveImpl.java:306)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:270)
	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLResourceImpl.java:206)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1406)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:993)
	at org.eclipse.mylyn.builds.internal.core.util.BuildModelManager.save(BuildModelManager.java:91)
	at org.eclipse.mylyn.internal.builds.ui.BuildsUiInternal.save(BuildsUiInternal.java:186)
	at org.eclipse.mylyn.internal.builds.ui.view.BuildsView$5.run(BuildsView.java:313)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3552)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3171)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	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:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	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:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Caused by: org.eclipse.emf.ecore.xmi.DanglingHREFException: The object 'org.eclipse.mylyn.builds.internal.core.BuildPlan@d854d8 (url: https://hudson.eclipse.org/hudson/job/cbi-amalgam-nightly/, name: cbi-amalgam-nightly, operations: [], elementStatus: null, refreshDate: Sun Aug 29 22:39:11 CEST 2010) (health: 80, id: cbi-amalgam-nightly, info: null, selected: true, summary: 1 out of the last 5 builds failed., state: STOPPED, status: FAILED, description: Nightly build using Dash Athena CBI, monitoring CVS every 6 hrs for changes


)' is not contained in a resource.
	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.handleDanglingHREF(XMLHelperImpl.java:760)
	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.getURIFragment(XMLHelperImpl.java:731)
	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.getIDREF(XMLHelperImpl.java:753)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveIDRefSingle(XMLSaveImpl.java:1972)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLSaveImpl.java:1318)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XMLSaveImpl.java:2685)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSaveImpl.java:1174)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSaveImpl.java:1035)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveContainedMany(XMLSaveImpl.java:2386)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLSaveImpl.java:1533)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XMLSaveImpl.java:2685)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.writeTopObject(XMLSaveImpl.java:680)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.traverse(XMLSaveImpl.java:588)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:256)
	... 35 more
Comment 1 Steffen Pingel CLA 2010-08-30 14:48:23 EDT
It looks like the cached build is still holding on to the plan but the plan no longer in the resource set. I guess builds should either be contained in plans or it needs to be ensured that all references are cleaned up properly.
Comment 2 Steffen Pingel CLA 2010-09-11 23:38:12 EDT
Added some logic that ensure consistency of the model on save. Eventually the model should be designed in a way that is always kept in a consistent state so this can be removed again.
Comment 3 Steffen Pingel CLA 2010-09-11 23:38:15 EDT
Created attachment 178695 [details]
mylyn/context/zip