﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6123	piclayer crashes when loading .cal file saved by earlier piclayer version	katpatuka	team	"After update to latest stable josm/piclayer and trying to open previously saved piclayers with their corresponding calibration files plugin crashed

 java.lang.NullPointerException
        at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
        at java.lang.Double.valueOf(Unknown Source)
        at org.openstreetmap.josm.plugins.piclayer.PicLayerAbstract.loadCalibration(PicLayerAbstract.java:386)
        at org.openstreetmap.josm.plugins.piclayer.PicLayerAbstract.loadCalibration(PicLayerAbstract.java:368)
        at org.openstreetmap.josm.plugins.piclayer.PicLayerFromFile.createImage(PicLayerFromFile.java:105)
        at org.openstreetmap.josm.plugins.piclayer.PicLayerAbstract.initialize(PicLayerAbstract.java:134)
        at org.openstreetmap.josm.plugins.piclayer.NewLayerFromFileAction.actionPerformed(NewLayerFromFileAction.java:114)
        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.BasicPopupMenuUI$Actions.doReturn(Unknown Source)
        at javax.swing.plaf.basic.BasicPopupMenuUI$Actions.actionPerformed(Unknown Source)
        at javax.swing.SwingUtilities.notifyAction(Unknown Source)
        at javax.swing.JComponent.processKeyBinding(Unknown Source)
        at javax.swing.KeyboardManager.fireBinding(Unknown Source)
        at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)
        at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)
        at javax.swing.JComponent.processKeyBindings(Unknown Source)
        at javax.swing.JComponent.processKeyEvent(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.KeyboardFocusManager.redispatchEvent(Unknown Source)
        at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
        at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
        at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
        at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(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.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)

As far as I found out the new settings `SHEARX` and `SHEARY` which are missing in the old version cause the problem - adding 
{{{
 SHEARX=0.0
 SHEARY=0.0
}}}
manually to the .cal file solves the problem. On the other hand `POSITION_X` and `POSITION_Y` do not fit anymore: old .cal file reads:

{{{
 POSITION_X=0.5900306480055015
 POSITION_Y=0.6869702311069824
}}}

while new cal file (after recalibration) read:

{{{
 POSITION_Y=4383475.1191557925
 POSITION_X=3763968.906476004
}}}

so the values differ quite a lot."	defect	closed	major		Plugin piclayer	tested	fixed	piclayer calibration file .cal	
