tahti/ADTool2

Import option fails

Closed this issue · 1 comments

The bug can be easily reproduced by opening the ADTool-2.1.1-full.jar from scratch. That is, without any tree opened. Once you press import from xml, nothing happens and the log file gives the following:

D:>java -jar ADTool-2.1.1-full.jar
Jul 11, 2016 5:13:20 PM java.util.prefs.WindowsPreferences
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0
x80000002. Windows RegCreateKeyEx(...) returned error code 5.
ValuationDomain.java:107 readXML(): layout with treeId 1 domainId:1
ValuationDomain.java:107 readXML(): layout with treeId 3 domainId:1
ValuationDomain.java:107 readXML(): layout with treeId 2 domainId:1
ADToolMain.java:280 applyLayout(): applyLayout
DomainFactory.java:65 read(): Work area:null
DomainFactory.java:67 read(): Reading domain treeId 1 domainId 1
RankingDockable.java:85 setFocus(): Setting canvas with no node - using root

DomainFactory.java:81 read(): adding tree of domains with id:1
DomainFactory.java:65 read(): Work area:null
DomainFactory.java:67 read(): Reading domain treeId 3 domainId 1
RankingDockable.java:85 setFocus(): Setting canvas with no node - using root

DomainFactory.java:81 read(): adding tree of domains with id:3
DomainFactory.java:65 read(): Work area:null
DomainFactory.java:67 read(): Reading domain treeId 2 domainId 1
RankingDockable.java:85 setFocus(): Setting canvas with no node - using root

DomainFactory.java:81 read(): adding tree of domains with id:2
RankingDockable.java:85 setFocus(): Setting canvas with no node - using root

RankingDockable.java:85 setFocus(): Setting canvas with no node - using root

RankingDockable.java:85 setFocus(): Setting canvas with no node - using root

RankingDockable.java:85 setFocus(): Setting canvas with no node - using root

RankingDockable.java:85 setFocus(): Setting canvas with no node - using root

Options.java:195 tryLoadLayout(): Work Area after loading layout:null id:t
ree1_treeView
ADToolMain.java:169 main(): 2.1.1
ADToolMain.java:170 main(): C:\Users\rolando.trujillo\AppData\Local
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at lu.uni.adtool.ui.canvas.AbstractTreeCanvas.getRootLabel(AbstractTreeC
anvas.java:276)
at lu.uni.adtool.ui.FileHandler.getTreeFileNameForStream(FileHandler.jav
a:430)
at lu.uni.adtool.ui.FileHandler.getTreeFileNameWithExt(FileHandler.java:
408)
at lu.uni.adtool.ui.FileHandler.getImportTreeStream(FileHandler.java:154
)
at lu.uni.adtool.ui.MainController.importFrom(MainController.java:948)
at lu.uni.adtool.ui.MainController.access$500(MainController.java:57)
at lu.uni.adtool.ui.MainController$20.actionPerformed(MainController.jav
a:722)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown
Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionP
rivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionP
rivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionP
rivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

tahti commented

Issue is fixed in ADTool 2.2.0.