Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layered NPE with edgeRouting: SPLINES if logging: true or measureExecutionTime: true #309

Open
keyserj opened this issue Nov 13, 2024 · 0 comments
Labels
bug elk Issue in ELK itself.

Comments

@keyserj
Copy link

keyserj commented Nov 13, 2024

Describe the bug
With a graph of:

{
  "id": "elkgraph",
  "children": [
    {
      "id": "bd654195-00dd-469c-8550-5551dc232602",
      "width": 176,
      "height": 66
    }
  ],
  "edges": []
}

and layoutOptions of:

{
  "algorithm": "layered",
  "elk.direction": "DOWN",
  "elk.edgeRouting": "SPLINES"
}

the following invocations both throw a Null Pointer Exception:

new ELK().layout(graph, { layoutOptions, logging: true })
new ELK().layout(graph, { layoutOptions, measureExecutionTime: true })

Not sure if there's a way to get a more useful error, but this is the log:

Uncaught (in promise) TypeError: java.lang.NullPointerException
    at Ngb.Pgb [as ee] (elk-worker.min.js:6399:100191)
    at Ngb.vz [as je] (elk-worker.min.js:6399:92187)
    at Ngb.mz (elk-worker.min.js:2029:38)
    at Ngb.xz (elk-worker.min.js:1122:18)
    at new Ngb (elk-worker.min.js:1129:19)
    at new OC (elk-worker.min.js:2762:38)
    at NId (elk-worker.min.js:5920:51)
    at NId (elk-worker.min.js:5920:395)
    at NId (elk-worker.min.js:5920:395)
    at QId (elk-worker.min.js:6004:415)
    at h.dispatch (elk-worker.min.js:6317:473)
    at h.saveDispatch (elk-worker.min.js:6317:603)
    at eval (elk-worker.min.js:6318:162)

The error is not thrown if using edgeRouting: "POLYLINE" or removing logging/measureExecutionTime.

Expected behavior
No error.

Screenshots
n/a

ELK Version
elkjs 0.9.3

Additional context
This is not an issue with ELK, e.g. this elklive works.

Also I haven't actually needed logging or measureExecutionTime in months, I've just had it enabled. So removing those parameters is a simple workaround for me.

@keyserj keyserj added the bug label Nov 13, 2024
@soerendomroes soerendomroes added the elk Issue in ELK itself. label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug elk Issue in ELK itself.
Projects
None yet
Development

No branches or pull requests

2 participants