Skip to content
New issue

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

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

Already on GitHub? # to your account

Including FXML fails with NPE #158

Closed
gluon-bot opened this issue Nov 28, 2017 · 1 comment
Closed

Including FXML fails with NPE #158

gluon-bot opened this issue Nov 28, 2017 · 1 comment
Labels
bug Something isn't working major

Comments

@gluon-bot
Copy link

Originally reported by: Jose Pereda (Bitbucket: JPereda, GitHub: JPereda)


When including an FXML file, a check is done to verify if it is using the Gluon libraries. At this point FXMLObject::sceneGraphObject is null, and the check FXMLObject::isGluon fails with a NPE.

#!java

java.lang.NullPointerException
	at com.oracle.javafx.scenebuilder.kit.fxom.FXOMObject.isGluon(FXOMObject.java:739)
	at com.oracle.javafx.scenebuilder.kit.alert.WarnThemeAlert.showAlertIfRequired(WarnThemeAlert.java:74)
	at com.oracle.javafx.scenebuilder.kit.editor.job.atomic.AddPropertyValueJob.redo(AddPropertyValueJob.java:102)
	at com.oracle.javafx.scenebuilder.kit.editor.job.atomic.AddPropertyValueJob.execute(AddPropertyValueJob.java:77)
	at com.oracle.javafx.scenebuilder.kit.editor.job.BatchDocumentJob.execute(BatchDocumentJob.java:73)
	at com.oracle.javafx.scenebuilder.kit.editor.job.BatchSelectionJob.execute(BatchSelectionJob.java:66)
	at com.oracle.javafx.scenebuilder.kit.editor.job.BatchDocumentJob.execute(BatchDocumentJob.java:73)
	at com.oracle.javafx.scenebuilder.kit.editor.job.BatchSelectionJob.execute(BatchSelectionJob.java:66)
	at com.oracle.javafx.scenebuilder.kit.editor.job.reference.UpdateReferencesJob.execute(UpdateReferencesJob.java:78)
	at com.oracle.javafx.scenebuilder.kit.editor.JobManager.executeJob(JobManager.java:193)
	at com.oracle.javafx.scenebuilder.kit.editor.JobManager.push(JobManager.java:82)
	at com.oracle.javafx.scenebuilder.kit.editor.EditorController.performIncludeFxml(EditorController.java:1702)
	at com.oracle.javafx.scenebuilder.app.DocumentWindowController.performIncludeFxml(DocumentWindowController.java:1697)
	at com.oracle.javafx.scenebuilder.app.DocumentWindowController.performEditAction(DocumentWindowController.java:903)
	at com.oracle.javafx.scenebuilder.app.menubar.MenuBarController$DocumentEditActionController.perform(MenuBarController.java:1715)
	at com.oracle.javafx.scenebuilder.app.menubar.MenuBarController.handleOnActionMenu(MenuBarController.java:1207)
	at com.oracle.javafx.scenebuilder.app.menubar.MenuBarController.lambda$new$3(MenuBarController.java:1201)
	

Checking if sceneGraphObject is not null solves the issue.


@gluon-bot
Copy link
Author

Original comment by Abhinay Agarwal (Bitbucket: abhinayagarwal, GitHub: abhinayagarwal):


Fixed with PR #55.

@gluon-bot gluon-bot added major bug Something isn't working labels May 9, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working major
Projects
None yet
Development

No branches or pull requests

1 participant