eclipse / elk

Eclipse Layout Kernel - Automatic layout for Java applications.
https://www.eclipse.org/elk/
Other
258 stars 86 forks source link

(layered + partitioning) infinite loop with specific set of nodes #993

Open keyserj opened 10 months ago

keyserj commented 10 months ago

With these settings:

algorithm: layered
partitioning.activate: true
considerModelOrder.strategy: NODES_AND_EDGES

a very specific set of nodes results in an infinite loop, see this reproduction (breaks if you add the commented-out edge - it'll look like it loads with the same layout but if you remove a node or something you'll see that the layout no longer updates based on the configuration, and there's an infinite loading circle).

I tried making a minimal reproduction by removing some nodes, some edges, but this is the smallest reproduction I could make. In the previous issue I made (#969) it was shown that crossingMinimization.greedySwitch.type: OFF avoided the error, and I noticed that works in this case too. But that results in a different layout. Not sure what could be done with this set of configuration - maybe an error could be thrown if the situation arises that will result in an infinite loop?

Note on my node naming: the first letter is the type of node and corresponds to a partition.

soerendomroes commented 2 months ago

This might be a problem with partition and nodes without a partition. I should invesitigate this.