glsp icon indicating copy to clipboard operation
glsp copied to clipboard

Edge router creates target coordinates with NaN which causes Error on intersect calculations (after update to GLSP 2.1.1)

Open ivy-lli opened this issue 1 year ago • 0 comments

After our update to GLSP 2.1.1, I've discovered an ugly exception. It seems that the edge router may create target coordinates with NaN which then causes the intersection calculations to fail with an Error. If this happens the UI freezes and is not usable any longer.

Error Stacktrace:

Uncaught Error: Cannot determine direction of line (416,304) to (NaN,NaN)
    at get direction (geometry.ts:190:15)
    at WorkflowEdgeView.getIntersectionsSortedBySegmentDirection (views.tsx:185:29)
    at WorkflowEdgeView.intersectionPath (views.tsx:154:36)
    at WorkflowEdgeView.renderLine (views.tsx:136:30)
    at WorkflowEdgeView.renderLine (views.tsx:54:24)
    at WorkflowEdgeView.render (views.tsx:82:19)
    at _ModelRenderer.renderElement (viewer.tsx:65:28)
    at viewer.tsx:82:35
    at Array.map (<anonymous>)
    at _ModelRenderer.renderChildren (viewer.tsx:82:14)

306939170-4239173e-9ca0-482d-a5a0-1b7bfab418d4

ivy-lli avatar Feb 22 '24 11:02 ivy-lli