Skip to content
This repository was archived by the owner on Sep 15, 2026. It is now read-only.
This repository was archived by the owner on Sep 15, 2026. It is now read-only.

NullPointerException at ExpressionHelper.java:386 during zoom when connections with volatile control-point anchors are present (JavaFX 25) #128

Description

@Gerhard-2026

Component: GEF FX

Severity: Regression (broken on JavaFX 25)

Summary
A NullPointerException occurs in ExpressionHelper.fireValueChangedEvent during mouse-wheel zoom whenever a Connection carries volatile control-point anchors (i.e. anchors inserted by an AbstractRouter subclass). The crash is a regression introduced by JavaFX 25 (or before, presumably by a change in ExpressionHelper).

Stack trace (abridged):
java.lang.NullPointerException
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:386)
at javafx.beans.property.ReadOnlyObjectPropertyBase.fireValueChangedEvent(...)
at javafx.beans.property.ObjectPropertyBase.set(...)
at org.eclipse.gef.zest.fx.behaviors.ConnectionClickableAreaBehavior (stroke-width change)

Root cause:
In org.eclipse.gef.mvc.fx.behaviors.ConnectionClickableAreaBehavior 'scaleXListener' is a manual invalidation workaround that can trigger re-entrant invalidate() calls during lifecycle transitions which cause the NPE.

Reproducer:
Create a Connection that is routed by a custom AbstractRouter subclass which inserts and removes several VolatileStaticAnchor control points on each routing pass.
Trigger several re-routes (e.g. by resizing the window or panning the canvas).
Scroll the mouse wheel to zoom.
→ NPE at ExpressionHelper.java:386.

Suggested fix:
Consider binding the DoubleBinding directly to mxxProperty() and removing the explicit listener.
Also unbind clickableAreaWidthProperty() before disposing the binding in doDeactivate().

Environment:

  • GEF version: 5.5.1
  • JavaFX version: 25
  • Java version: 25
  • OS: Windows

Note: I encountered the NPE - all the technical analysis (including a workaround for me) and a draft for this issue report was done by GitHub Copilot (no adverstising, just to let you know).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions