Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Multiple Null Pointer Exception Papyrus Compare
Multiple Null Pointer Exception Papyrus Compare [message #1806151] Fri, 03 May 2019 15:57 Go to next message
Yoann Farré is currently offline Yoann FarréFriend
Messages: 156
Registered: November 2017
Senior Member
Hello,

I'm testing Papyrus Compare. I would use it for collaborative work.

I configured it using this page and I followed the tutorial video provided as reference.

Unfortunately, when I'm trying to check out on another branch, I obtain multiple Null Pointer Exception and furthermore they are launched each time I click on a diagram. Is it a known bug?

I join a snapshot and the log of this exceptions.

I precise that I use the last nightly build of Papyrus (4.4) and the stable version of Papyrus Compare.

Moreover, I would like to know if there is a recent documentation about Papyrus Compare? Some summary of best practices? I would also appreciate some feedback by users if possible. Thank you.

Regards.

Yoann Farré.
  • Attachment: .log
    (Size: 17.63KB, Downloaded 61 times)
  • Attachment: ErrorBox.PNG
    (Size: 33.58KB, Downloaded 63 times)
Re: Multiple Null Pointer Exception Papyrus Compare [message #1818708 is a reply to message #1806151] Tue, 24 December 2019 08:19 Go to previous messageGo to next message
Yoann Farré is currently offline Yoann FarréFriend
Messages: 156
Registered: November 2017
Senior Member
Hello,
I just gave a new try to Papyrus Compare. I'm still sceptical about its power. I would use for strongly customized models with a lot of automated actions during the modelisation process.
What I've done (among other tests)
1/ Create a model and share it with git repository : Works fine : no issue
2/ Make some changes on a local branch from a first viewpointw (ONE). I added a property in a composite structure diagram. This also causes the addition of a package in the model. I can merge the change to the local master branch and push it to the remote. Works fine.
3/ In parralel, I created the same kind of property (with another name) from a second viewpoint (TWO) in the same composite structure diagram. I commit the changes and check out the master branch. Pull the remote master branch. In this cas I'm not able to merge the new branch but the tool doesn't point me any conflict. Just launch error popup.
Is this suppose to fail?

From a general viewpoint, I have many difficulties to make changes that don't cause errors during the merge action. I should say that the elements of my models have a lot of interactions but I think that it's often the case. Maybe I don't use the tool correctly and that's why I asked some additional documentations or advices.

Could you tell me if Papyrus Compare is used for big projects? In a complex team work environment?
Should I prefer the use of Papyrus CDO for collaborative work?

Regards.

Yoann.
Re: Multiple Null Pointer Exception Papyrus Compare [message #1823888 is a reply to message #1818708] Fri, 03 April 2020 13:30 Go to previous messageGo to next message
Yoann Farré is currently offline Yoann FarréFriend
Messages: 156
Registered: November 2017
Senior Member
Hello,
I just tested the last nightly build of Papyrus Compare (0.7.0.202003202036) and I still obtain the same errors. It happened notably when I switch from a branch to another after a commit (as it is shown in the tutorial video of Papyrus Compare). My build uses EMF SDK 2.20, could this be linked?
Thanks for reading.


!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.papyrus.infra.core.sasheditor".
!STACK 0
java.lang.NullPointerException
at org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain.getParent(AdapterFactoryEditingDomain.java:622)
at org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain.createCommand(AdapterFactoryEditingDomain.java:489)
at org.eclipse.papyrus.infra.emf.edit.domain.PapyrusTransactionalEditingDomain.createCommand(PapyrusTransactionalEditingDomain.java:85)
at org.eclipse.emf.edit.command.RemoveCommand.create(RemoveCommand.java:111)
at org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain.createCommand(AdapterFactoryEditingDomain.java:446)
at org.eclipse.papyrus.infra.emf.edit.domain.PapyrusTransactionalEditingDomain.createCommand(PapyrusTransactionalEditingDomain.java:85)
at org.eclipse.emf.edit.command.CutToClipboardCommand.create(CutToClipboardCommand.java:74)
at org.eclipse.emf.edit.ui.action.CutAction.createCommand(CutAction.java:44)
at org.eclipse.emf.edit.ui.action.CommandActionHandler.updateSelection(CommandActionHandler.java:97)
at org.eclipse.ui.actions.BaseSelectionListenerAction.selectionChanged(BaseSelectionListenerAction.java:128)
at org.eclipse.ui.actions.BaseSelectionListenerAction.selectionChanged(BaseSelectionListenerAction.java:142)
at org.eclipse.papyrus.infra.core.sasheditor.internal.eclipsecopy.MultiPageSelectionProvider$1.run(MultiPageSelectionProvider.java:117)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.papyrus.infra.core.sasheditor.internal.eclipsecopy.MultiPageSelectionProvider.fireEventChange(MultiPageSelectionProvider.java:113)
at org.eclipse.papyrus.infra.core.sasheditor.internal.eclipsecopy.MultiPageSelectionProvider.fireSelectionChanged(MultiPageSelectionProvider.java:95)
at org.eclipse.papyrus.infra.core.sasheditor.internal.eclipsecopy.MultiPageEditorSite.handleSelectionChanged(MultiPageEditorSite.java:595)
at org.eclipse.papyrus.infra.core.sasheditor.internal.eclipsecopy.MultiPageEditorSite$3.selectionChanged(MultiPageEditorSite.java:506)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer.flushSelectionEvents(DiagramGraphicalViewer.java:256)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer$1.run(DiagramGraphicalViewer.java:234)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3963)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3590)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:660)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559)
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:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
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:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
Re: Multiple Null Pointer Exception Papyrus Compare [message #1824113 is a reply to message #1823888] Wed, 08 April 2020 06:36 Go to previous messageGo to next message
Philip Langer is currently offline Philip LangerFriend
Messages: 95
Registered: March 2015
Location: Vienna, Austria
Member

Hi Yoann,

the NullPointerException that you've posted doesn't come from Papyrus Compare. When you switch branches, Git changes the files on disk to the state of the other branch to which you are switching.

The actual reason for the NullPointerException seems to be a failed Cut operation (as in Copy, Cut and Paste). It does not seem related to Papyrus Compare or switching branches.

Regarding your message from Dec 24th:
Quote:
3/ In parralel, I created the same kind of property (with another name) from a second viewpoint (TWO) in the same composite structure diagram. I commit the changes and check out the master branch. Pull the remote master branch. In this cas I'm not able to merge the new branch but the tool doesn't point me any conflict. Just launch error popup.
Is this suppose to fail?


If conflicts occur, you should get a dialog indicating that the git merge/rebase ended with state "conflicting". After that the conflicting models that are impacted by the conflict should be marked as conflicting (red diamond). Then you should be able to right-click the conflicting model and open them with the Team -> Model Merge Tool. This will open the merge editor showing you the changes and conflicts.
Often it helps to switch to the "by side" grouping in the upper-right area to structure the diffs and conflicts according to the side they have been originally applied to.

Hope that helps,

Philip


--
Philip Langer

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: Multiple Null Pointer Exception Papyrus Compare [message #1824116 is a reply to message #1824113] Wed, 08 April 2020 07:45 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6993
Registered: July 2009
Senior Member
Hi

I cannot comment specifically on Papyrus Compare, but even Platform Compare can go a bit balmy when a commit change occurs.

The challenge is that the GIT change often involves many changes in many projects, which are changed one by one. Various tools do not seem to adequately configure their rebuilds/refreshes to wait until the changes have stabilized and so many tools find themselves with inconsistent content which at best leads to a transient tranche of rubbish errors. Quite often tools that attempt to update incrementally find the partial changes take stupid and under-tested code paths that malfunction sometimes fatally.

Bottom line. If GIT commit changing chaos is causing you problems or just takes a really long time:
- disable auto-build
- close all editors, especially compare editors, GIT Reflog View
- then make the change
- then manually refresh all relevant projects
- then re-enable auto-build

and if that isn't good enough, restart Eclipse before re-enabling auto-build since many functionalities are not suppressed by no-auto-build.

Regards

Ed Willink
Re: Multiple Null Pointer Exception Papyrus Compare [message #1824197 is a reply to message #1824116] Thu, 09 April 2020 11:33 Go to previous message
Yoann Farré is currently offline Yoann FarréFriend
Messages: 156
Registered: November 2017
Senior Member
Hello,
@Philip
Thanks for your reply. According to the stack trace, I agree that the errors do not seem to come from Papyrus Compare direclty. I'll try to investigate the issue with copy, cut, paste feature. I'm surprised to be the only one to find this issue, as it is a very used feature.
Indeed, I didn't observe any conflict dialog so the issue is deeper.

@ Ed
I'll try your process with my use case. For this, I don't have any code to build, just a model to reload but it can be a similar issue. Thanks.

I'll inform of any news about that.
Regards.
Yoann.

Previous Topic:InformationFlow
Next Topic:Papyrus in Eclipse Theia?
Goto Forum:
  


Current Time: Mon Jan 25 15:00:19 GMT 2021

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

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

Back to the top