Skip to main content



      Home
Home » Modeling » Graphiti » NullPointer when moving Shapes in Diagram(Unhandled event loop exception)
NullPointer when moving Shapes in Diagram [message #1872120] Tue, 22 October 2024 07:09 Go to next message
Eclipse UserFriend
I saw this issue in Graphiti when moving a Shape in the diagram using one of the available "File System" tutorial/demo code.

Here is my use case / scenario.

I am using Eclipse 202409 version (Java 21). I created a workspace, a project and a 'file system' diagram. Everything seems to be fine, I can create, move and resize shapes normally.

This is where I saw the issue. I need to run my Eclipse as a "product" so I created a Runtime configuration like this.
index.php/fa/45345/0/

I validated all plugins and see that there are no errors or missing plugins.
index.php/fa/45348/0/

I click Run and Eclipse runs using the product configuration.
Then I ran the same test as above, I created a project and diagram. I started to move the shapes and I get the 'Unhandled event loop' error in the logs.
index.php/fa/45351/0/

Anyone else saw this issue?
Or does anyone know if I am missing something or how to fix this?

Appreciate the help!





  • Attachment: 29412-03.png
    (Size: 73.81KB, Downloaded 117 times)
  • Attachment: 29412-01.png
    (Size: 109.53KB, Downloaded 120 times)
  • Attachment: 29412-02.png
    (Size: 299.98KB, Downloaded 114 times)

[Updated on: Tue, 22 October 2024 07:11] by Moderator

Re: NullPointer when moving Shapes in Diagram [message #1872342 is a reply to message #1872120] Mon, 28 October 2024 11:56 Go to previous messageGo to next message
Eclipse UserFriend
I would suspect this is caused by a change in GEF. As background: there is already a change merged to Graphiti master branch that addresses NPEs in the same class but at a different spot, see https://gitlab.eclipse.org/eclipse/graphiti/graphiti/-/issues/7

Could you check if there are different versions of Graphiti (latest release vs. master branch maybe) or GEF are used in your working and not-working setups?

Thanks,
Michael
Re: NullPointer when moving Shapes in Diagram [message #1872410 is a reply to message #1872342] Wed, 30 October 2024 11:12 Go to previous messageGo to next message
Eclipse UserFriend
Hi Michael,

Here's what I did. I downloaded the latest base Eclipse Modeling Package. I'm using Java 21 and installed Graphiti 0.19.2 from the update site.

Then I created a Runtime Configuration similar to above (org.eclipse.epp.package.modeling.product) to run a separate Eclipse Instance.

These are the GEF versions installed in my Eclipse.
index.php/fa/45389/0/

I see the error when I resize or move a shape (as the above). But only happens on a seprate instance when I run using my Runtime Configuration. Something is not loaded properly?

Looks like there is something going on with the "org.eclipse.graphiti.ui.internal.util.ui.sfx.GFSnapFeedbackPolicy"

!ENTRY org.eclipse.ui 4 0 2024-10-30 23:00:57.014
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException: Cannot invoke "org.eclipse.draw2d.IFigure.getBackgroundColor()" because the return value of "org.eclipse.graphiti.ui.internal.util.ui.sfx.GFSnapFeedbackPolicy$FadeIn.getParent()" is null
at org.eclipse.graphiti.ui.internal.util.ui.sfx.GFSnapFeedbackPolicy$FadeIn.getLocalBackgroundColor(GFSnapFeedbackPolicy.java:88)
at org.eclipse.draw2d.Figure.setBackgroundColor(Figure.java:1590)
at org.eclipse.graphiti.ui.internal.util.ui.sfx.GFSnapFeedbackPolicy$FadeIn.<init>(GFSnapFeedbackPolicy.java:78)
at org.eclipse.graphiti.ui.internal.util.ui.sfx.GFSnapFeedbackPolicy.highlightGuide(GFSnapFeedbackPolicy.java:172)
at org.eclipse.graphiti.ui.internal.util.ui.sfx.GFSnapFeedbackPolicy.showTargetFeedback(GFSnapFeedbackPolicy.java:217)
at org.eclipse.gef.editparts.AbstractEditPart.lambda$16(AbstractEditPart.java:1128)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at org.eclipse.gef.editparts.AbstractEditPart.showTargetFeedback(AbstractEditPart.java:1128)
at org.eclipse.gef.tools.TargetingTool.showTargetFeedback(TargetingTool.java:409)
at org.eclipse.gef.tools.DragEditPartsTracker.handleDragInProgress(DragEditPartsTracker.java:415)
at org.eclipse.gef.tools.AbstractTool.mouseDrag(AbstractTool.java:1124)
at org.eclipse.gef.tools.SelectionTool.mouseDrag(SelectionTool.java:555)
at org.eclipse.gef.EditDomain.mouseDrag(EditDomain.java:249)
at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseMoved(DomainEventDispatcher.java:413)
at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseMove(LightweightSystem.java:592)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:229)
  • Attachment: 29463-03.png
    (Size: 121.64KB, Downloaded 58 times)
Re: NullPointer when moving Shapes in Diagram [message #1872413 is a reply to message #1872410] Wed, 30 October 2024 11:36 Go to previous message
Eclipse UserFriend
I just saw the link you gave me for the issue, i think they are the same thing. I installed the nightly update 0.19.3 and it seems that it fixes the issue.
I will try to install 0.19.3 in our development environment and see how it works.

Thank you Michael, appreciate the help!

Btw, do you know when will 0.19.3 be released?

[Updated on: Wed, 30 October 2024 11:52] by Moderator

Previous Topic:Help with tutorial
Next Topic:Official Graphiti 0.19.3 Release
Goto Forum:
  


Current Time: Mon Mar 17 01:55:50 EDT 2025

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

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

Back to the top