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

RuntimeException for using Parent.toFront() #68

Open
danielfriederich opened this issue May 27, 2021 · 0 comments
Open

RuntimeException for using Parent.toFront() #68

danielfriederich opened this issue May 27, 2021 · 0 comments

Comments

@danielfriederich
Copy link

Using ScenicView v11.0.2 on Ubuntu.

I run into a RuntimeException when the code is using Parent.toFront.

Parent.toFront has an optimization not to set the change the parent field of the node it moves:

        childrenTriggerPermutation = true;
        try {
            children.remove(node);
            children.add(node);
        } finally {
            childrenTriggerPermutation = false;
        }

due to childrenTriggerPermutation optimization the moved node seen by S
VNodeFactory.createNode has the parent set, but that parent does not list the node, hence the RuntimeException.
I don't know enough about ScenicView to understand how to fix it, maybe just creating SVRemoteNodeAdapter as if the parent is not known?

java.lang.RuntimeException: Error while creating node:class javafx.scene.layout.BorderPane id:null
NODE INFORMATION
Node:BorderPane@3e408c4 Class:class javafx.scene.layout.BorderPane Id:null
Children:[]
PARENT INFORMATION
Node:StackPane@1ae7aa45 Class:class javafx.scene.layout.StackPane Id:null
Children:[BundlesTab@22491c46[styleClass=bundles-tab]]

at org.fxconnector.node.SVNodeFactory.createNode(SVNodeFactory.java:56)
at org.fxconnector.StageControllerImpl.createNode(StageControllerImpl.java:773)
at org.fxconnector.StageControllerImpl.lambda$new$10(StageControllerImpl.java:229)
at javafx.base/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329)
at javafx.base/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
at javafx.base/javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233)
at javafx.base/javafx.collections.FXCollections$UnmodifiableObservableListImpl.lambda$new$0(FXCollections.java:955)
at javafx.base/javafx.collections.WeakListChangeListener.onChanged(WeakListChangeListener.java:88)
at javafx.base/com.sun.javafx.collections.ListListenerHelper$SingleChange.fireValueChangedEvent(ListListenerHelper.java:164)
at javafx.base/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
at javafx.base/com.sun.javafx.collections.VetoableListDecorator.lambda$new$0(VetoableListDecorator.java:76)
at javafx.base/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329)
at javafx.base/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
at javafx.base/javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233)
at javafx.base/javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
at javafx.base/javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
at javafx.base/javafx.collections.ObservableListBase.endChange(ObservableListBase.java:205)
at javafx.base/javafx.collections.ModifiableObservableListBase.remove(ModifiableObservableListBase.java:183)
at javafx.base/com.sun.javafx.collections.VetoableListDecorator.remove(VetoableListDecorator.java:332)
at javafx.base/com.sun.javafx.collections.VetoableListDecorator.remove(VetoableListDecorator.java:221)
at javafx.graphics/javafx.scene.Parent.toFront(Parent.java:729)
at javafx.graphics/javafx.scene.Node.toFront(Node.java:2040)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant