Modify

#7319 closed defect (fixed)

Exception in PicLayer with autoloaded calibration

Reported by: alv Owned by: alv
Priority: normal Component: Plugin piclayer
Version: latest Keywords: template_report exception click
Cc:

Description

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)

Attachments (0)

Change History (4)

comment:1 Changed 16 months ago by skyper

The step 5 exception looks very similar to #7312 introduced with [4822].

comment:2 Changed 16 months ago by Larry0ua

also strange thing is that mouseReleased is called when mousePressed not (exception should not happen without it) - and user even did not click on the view. very strange...

comment:3 Changed 16 months ago by Larry0ua

  • Owner changed from Larry0ua to alv
  • Status changed from new to needinfo

I fixed NPE at [o27435]
Waiting information from the creator if that is resolved

comment:4 Changed 16 months ago by alv

  • Resolution set to fixed
  • Status changed from needinfo to closed

Both exceptions are now history, with the latest plugin and [4870] josm. Closing.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.