Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333293 - [Dawn] DawnDiagramUpdater throws SWTException
Summary: [Dawn] DawnDiagramUpdater throws SWTException
Status: CLOSED WORKSFORME
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.dawn (show other bugs)
Version: 4.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Martin Fluegge CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
: 339661 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-12-29 05:04 EST by Martin Fluegge CLA
Modified: 2012-09-21 06:49 EDT (History)
0 users

See Also:


Attachments
Patch v1 - for future reference (1.29 KB, patch)
2010-12-29 05:06 EST, Martin Fluegge CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Fluegge CLA 2010-12-29 05:04:44 EST
When updating the changes from a remote network the DawnDiagramUpdater throws a SWTException because the data manipulation is not done in the correct displays thread. This problem occurs even on simple operations like moving a node. Surprisingly this only occurs on the new Ecore Diagram editor. So it might be that the problem is related to the fact that the GMF diagram is generated on an older version of GMF (I think 2.0 or 2.1)

org.eclipse.swt.SWTException: Invalid thread access
	at org.eclipse.swt.SWT.error(SWT.java:4091)
	at org.eclipse.swt.SWT.error(SWT.java:4006)
	at org.eclipse.swt.SWT.error(SWT.java:3977)
	at org.eclipse.swt.widgets.Display.error(Display.java:1250)
	at org.eclipse.swt.widgets.Display.checkDevice(Display.java:756)
	at org.eclipse.swt.widgets.Display.getHighContrast(Display.java:1833)
	at org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure.setGradientData(NodeFigure.java:365)
	at org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart.setBackgroundColor(ShapeNodeEditPart.java:289)
	at org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart.refreshBackgroundColor(ShapeNodeEditPart.java:260)
	at org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeEditPart.refreshVisuals(ShapeEditPart.java:206)
	at org.eclipse.gmf.runtime.diagram.ui.editparts.NoteEditPart.refreshVisuals(NoteEditPart.java:267)
	at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:717)
	at org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:633)
	at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.access$3(GraphicalEditPart.java:1)
	at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart$3.run(GraphicalEditPart.java:861)
	at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
	at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.refresh(GraphicalEditPart.java:851)
	at org.eclipse.emf.cdo.dawn.util.DawnDiagramUpdater.refeshEditpartInternal(DawnDiagramUpdater.java:142)
	at org.eclipse.emf.cdo.dawn.util.DawnDiagramUpdater.refeshEditpartInternal(DawnDiagramUpdater.java:167)
	at org.eclipse.emf.cdo.dawn.util.DawnDiagramUpdater.refreshEditPart(DawnDiagramUpdater.java:72)
	at org.eclipse.emf.cdo.dawn.util.DawnDiagramUpdater$2.run(DawnDiagramUpdater.java:83)
	at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
	at org.eclipse.emf.cdo.dawn.util.DawnDiagramUpdater.refreshEditPart(DawnDiagramUpdater.java:79)
	at org.eclipse.emf.cdo.dawn.notifications.impl.DawnGMFHandler.handleObject(DawnGMFHandler.java:235)
	at org.eclipse.emf.cdo.dawn.notifications.impl.DawnGMFHandler.handleViewInvalidationEvent(DawnGMFHandler.java:78)
	at org.eclipse.emf.cdo.dawn.notifications.BasicDawnListener.notifyEvent(BasicDawnListener.java:61)
	at org.eclipse.net4j.util.event.Notifier.fireEventSafe(Notifier.java:133)
	at org.eclipse.net4j.util.event.Notifier.fireEvent(Notifier.java:97)
	at org.eclipse.emf.internal.cdo.view.CDOViewImpl.fireInvalidationEvent(CDOViewImpl.java:441)
	at org.eclipse.emf.internal.cdo.view.CDOViewImpl.invalidate(CDOViewImpl.java:387)
	at org.eclipse.emf.internal.cdo.session.CDOSessionImpl$InvalidationRunnable.invalidateView(CDOSessionImpl.java:1760)
	at org.eclipse.emf.internal.cdo.session.CDOSessionImpl$InvalidationRunnable.run(CDOSessionImpl.java:1742)
	at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:26)
	at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:1)
	at org.eclipse.net4j.util.concurrent.QueueWorker.work(QueueWorker.java:75)
	at org.eclipse.net4j.util.concurrent.Worker$WorkerThread.run(Worker.java:206)
Comment 1 Martin Fluegge CLA 2010-12-29 05:06:41 EST
Created attachment 185869 [details]
Patch v1 - for future reference

The attached patch solves the issue but I need to have a closer look to the problem and find out why it does not occur on Acore diagram.
Comment 2 Martin Fluegge CLA 2011-04-16 11:30:39 EDT
*** Bug 339661 has been marked as a duplicate of this bug. ***
Comment 3 Eike Stepper CLA 2011-06-23 04:26:57 EDT
Moving all open problem reports to 4.0
Comment 4 Martin Fluegge CLA 2011-10-26 11:53:19 EDT
As this error did not occur for nearly a year I resolve this bug as WORKSFORME.
Comment 5 Eike Stepper CLA 2012-09-21 06:49:59 EDT
Closing.