Project

General

Profile

Bug #3569

Trying to assign categories to a question for assessment fails when not running from within Morpho

Added by Ryan McFall almost 11 years ago. Updated almost 11 years ago.

Status:
Resolved
Priority:
Normal
Category:
parser
Target version:
Start date:
10/25/2008
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
3569

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.

History

#1 Updated by ben leinfelder almost 11 years ago

moving the call to getDialogParent() into a try/catch block.
since we don't plan on this being run outside of Morpho, we'll just ignore the fact that it is being done - the parent can be null with [hopefully] little side effect.

#2 Updated by Redmine Admin over 6 years ago

Original Bugzilla ID was 3569

Also available in: Atom PDF