Modify

#6643 closed defect (fixed)

[Patch] Exception when pasting URL into download bounding box window

Reported by: Zverikk Owned by: team
Priority: major Component: Core
Version: latest Keywords:
Cc:

Description (last modified by Zverikk)

When trying to paste URL http://www.openstreetmap.org/?box=yes&bbox=37.86794%2C55.06646%2C38.74723%2C55.54045 into "download bounding box" text field (this url is used in changesets), the following exception occured:

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2011-07-25 01:31:31
Last Changed Author: bastiK
Revision: 4263
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2011-07-25 00:48:51 +0200 (Mon, 25 Jul 2011)
Last Changed Rev: 4263

Identification: JOSM/1.5 (4263 ru)
Memory Usage: 55 MB / 247 MB (24 MB allocated, but free)
Java version: 1.6.0_20, Sun Microsystems Inc., Java HotSpot(TM) Client VM
Operating system: Windows XP

Plugin: ImproveWayAccuracy (26224)
Plugin: buildings_tools (26254)
Plugin: editgpx (26284)
Plugin: openstreetbugs (26299)
Plugin: reltoolbox (26299)
Plugin: reverter (26254)
Plugin: utilsplugin2 (26320)

java.lang.ArrayIndexOutOfBoundsException: 1
	at org.openstreetmap.josm.tools.OsmUrlToBounds.parse(OsmUrlToBounds.java:32)
	at org.openstreetmap.josm.gui.download.BoundingBoxSelection.parseURL(BoundingBoxSelection.java:181)
	at org.openstreetmap.josm.gui.download.BoundingBoxSelection.access$200(BoundingBoxSelection.java:51)
	at org.openstreetmap.josm.gui.download.BoundingBoxSelection$OsmUrlRefresher.insertUpdate(BoundingBoxSelection.java:295)
	at javax.swing.text.AbstractDocument.fireInsertUpdate(Unknown Source)
	at javax.swing.text.AbstractDocument.handleInsertString(Unknown Source)
	at javax.swing.text.AbstractDocument.insertString(Unknown Source)
	at javax.swing.text.PlainDocument.insertString(Unknown Source)
	at javax.swing.text.AbstractDocument.replace(Unknown Source)
	at javax.swing.text.JTextComponent.replaceSelection(Unknown Source)
	at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.handleReaderImport(Unknown Source)
	at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.importData(Unknown Source)
	at javax.swing.TransferHandler.importData(Unknown Source)
	at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.importData(Unknown Source)
	at javax.swing.TransferHandler$TransferAction.actionPerformed(Unknown Source)
	at javax.swing.text.JTextComponent.invokeAction(Unknown Source)
	at javax.swing.text.JTextComponent.paste(Unknown Source)
	at javax.swing.text.DefaultEditorKit$PasteAction.actionPerformed(Unknown Source)
	at javax.swing.SwingUtilities.notifyAction(Unknown Source)
	at javax.swing.JComponent.processKeyBinding(Unknown Source)
	at javax.swing.JComponent.processKeyBindings(Unknown Source)
	at javax.swing.JComponent.processKeyEvent(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.KeyboardFocusManager.redispatchEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(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.pumpEventsForFilter(Unknown Source)
	at java.awt.Dialog$1.run(Unknown Source)
	at java.awt.Dialog$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.Dialog.show(Unknown Source)
	at java.awt.Component.show(Unknown Source)
	at java.awt.Component.setVisible(Unknown Source)
	at java.awt.Window.setVisible(Unknown Source)
	at java.awt.Dialog.setVisible(Unknown Source)
	at org.openstreetmap.josm.gui.download.DownloadDialog.setVisible(DownloadDialog.java:354)
	at org.openstreetmap.josm.actions.DownloadAction.actionPerformed(DownloadAction.java:37)
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
	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.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(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 (1)

6643.patch (1.0 KB) - added by simon04 22 months ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 22 months ago by Zverikk

  • Description modified (diff)

comment:2 follow-up: Changed 22 months ago by rickmastfan67

I'm just curious, but why are you using a URL with a bounding box in it?

Downloading that same area with a normal URL ( http://www.openstreetmap.org/?lat=55.304&lon=38.308&zoom=10&layers=M ) works just fine. ;)

Anyways, I can duplicate it in r4264 with no plugins installed as well.

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2011-07-26 01:31:22
Last Changed Author: bastiK
Revision: 4264
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2011-07-25 12:24:22 +0200 (Mon, 25 Jul 2011)
Last Changed Rev: 4264

Identification: JOSM/1.5 (4264 en)
Memory Usage: 152 MB / 3640 MB (68 MB allocated, but free)
Java version: 1.6.0_26, Sun Microsystems Inc., Java HotSpot(TM) 64-Bit Server VM
Operating system: Windows 7


java.lang.ArrayIndexOutOfBoundsException: 1
	at org.openstreetmap.josm.tools.OsmUrlToBounds.parse(OsmUrlToBounds.java:32)
	at org.openstreetmap.josm.gui.download.BoundingBoxSelection.parseURL(BoundingBoxSelection.java:181)
	at org.openstreetmap.josm.gui.download.BoundingBoxSelection.access$200(BoundingBoxSelection.java:51)
	at org.openstreetmap.josm.gui.download.BoundingBoxSelection$OsmUrlRefresher.insertUpdate(BoundingBoxSelection.java:295)
	at javax.swing.text.AbstractDocument.fireInsertUpdate(Unknown Source)
	at javax.swing.text.AbstractDocument.handleInsertString(Unknown Source)
	at javax.swing.text.AbstractDocument.insertString(Unknown Source)
	at javax.swing.text.PlainDocument.insertString(Unknown Source)
	at javax.swing.text.AbstractDocument.replace(Unknown Source)
	at javax.swing.text.JTextComponent.replaceSelection(Unknown Source)
	at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.handleReaderImport(Unknown Source)
	at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.importData(Unknown Source)
	at javax.swing.TransferHandler.importData(Unknown Source)
	at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.importData(Unknown Source)
	at javax.swing.TransferHandler$TransferAction.actionPerformedImpl(Unknown Source)
	at javax.swing.TransferHandler$TransferAction.access$700(Unknown Source)
	at javax.swing.TransferHandler$TransferAction$1.run(Unknown Source)
	at javax.swing.TransferHandler$TransferAction$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at javax.swing.TransferHandler$TransferAction$2.run(Unknown Source)
	at javax.swing.TransferHandler$TransferAction$2.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at javax.swing.TransferHandler$TransferAction.actionPerformed(Unknown Source)
	at javax.swing.text.JTextComponent.invokeAction(Unknown Source)
	at javax.swing.text.JTextComponent.paste(Unknown Source)
	at javax.swing.text.DefaultEditorKit$PasteAction.actionPerformed(Unknown Source)
	at javax.swing.SwingUtilities.notifyAction(Unknown Source)
	at javax.swing.JComponent.processKeyBinding(Unknown Source)
	at javax.swing.JComponent.processKeyBindings(Unknown Source)
	at javax.swing.JComponent.processKeyEvent(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.KeyboardFocusManager.redispatchEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(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.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$2.run(Unknown Source)
	at java.awt.EventQueue$2.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.pumpEventsForFilter(Unknown Source)
	at java.awt.Dialog$1.run(Unknown Source)
	at java.awt.Dialog$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.Dialog.show(Unknown Source)
	at java.awt.Component.show(Unknown Source)
	at java.awt.Component.setVisible(Unknown Source)
	at java.awt.Window.setVisible(Unknown Source)
	at java.awt.Dialog.setVisible(Unknown Source)
	at org.openstreetmap.josm.gui.download.DownloadDialog.setVisible(DownloadDialog.java:354)
	at org.openstreetmap.josm.actions.DownloadAction.actionPerformed(DownloadAction.java:37)
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.AbstractButton.doClick(Unknown Source)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
	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.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(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.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$2.run(Unknown Source)
	at java.awt.EventQueue$2.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)

comment:3 in reply to: ↑ 2 Changed 22 months ago by Zverikk

Replying to rickmastfan67:

I'm just curious, but why are you using a URL with a bounding box in it?

Downloading that same area with a normal URL ( http://www.openstreetmap.org/?lat=55.304&lon=38.308&zoom=10&layers=M ) works just fine. ;)

To download a specific bounding box, of course :) With commas it works ok, but on osm.org the more frequent form is with %2C.

Changed 22 months ago by simon04

comment:4 Changed 22 months ago by simon04

Why not fix this? :-)

Whenever a "%" occurs in the URL, an attempt is made to decode it. Please test :-)

comment:5 Changed 22 months ago by simon04

  • Summary changed from Exception when pasting URL into download bounding box window to [Patch] Exception when pasting URL into download bounding box window

comment:6 Changed 22 months ago by stoecker

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

In [4298/josm]:

fix #6643 - patch mainly by simon04 - Exception when pasting URL into download bounding box window

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.