﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
7319	Exception in PicLayer with autoloaded calibration	alv	alv	"What steps will reproduce the problem?
 1. Calibrate a picture, let josm save the calibration on exit
 2. Restart josm, load a bit of data
 3. Reopen the previous picture file, (let it reload the calibration if it asks)
 4. Activate the piclayer layer
 5. Exception (see end for that), ignore it
 6. select the ""Drag or create point on the picture tool"" (the picture does not have previous control points)
 7. Don't add any calibration points. Drag the map view with a left click-drag.
 8. Exception in plugin PicLayer.

In version r4806 the exception at step 5 never happens, in r4869 it always does for the first activation. The step 8 exception happens in both, and as many times as you drag. If you add a point in step 7 or after step 8, it doesn't (anymore).

This is for the exception at step 8:
{{{
Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2012-01-25 02:32:20
Last Changed Author: jttt
Revision: 4869
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2012-01-24 21:52:43 +0100 (Tue, 24 Jan 2012)
Last Changed Rev: 4869

Identification: JOSM/1.5 (4869 fi)
Memory Usage: 77 MB / 247 MB (33 MB allocated, but free)
Java version: 1.6.0_29, Sun Microsystems Inc., Java HotSpot(TM) Client VM
Operating system: Windows 7
Dataset consistency test: No problems found

Plugin: PicLayer (27403)
Plugin: editgpx (27289)
Plugin: measurement (27289)
Plugin: openstreetbugs (27355)
Plugin: reverter (27393)
Plugin: turnlanes (27355)
Plugin: undelete (27395)
Plugin: waydownloader (27289)

java.lang.NullPointerException
	at org.openstreetmap.josm.plugins.piclayer.actions.GenericPicTransformAction.mouseReleased(GenericPicTransformAction.java:90)
	at java.awt.AWTEventMulticaster.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.Li
}}}

This is for the exception at step 5:

{{{
java.lang.IllegalArgumentException: Width (-1) and height (-1) cannot be <= 0
	at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)
	at java.awt.image.BufferedImage.<init>(Unknown Source)
	at org.openstreetmap.josm.tools.ImageProvider.createRotatedImage(ImageProvider.java:789)
	at org.openstreetmap.josm.data.osm.visitor.paint.MapPainter.drawRestriction(MapPainter.java:903)
	at org.openstreetmap.josm.data.osm.visitor.paint.MapPainter.drawRestriction(MapPainter.java:1087)
	at org.openstreetmap.josm.gui.mappaint.NodeElemStyle.paintPrimitive(NodeElemStyle.java:307)
	at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer$StyleCollector.drawAll(StyledMapRenderer.java:140)
	at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer.render(StyledMapRenderer.java:233)
	at org.openstreetmap.josm.gui.layer.OsmDataLayer.paint(OsmDataLayer.java:264)
	at org.openstreetmap.josm.gui.MapView.paintLayer(MapView.java:455)
	at org.openstreetmap.josm.gui.MapView.paint(MapView.java:534)
	at javax.swing.JComponent.paintChildren(Unknown Source)
	at javax.swing.JSplitPane.paintChildren(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintToOffscreen(Unknown Source)
	at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
	at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
	at javax.swing.RepaintManager.paint(Unknown Source)
	at javax.swing.JComponent._paintImmediately(Unknown Source)
	at javax.swing.JComponent.paintImmediately(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.access$700(Unknown Source)
	at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$000(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(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)
}}}
"	defect	closed	normal		Plugin piclayer	latest	fixed	template_report exception click	
