Opened 7 years ago

Closed 7 years ago

#13264 closed defect (fixed)

typo in aerial imagery url makes josm crash

Reported by: kdano Owned by: team
Priority: minor Milestone: 16.07
Component: Core imagery Version:
Keywords: template_report wms url tms Cc:


What steps will reproduce the problem?

  1. I accidentally set the zoom levels of a new aerial imagery to be "[17-19]" instead of "[17,19]"
  2. Then loaded the imagery.

What is the expected result?

I guess it should tell me that the syntax is wrong.

What happens instead?

Crashes and tells me to submit a bug report. So here it is.

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

Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-07-11 23:04:49 +0200 (Mon, 11 Jul 2016)
Build-Date:2016-07-12 01:31:48
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10526 en) Linux Fedora release 24 (Twenty Four)
Memory Usage: 214 MB / 1742 MB (47 MB allocated, but free)
Java version: 1.8.0_101-b14, Oracle Corporation, OpenJDK 64-Bit Server VM
WebStart package: icedtea-web:x86_64-1.6.2
VM arguments: [, -Dicedtea-web.bin.location=/usr/bin/javaws.itweb]
Dataset consistency test: No problems found

- buildings_tools (32639)
- imagery_offset_db (32528)
- reverter (32584)
- turnlanes (32584)
- undelete (32584)
- utilsplugin2 (32584)

Tagging presets:

Last errors/warnings:
- W: Unable to delete file <josm.pref>/cache/tiles/WMS.key
- W: Unable to delete file <josm.pref>/cache/tiles/
- W: Unable to delete file <josm.pref>/cache/tiles/WMS_BLOCK.key
- W: Unable to delete file <josm.pref>/cache/tiles/
- W: Unable to delete file <josm.pref>/cache/tiles/WMS_INDEX.key
- W: Unable to delete file <josm.pref>/cache/tiles/
- W: Unable to delete file <josm.pref>/cache/tiles/WMS_INDEX_v2.key
- W: Unable to delete file <josm.pref>/cache/tiles/
- E: java.lang.IllegalArgumentException: {z} is not a valid WMS argument. Please check this server URL:
- E: java.lang.IllegalArgumentException: {z} is not a valid WMS argument. Please check this server URL:

 - layer: org.openstreetmap.josm.gui.layer.WMSLayer@4b48a18f

 - listener: org.openstreetmap.josm.gui.MapView[,0,0,911x886,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=java.awt.Dimension[width=10,height=0],preferredSize=]
 - event: LayerAddEvent [addedLayer=org.openstreetmap.josm.gui.layer.WMSLayer@4b48a18f]

Thread: AWT-EventQueue-2 (23) of JOSM
java.lang.IllegalArgumentException: {z} is not a valid WMS argument. Please check this server URL:
	at org.openstreetmap.josm.gui.layer.WMSLayer.getTileSource(
	at org.openstreetmap.josm.gui.layer.WMSLayer.getTileSource(
	at org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer.initializeIfRequired(
	at org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer.attachToMapView(
	at org.openstreetmap.josm.gui.MapView.layerAdded(
	at org.openstreetmap.josm.gui.layer.LayerManager.fireLayerAdded(
	at org.openstreetmap.josm.gui.layer.LayerManager.realAddLayer(
	at org.openstreetmap.josm.gui.layer.MainLayerManager.realAddLayer(
	at org.openstreetmap.josm.gui.layer.LayerManager$
	at org.openstreetmap.josm.gui.util.GuiHelper.runInEDTAndWaitWithException(
	at org.openstreetmap.josm.gui.layer.LayerManager.addLayer(
	at org.openstreetmap.josm.actions.AddImageryLayerAction.actionPerformed(
	at javax.swing.AbstractButton.fireActionPerformed(
	at javax.swing.AbstractButton$Handler.actionPerformed(
	at javax.swing.DefaultButtonModel.fireActionPerformed(
	at javax.swing.DefaultButtonModel.setPressed(
	at javax.swing.AbstractButton.doClick(
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(
	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(
	at java.awt.AWTEventMulticaster.mouseReleased(
	at java.awt.Component.processMouseEvent(
	at javax.swing.JComponent.processMouseEvent(
	at java.awt.Component.processEvent(
	at java.awt.Container.processEvent(
	at java.awt.Component.dispatchEventImpl(
	at java.awt.Container.dispatchEventImpl(
	at java.awt.Component.dispatchEvent(
	at java.awt.LightweightDispatcher.retargetMouseEvent(
	at java.awt.LightweightDispatcher.processMouseEvent(
	at java.awt.LightweightDispatcher.dispatchEvent(
	at java.awt.Container.dispatchEventImpl(
	at java.awt.Window.dispatchEventImpl(
	at java.awt.Component.dispatchEvent(
	at java.awt.EventQueue.dispatchEventImpl(
	at java.awt.EventQueue.access$500(
	at java.awt.EventQueue$
	at java.awt.EventQueue$
	at Method)
	at java.awt.EventQueue$
	at java.awt.EventQueue$
	at Method)
	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 (4)

comment:1 Changed 7 years ago by Don-vip

Component: CoreCore imagery
Keywords: wms url added
Milestone: 16.07

comment:2 Changed 7 years ago by simon04

Due to [17-19] the TMS entry is erroneously considered as WMS entry. This test fails:

  • test/unit/org/openstreetmap/josm/data/imagery/

    diff --git a/test/unit/org/openstreetmap/josm/data/imagery/ b/test/unit/org/openstreetmap/josm/data/imagery/
    index 52b62d3..2f684ab 100644
    a b public void testGetExtendedUrl() { 
    4141        assertEquals("tms[16,23]:http://localhost", testImageryTMS.getExtendedUrl());
    4242    }
     44    @Test
     45    public void testConstruct() throws Exception {
     46        final ImageryInfo info = new ImageryInfo("test imagery", "tms[16-23]:http://localhost");
     47        assertEquals(ImageryInfo.ImageryType.TMS, info.getImageryType());
     48        assertEquals(16, info.getMinZoom());
     49        assertEquals(23, info.getMaxZoom());
     50        assertEquals("http://localhost", info.getUrl());
     51    }
    4453    /**
    4554     * Tests the {@linkplain Preferences#serializeStruct(Object, Class) serialization} of {@link ImageryInfo.ImageryPreferenceEntry}
    4655     */

comment:3 Changed 7 years ago by Don-vip

Keywords: tms added

comment:4 Changed 7 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 10735/josm:

fix #13264 - more lenient TMS url regex to allow - zoom separator

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.