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

The listener attached rootNode parent property is never removed. #156

Closed
Rizen59 opened this Issue Jul 28, 2015 · 0 comments

Comments

Projects
None yet
2 participants
@Rizen59
Contributor

Rizen59 commented Jul 28, 2015

This could cause a NullPointerException when the root node is always the same instance (in fxml case with the same retrieved node) and the model is attached/detached multiple times in the view.

Here is a simple project that reproduce the problem. Just select/unselect the checkbox multiple times to reproduce : http://www.filedropper.com/jrebirth-issue-156

What happened ?

    1. When the button is detached from its parent release() will be called
    1. When the button is re-attached from the same parent the the listener will be added again. It will cause the parent property to have two attached listeners
    1. The button is detached again, then the two-listeners will be called. The first one will set the localFacade to null, it will result as a NullPointerException in the second.

I'll send you a pull request in few minutes.

Rizen59 pushed a commit to Rizen59/JRebirth that referenced this issue Jul 28, 2015

@sbordes sbordes added this to the 8.0.3 milestone Jul 28, 2015

@sbordes sbordes added the bug label Jul 28, 2015

@sbordes sbordes closed this Jul 28, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment