PVMT null pointer exception bug

When clicking on a PVMT property value and clicking somewhere else a null pointer exception is thrown. The gif below shows the problem. Is there anything I can do to prevent this error?

Animation

Versions:

  • PVMT 50.5.1
  • Capella 5.2.0.202111301257

Stacktrace:

!STACK 0
java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because "value" is null
	at com.thalesgroup.vpd.property.adapter.vpd.impl.VPDPropertyIntegerAdapter.setValue(VPDPropertyIntegerAdapter.java:48)
	at com.thalesgroup.vpd.property.adapter.vpd.impl.VPDPropertyIntegerAdapter.setValue(VPDPropertyIntegerAdapter.java:1)
	at com.thalesgroup.vpd.property.adapter.vpd.impl.VPDAbstractPropertyAdapter.setValue(VPDAbstractPropertyAdapter.java:166)
	at com.thalesgroup.vpd.property.adapter.capella.view.wrapper.PropertyViewWrapper.setValue(PropertyViewWrapper.java:111)
	at com.thalesgroup.vpd.property.adapter.capella.view.VPDEditingSupport$1.doExecute(VPDEditingSupport.java:85)
	at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
	at org.eclipse.emf.workspace.EMFCommandOperation.doExecute(EMFCommandOperation.java:119)
	at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:496)
	at org.polarsys.capella.common.ef.internal.command.WorkspaceCommandStackImpl.doExecute(WorkspaceCommandStackImpl.java:150)
	at org.polarsys.capella.common.platform.sirius.ted.SemanticEditingDomainFactory$SemanticCommandStack.doExecute(SemanticEditingDomainFactory.java:277)
	at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
	at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
	at com.thalesgroup.vpd.property.adapter.capella.view.VPDEditingSupport.setValue(VPDEditingSupport.java:64)
	at org.eclipse.jface.viewers.EditingSupport.saveCellEditorValue(EditingSupport.java:116)
	at org.eclipse.jface.viewers.ColumnViewerEditor.saveEditorValue(ColumnViewerEditor.java:446)
	at org.eclipse.jface.viewers.ColumnViewerEditor.applyEditorValue(ColumnViewerEditor.java:312)
	at org.eclipse.jface.viewers.ColumnViewerEditor$2.focusLost(ColumnViewerEditor.java:225)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:147)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4213)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1037)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1042)
	at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:2941)
	at org.eclipse.swt.widgets.Widget.wmKillFocus(Widget.java:1799)
	at org.eclipse.swt.widgets.Control.WM_KILLFOCUS(Control.java:5163)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4774)
	at org.eclipse.swt.widgets.Text.windowProc(Text.java:2681)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4931)
	at org.eclipse.swt.internal.win32.OS.BringWindowToTop(Native Method)
	at org.eclipse.swt.widgets.Decorations.bringToTop(Decorations.java:211)
	at org.eclipse.swt.widgets.Shell.open(Shell.java:1228)
	at org.eclipse.jface.window.Window.open(Window.java:795)
	at org.eclipse.ui.internal.statushandlers.InternalDialog.open(InternalDialog.java:302)
	at org.eclipse.ui.internal.statushandlers.WorkbenchStatusDialogManagerImpl.doAddStatusAdapter(WorkbenchStatusDialogManagerImpl.java:256)
	at org.eclipse.ui.internal.statushandlers.WorkbenchStatusDialogManagerImpl.addStatusAdapter(WorkbenchStatusDialogManagerImpl.java:189)
	at org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager.addStatusAdapter(WorkbenchStatusDialogManager.java:152)
	at org.eclipse.ui.statushandlers.WorkbenchErrorHandler.showStatusAdapter(WorkbenchErrorHandler.java:79)
	at org.eclipse.ui.statushandlers.WorkbenchErrorHandler.handle(WorkbenchErrorHandler.java:52)
	at org.eclipse.ui.internal.ide.IDEWorkbenchErrorHandler.handle(IDEWorkbenchErrorHandler.java:106)
	at org.eclipse.ui.internal.WorkbenchErrorHandlerProxy.handle(WorkbenchErrorHandlerProxy.java:34)
	at org.eclipse.ui.statushandlers.StatusManager.handle(StatusManager.java:218)
	at org.eclipse.ui.internal.JFaceUtil$1.show(JFaceUtil.java:64)
	at org.eclipse.jface.util.SafeRunnable.handleException(SafeRunnable.java:66)
	at org.eclipse.core.runtime.SafeRunner.handleException(SafeRunner.java:83)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
	at org.eclipse.jface.viewers.CellEditor.fireApplyEditorValue(CellEditor.java:332)
	at org.eclipse.jface.viewers.TextCellEditor.handleDefaultSelection(TextCellEditor.java:286)
	at org.eclipse.jface.viewers.TextCellEditor.lambda$0(TextCellEditor.java:146)
	at org.eclipse.swt.events.SelectionListener$2.widgetDefaultSelected(SelectionListener.java:102)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:123)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4213)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1037)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4030)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3630)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1158)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1047)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1420)

It looks like the PVMT addon is retaining the last value you entered in this field. So if the last time you entered a value, it was empty, then it is by default emptying the value, thus generating this bug.
One workaround is for you to enter another value (not an empty one), and the null pointer will go.

In any case, please raise a bug as this behavior should not happen.

Thanks
Stephane

Thanks for your response.

In any case, please raise a bug as this behavior should not happen.

Where can I submit this bug?

You can try it here: Issues · eclipse/capella · GitHub
Not sure it is the right place, but I don’t know if there is a better one.

Thanks, I’ve created an issue PVMT null pointer exception bug · Issue #2458 · eclipse/capella (github.com)