Opened 7 years ago

Closed 7 years ago

#8577 closed defect (fixed)

Exception with empty SVG as image

Reported by: imagic Owned by: team
Priority: trivial Milestone:
Component: Core mappaint Version: latest
Keywords: Cc:


The following MapCSS style creates an IllegalArgumentException when at least one node is displayed. JOSM has to be killed afterwards.

1) MapCSS style: an empty SVG is given as icon image.

icon-image: "data:image/svg+xml,<svg></svg>";


2) Bug report from JOSM
Repository Root:
Build-Date: 2013-04-03 01:34:03
Last Changed Author: stoecker
Revision: 5823
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last Changed Date: 2013-04-02 17:45:13 +0200 (Tue, 02 Apr 2013)
Last Changed Rev: 5823

Identification: JOSM/1.5 (5823 de) Linux
Memory Usage: 169 MB / 853 MB (38 MB allocated, but free)
Java version: 1.6.0_20, Sun Microsystems Inc., Java HotSpot(TM) Server VM
Operating system: Linux
Dataset consistency test: No problems found

Plugin: buildings_tools (29210)
Plugin: imagery_offset_db (29450)
Plugin: openstreetbugs (29373)
Plugin: openvisible (29222)
Plugin: reverter (29359)
Plugin: turnrestrictions (29210)
Plugin: utilsplugin2 (29392)

java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0

at java.awt.image.DirectColorModel.createCompatibleWritableRaster(
at java.awt.image.BufferedImage.<init>(
at org.openstreetmap.josm.gui.mappaint.MapImage.getImage(
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(
at javax.swing.JComponent.paint(
at javax.swing.JComponent.paintToOffscreen(
at javax.swing.BufferStrategyPaintManager.paint(
at javax.swing.RepaintManager.paint(
at javax.swing.JComponent._paintImmediately(
at javax.swing.JComponent.paintImmediately(
at javax.swing.RepaintManager.paintDirtyRegions(
at javax.swing.RepaintManager.paintDirtyRegions(
at javax.swing.RepaintManager.seqPaintDirtyRegions(
at javax.swing.SystemEventQueueUtilities$
at java.awt.event.InvocationEvent.dispatch(
at java.awt.EventQueue.dispatchEvent(
at java.awt.EventDispatchThread.pumpOneEventForFilters(
at java.awt.EventDispatchThread.pumpEventsForFilter(
at java.awt.EventDispatchThread.pumpEventsForHierarchy(
at java.awt.EventDispatchThread.pumpEvents(
at java.awt.EventDispatchThread.pumpEvents(

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 5830/josm:

fix #8577 - Exception with empty SVG as image

Modify Ticket

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