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

IllegalArgumentException during connection.removeAllControlPoints(); #91

Open
BenJanus opened this issue Mar 27, 2020 · 1 comment
Open
Labels

Comments

@BenJanus
Copy link

BenJanus commented Mar 27, 2020

If you call org.eclipse.gef.fx.nodes.Connection.removeAllControlPoints() in a certain situation an IllegalArgumentException is thrown.

RouterExample.java.txt

Caused by: java.lang.IllegalArgumentException: Index out of range (index: 1, size: 1).
	at org.eclipse.gef.fx.nodes.Connection.removeControlPoint(Connection.java:1499)
	at org.eclipse.gef.fx.nodes.Connection.removeAllControlPoints(Connection.java:1391)
	at com.initka.nui.gef.core.development.RouterExample.initConnection(RouterExample.java:71)

We are using version 5.0.1

@mwienand
Copy link
Contributor

Thank you for reporting the issue!

I could easily reproduce the error using your example => Creating a test and debugging the issue right now.

First insight: the reason seems to be that removeControlPoint(index) might lead to more than the given control point being removed due to routing.

Possible solution: keep track of anchorsByKeys.size. Maybe I can find a nicer solution though.

@mwienand mwienand added the bug label Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants