Opened 10 years ago

Closed 10 years ago

#7319 closed defect (fixed)

Exception in PicLayer with autoloaded calibration

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


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:
Build-Date: 2012-01-25 02:32:20
Last Changed Author: jttt
Revision: 4869
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
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)

	at org.openstreetmap.josm.plugins.piclayer.actions.GenericPicTransformAction.mouseReleased(
	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.gui.mappaint.NodeElemStyle.paintPrimitive(
	at org.openstreetmap.josm.gui.layer.OsmDataLayer.paint(
	at org.openstreetmap.josm.gui.MapView.paintLayer(
	at org.openstreetmap.josm.gui.MapView.paint(
	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$ 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$ Source)
	at java.awt.EventQueue$ Source)
	at Method)
	at$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 Source)

Attachments (0)

Change History (4)

comment:1 Changed 10 years ago by skyper

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

comment:2 Changed 10 years 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 10 years ago by Larry0ua

Owner: changed from Larry0ua to alv
Status: newneedinfo

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

comment:4 Changed 10 years ago by alv

Resolution: fixed
Status: needinfoclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain alv.
as The resolution will be set.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.