Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 476203

Summary: NullPointerException in LabelEditPart.handleNonResizableRefreshBoundS (178)
Product: [Modeling] Sirius Reporter: EPP Error Reports <error-reports-inbox>
Component: DiagramAssignee: Maxime Porhel <maxime.porhel>
Status: CLOSED FIXED QA Contact: Pierre-Charles David <pierre-charles.david>
Severity: normal    
Priority: P3 CC: maxime.porhel, pierre-charles.david
Version: 3.0.0Keywords: triaged
Target Milestone: 3.0.1   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/54870
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=cfc3be679512f85b8a48b9018c93889cdcbb4ead
Whiteboard: trivial

Description EPP Error Reports CLA 2015-08-31 04:45:43 EDT
An identical NPE has been corrected on master. It was detected on hudson by the tests suites. 
It is a random NPE occuring during undo(), during the refresh of a DNodeListElementEditPart, triggered from the DiagramEventBroker but the part is inactive, has no parent anymore (or yet) and/or its figure is null or has no parent too.



The following incident was reported via the automated error reporting:


    code:                   45
    plugin:                 org.eclipse.emf.transaction_1.9.0.201506010221
    message:                Uncaught exception during post-commit listener notifications
    fingerprint:            dd2cc5f0
    exception class:        java.lang.NullPointerException
    exception message:      -
    number of children:     0
    
    java.lang.NullPointerException: null
    at org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart.handleNonResizableRefreshBoundS(LabelEditPart.java:178)
    at org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart.refreshBounds(LabelEditPart.java:159)
    at org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart.refresh(LabelEditPart.java:148)
    at org.eclipse.sirius.diagram.ui.internal.edit.parts.DNodeListElementEditPart.handleNotificationEvent(DNodeListElementEditPart.java:195)
    at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.notifyChanged(GraphicalEditPart.java:1438)
    at org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker.fireNotification(DiagramEventBroker.java:504)
    at org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker.resourceSetChanged(DiagramEventBroker.java:399)
    at org.eclipse.gmf.runtime.diagram.ui.DiagramEventBrokerThreadSafe.resourceSetChanged(DiagramEventBrokerThreadSafe.java:73)
    at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl$1.run(TransactionalEditingDomainImpl.java:781)
    at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
    at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.postcommit(TransactionalEditingDomainImpl.java:771)
    at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.deactivate(TransactionalEditingDomainImpl.java:543)
    at org.eclipse.emf.transaction.impl.TransactionImpl.close(TransactionImpl.java:712)
    at org.eclipse.emf.transaction.impl.TransactionImpl.commit(TransactionImpl.java:474)
    at org.eclipse.emf.workspace.AbstractEMFOperation.undo(AbstractEMFOperation.java:372)
    at org.eclipse.core.commands.operations.DefaultOperationHistory.doUndo(DefaultOperationHistory.java:420)
    at org.eclipse.core.commands.operations.DefaultOperationHistory.undo(DefaultOperationHistory.java:1255)
    at org.eclipse.ui.operations.UndoActionHandler.runCommand(UndoActionHandler.java:87)
    at org.eclipse.ui.operations.OperationHistoryActionHandler$1.run(OperationHistoryActionHandler.java:308)
    at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:463)
    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:371)
    at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:500)
    at org.eclipse.ui.internal.operations.TimeTriggeredProgressMonitorDialog.access$6(TimeTriggeredProgressMonitorDialog.java:1)
    at org.eclipse.ui.internal.operations.TimeTriggeredProgressMonitorDialog$2.run(TimeTriggeredProgressMonitorDialog.java:214)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.operations.TimeTriggeredProgressMonitorDialog.run(TimeTriggeredProgressMonitorDialog.java:227)
    at org.eclipse.ui.operations.OperationHistoryActionHandler.run(OperationHistoryActionHandler.java:323)
    at org.eclipse.gmf.runtime.common.ui.action.actions.global.GlobalUndoAction.doRun(GlobalUndoAction.java:245)
    at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler.run(AbstractActionHandler.java:359)
    at org.eclipse.gmf.runtime.common.ui.action.ActionManager.run(ActionManager.java:229)
    at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler.runWithEvent(AbstractActionHandler.java:377)
    at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:122)
    at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
    at sun.reflect.GeneratedMethodAccessor328.invoke(null:-1)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(null:-1)
    at java.lang.reflect.Method.invoke(null:-1)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:252)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:234)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
    at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:493)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:486)
    at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:286)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:507)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:558)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:378)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$0(KeyBindingDispatcher.java:324)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:86)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1266)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1112)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1137)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1122)
    at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1164)
    at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1160)
    at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1581)
    at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4781)
    at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:343)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4662)
    at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:339)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:5050)
    at org.eclipse.swt.internal.win32.OS.DispatchMessageW(OS.java:-2)
    at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3767)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(null:-2)
    at sun.reflect.NativeMethodAccessorImpl.invoke(null:-1)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(null:-1)
    at java.lang.reflect.Method.invoke(null:-1)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
   
  

