Modify

Opened 14 years ago

Closed 13 years ago

Last modified 6 years ago

#6123 closed defect (fixed)

piclayer crashes when loading .cal file saved by earlier piclayer version

Reported by: katpatuka Owned by: team
Priority: major Milestone:
Component: Plugin piclayer Version: tested
Keywords: piclayer calibration file .cal Cc:

Description (last modified by Larry0ua)

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.

Attachments (0)

Change History (6)

comment:1 by katpatuka, 14 years ago

Description: modified (diff)

comment:2 by katpatuka, 14 years ago

Note: may be the same bug as in ticket #6124 ...

comment:3 by stoecker, 14 years ago

Ticket #6124 has been marked as a duplicate of this ticket.

comment:4 by anonymous, 13 years ago

Ticket #6658 has been marked as a duplicate of this ticket.

comment:5 by Larry0ua, 13 years ago

Ticket #6222 has been marked as a duplicate of this ticket.

comment:6 by Larry0ua, 13 years ago

Description: modified (diff)
Resolution: fixed
Status: newclosed

fixed at [o27147] - should work partially - when any parameter is omitted at calibration file it will be set to default value (1 for scales, 0 for all other)
it should not help with problems like POSITION_X=0.5900306480055015, but I hope that it is rare and may be fixed with setting other projection in josm properties?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.