Skip to main content


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 16:36 Go to next message
Nick Collier is currently offline Nick CollierFriend
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 23:33 Go to previous message
Thomas Beyer is currently offline Thomas BeyerFriend
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 23: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: Fri Apr 26 08:45:40 GMT 2024

Powered by FUDForum. Page generated in 0.03534 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top