General Information:

    reported-by:      João Batista
    anonymous-id:     7e5048eb-8103-436f-94a2-77a32fc44247
    eclipse-build-id: 4.5.0.I20150603-2000
    eclipse-product:  org.eclipse.epp.package.modeling.product
    operating system: Windows7 6.1.0 (x86_64) - win32
    jre-version:      1.8.0_45-b15

The following plug-ins were present on the execution stack (*):
    1. org.eclipse.core.commands_3.7.0.v20150422-0725
    2. org.eclipse.core.databinding.observable_1.5.0.v20150422-0725
    3. org.eclipse.core.databinding_1.5.0.v20150422-0725
    4. org.eclipse.core.runtime_3.11.0.v20150405-1723
    5. org.eclipse.e4.core.commands_0.11.0.v20150422-0725
    6. org.eclipse.e4.core.contexts_1.4.0.v20150421-2214
    7. org.eclipse.e4.core.di_1.5.0.v20150421-2214
    8. org.eclipse.e4.ui.bindings_0.11.0.v20150422-0725
    9. org.eclipse.e4.ui.workbench_1.3.0.v20150531-1948
    10. org.eclipse.e4.ui.workbench.swt_0.13.0.v20150504-0621
    11. org.eclipse.emf.transaction_1.9.0.201506010221
    12. org.eclipse.emf_2.6.0.v20150601-0402
    13. org.eclipse.emf.workspace_1.5.1.201506010221
    14. org.eclipse.equinox.app_1.3.300.v20150423-1356
    15. org.eclipse.equinox.launcher_1.3.100.v20150511-1540
    16. org.eclipse.gmf.runtime.common.ui.action_1.7.0.201506060219
    17. org.eclipse.gmf.runtime.common.ui_1.8.1.201506060219
    18. org.eclipse.gmf_1.9.0.201506060219
    19. org.eclipse.gmf.runtime.diagram.core_1.7.0.201506060219
    20. org.eclipse.gmf.runtime.diagram.ui_1.8.0.201506060219
    21. org.eclipse.jface_3.11.0.v20150602-1400
    22. org.eclipse.sirius.diagram.ui_3.0.0.201506090807
    23. org.eclipse.sirius.diagram_3.0.0.201506090807
    24. org.eclipse.sirius_3.0.0.201506090807
    25. org.eclipse.swt_3.104.0.v20150528-0211
    26. org.eclipse.ui_3.107.0.v20150507-1945
    27. org.eclipse.ui.ide.application_1.1.0.v20150422-0725
    28. org.eclipse.ui.ide_3.11.0.v20150510-1749

Please note that:
* Messages, stacktraces, and nested status objects may be shortened.
* Bug fields like status, resolution, and whiteboard are sent
  back to reporters.
* The list of present bundles and their respective versions was
  calculated by package naming heuristics. This may or may not reflect reality.

Other Resources:
* Report: https://dev.eclipse.org/recommenders/committers/confess/#/problems/55de0ac3e4b08a220718f2c8  
* Manual: https://dev.eclipse.org/recommenders/community/confess/#/guide


Thank you for your assistance.
Your friendly error-reports-inbox.

This bug was created on behalf of maxime.porhel@xxxxxxxxxxxx.
Comment 2 Eclipse Genie CLA 2015-08-31 05:10:50 EDT
New Gerrit change created: https://git.eclipse.org/r/54870
Comment 4 Pierre-Charles David CLA 2015-09-02 04:24:50 EDT
Fixed by cfc3be679512f85b8a48b9018c93889cdcbb4ead.
Comment 5 Pierre-Charles David CLA 2015-09-07 03:59:20 EDT
Marking verified, from a review of the actual patch. Given the origin of the problem/stack, there is no clear scenario to try and reproduce the issue.
Comment 6 Pierre-Charles David CLA 2015-12-15 05:22:26 EST
Available in Sirius 3.0.1 released on 2015-09-10.