Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » NPE on diagram close
NPE on diagram close [message #1001402] Wed, 16 January 2013 11:36 Go to next message
Nick Collier is currently offline Nick Collier
Messages: 20
Registered: July 2009
Junior Member
Hi,

I'm getting an NPE on the close of my diagram. I've seen the following related messages and there's also a bug report as well.

http://www.eclipse.org/forums/index.php/mv/msg/163604/#msg_517804
http://www.eclipse.org/forums/index.php/mv/tree/370011/903630/#msg_903630

Here's the stack trace:

!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.commands".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.emf.transaction.impl.TransactionImpl.start(TransactionImpl.java:257)
	at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.startTransaction(TransactionalEditingDomainImpl.java:424)
	at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:321)
	at org.eclipse.gmf.runtime.diagram.ui.internal.actions.PropertyChangeAction.getPropertyValue(PropertyChangeAction.java:148)
	at org.eclipse.gmf.runtime.diagram.ui.internal.actions.PropertyChangeAction.getOperationSetPropertyValue(PropertyChangeAction.java:132)
	at org.eclipse.gmf.runtime.diagram.ui.actions.BooleanPropertyAction.getNewPropertyValue(BooleanPropertyAction.java:46)
	at org.eclipse.gmf.runtime.diagram.ui.internal.actions.PropertyChangeAction.updateTargetRequest(PropertyChangeAction.java:116)
	at org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction.refresh(DiagramAction.java:113)
	at org.eclipse.gmf.runtime.diagram.ui.actions.CheckedPropertyAction.refresh(CheckedPropertyAction.java:64)
	at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler.historyNotification(AbstractActionHandler.java:602)
	at org.eclipse.core.commands.operations.DefaultOperationHistory$2.run(DefaultOperationHistory.java:941)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.notifyListeners(DefaultOperationHistory.java:930)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.notifyRemoved(DefaultOperationHistory.java:1054)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.internalRemove(DefaultOperationHistory.java:902)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.flushUndo(DefaultOperationHistory.java:631)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.dispose(DefaultOperationHistory.java:330)
	at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor.stopListening(DiagramEditor.java:1014)
	at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditorWithFlyOutPalette.stopListening(DiagramEditorWithFlyOutPalette.java:617)
	at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor.dispose(DiagramEditor.java:677)
	at org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor.dispose(DiagramDocumentEditor.java:212)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.invalidate(CompatibilityPart.java:209)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.destroy(CompatibilityPart.java:374)


Apparently, this is caused by the selection change when the diagram is closing. Is there a workaround for this? What I'd like to do is prevent the TransactionalEditingDomain from executing this transaction if the diagram is closing.

thanks,

Nick
Re: NPE on diagram close [message #1014497 is a reply to message #1001402] Mon, 25 February 2013 18:33 Go to previous message
Thomas Beyer is currently offline Thomas Beyer
Messages: 55
Registered: February 2013
Member
For a quickfix, see update on https://bugs.eclipse.org/bugs/show_bug.cgi?id=388843.

Regards Thomas

[Updated on: Mon, 25 February 2013 18:33]

Report message to a moderator

Previous Topic:Updating existing diagrams when model changes
Next Topic:Dependencies to externalize a plugin
Goto Forum:
  


Current Time: Sun Apr 20 04:21:36 EDT 2014

Powered by FUDForum. Page generated in 0.01552 seconds