Bug #3569
closedTrying to assign categories to a question for assessment fails when not running from within Morpho
0%
Description
When I select a question on a newly parsed exam and then click the "Add Category" button, I get the following stack strace:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at edu.ucsb.nceas.morpho.first.plugins.wizard.EdMLWizardContainerFrame.getDialogParent(EdMLWizardContainerFrame.java:998)
at edu.ucsb.nceas.morpho.first.plugins.wizard.pages.KeywordsPage.<init>(KeywordsPage.java:70)
at edu.ucsb.nceas.morpho.first.plugins.wizard.EdMLWizardPageLibrary.getPage(EdMLWizardPageLibrary.java:112)
at edu.msu.first.parser.gui.actions.AddCategoryAction.actionPerformed(AddCategoryAction.java:60)
It appears that the problem is that UIController.getInstance() (called from EdMLWizardContainerFrame.getDialogParent) returns null outside the context of Morpho.
I propose that if UIController.getInstance() returns null that we use MainWindow.getInstance() as the dialog parent here.