Modify

Opened 6 years ago

Closed 6 years ago

Last modified 2 years ago

#9155 closed defect (fixed)

map style icon resizing tries to make zero height icons sometimes

Reported by: alv Owned by: Don-vip
Priority: normal Milestone: 13.11
Component: Core mappaint Version: tested
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Open josm-tested r6238
  2. install and activate style from here (more info about it at http://wiki.openstreetmap.org/wiki/Finland:Traffic_signs )
  3. download object, enter node 2330782287
  4. download

What is the expected result? No crash.

What happens instead? Recurring unexpected exception, until you turn off the fisigns mappaint style. Or purge the node.

Please provide any additional information below. Attach a screenshot if
possible.

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2013-09-20 01:34:27
Last Changed Author: Don-vip
Revision: 6238
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2013-09-20 00:19:19 +0200 (Fri, 20 Sep 2013)
Last Changed Rev: 6238

Identification: JOSM/1.5 (6238 fi) Windows 7 64-Bit
Memory Usage: 107 MB / 247 MB (53 MB allocated, but free)
Java version: 1.7.0_25, Oracle Corporation, Java HotSpot(TM) Client VM
Dataset consistency test: No problems found

Plugin: DirectUpload (29866)
Plugin: PicLayer (29854)
Plugin: editgpx (29854)
Plugin: geotools (29767)
Plugin: imagery_offset_db (29832)
Plugin: jts (29854)
Plugin: kendzi3d (232)
Plugin: kendzi3d-jogl (21)
Plugin: log4j (29853)
Plugin: measurement (29854)
Plugin: opendata (29938)
Plugin: openstreetbugs (29854)
Plugin: public_transport (29862)
Plugin: reverter (29854)
Plugin: turnlanes (29854)
Plugin: undelete (29854)
Plugin: utilsplugin2 (29854)
Plugin: waydownloader (29908)
Plugin: wikipedia (29854)

java.lang.IllegalArgumentException: Width (16) and height (0) must be non-zero
	at java.awt.image.ReplicateScaleFilter.<init>(Unknown Source)
	at java.awt.image.AreaAveragingScaleFilter.<init>(Unknown Source)
	at java.awt.Image.getScaledInstance(Unknown Source)
	at org.openstreetmap.josm.tools.ImageResource.getImageIcon(ImageResource.java:77)
	at org.openstreetmap.josm.tools.ImageResource.getImageIconBounded(ImageResource.java:123)
	at org.openstreetmap.josm.tools.ImageProvider.createBoundedImage(ImageProvider.java:923)
	at org.openstreetmap.josm.gui.mappaint.MapImage.getDisplayedNodeIcon(MapImage.java:165)
	at org.openstreetmap.josm.gui.mappaint.NodeElemStyle.paintPrimitive(NodeElemStyle.java:249)
	at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer$StyleCollector.drawAll(StyledMapRenderer.java:215)
	at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer.render(StyledMapRenderer.java:1423)
	at org.openstreetmap.josm.gui.layer.OsmDataLayer.paint(OsmDataLayer.java:320)
	at org.openstreetmap.josm.gui.MapView.paintLayer(MapView.java:533)
	at org.openstreetmap.josm.gui.MapView.paint(MapView.java:604)
	at javax.swing.JComponent.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$3.run(Unknown Source)
	at javax.swing.RepaintManager$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(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$1000(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$200(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$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 (5)

comment:1 Changed 6 years ago by alv

From what I can tell, it tries to rescale a 48x2 px icon, the height is rounded to zero -> exception.

comment:2 Changed 6 years ago by Don-vip

Owner: changed from team to Don-vip
Status: newassigned

comment:3 Changed 6 years ago by Don-vip

Resolution: fixed
Status: assignedclosed

In 6290/josm:

fix #9155 - map style icon resizing tries to make zero height icons sometimes

comment:4 Changed 6 years ago by Don-vip

Milestone: 13.11 (6383)

comment:5 Changed 2 years ago by stoecker

Milestone: 13.11 (6383)13.11

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
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.