Modify

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#6821 closed defect (fixed)

509 - "You have downloaded to much data" causes unhandled exception

Reported by: rasher Owned by: team
Priority: major Milestone:
Component: Core Version:
Keywords: template_report Cc:

Description (last modified by Don-vip)

During my mapping I ended up exceeding OSM's bandwidth quota. At first I didn't realise that, since it simply looked like JOSM was crashing, the way I was doing it.

What steps will reproduce the problem?

  1. Download lots of data to get over the quota (damn)
  2. Download a single way through "Download Object"
  3. Try to use the "Download along way" plugin to download the area along the way

What is the expected result?

Either the request succeeds, or a useful error message is presented.

What happens instead?

An empty "error during download" message box and then a crash report.

Additionally, if I try to download an area through the slippy map, I'm simply told (instantly) that the connection timed out.

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

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2011-09-10 01:32:12
Last Changed Author: xeen
Revision: 4412
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2011-09-09 16:32:17 +0200 (Fri, 09 Sep 2011)
Last Changed Rev: 4412

Identification: JOSM/1.5 (4412 da)
Memory Usage: 306 MB / 910 MB (149 MB allocated, but free)
Java version: 1.6.0_22, Sun Microsystems Inc., Java HotSpot(TM) 64-Bit Server VM
Operating system: Windows 7
Dataset consistency test: No problems found

Plugin: FastDraw (26606)
Plugin: ImproveWayAccuracy (26610)
Plugin: buildings_tools (26606)
Plugin: download_along (26606)
Plugin: licensechange (26606)
Plugin: openvisible (26606)
Plugin: restart (26606)

java.lang.ClassCastException: javax.swing.JLabel cannot be cast to javax.swing.text.JTextComponent
	at javax.swing.text.html.EditableView.paint(Unknown Source)
	at javax.swing.text.BoxView.paintChild(Unknown Source)
	at javax.swing.text.BoxView.paint(Unknown Source)
	at javax.swing.text.BoxView.paintChild(Unknown Source)
	at javax.swing.text.BoxView.paint(Unknown Source)
	at javax.swing.text.ParagraphView.paint(Unknown Source)
	at javax.swing.text.html.ParagraphView.paint(Unknown Source)
	at javax.swing.text.BoxView.paintChild(Unknown Source)
	at javax.swing.text.BoxView.paint(Unknown Source)
	at javax.swing.text.html.BlockView.paint(Unknown Source)
	at javax.swing.text.BoxView.paintChild(Unknown Source)
	at javax.swing.text.BoxView.paint(Unknown Source)
	at javax.swing.text.html.BlockView.paint(Unknown Source)
	at javax.swing.plaf.basic.BasicHTML$Renderer.paint(Unknown Source)
	at javax.swing.plaf.basic.BasicLabelUI.paint(Unknown Source)
	at javax.swing.plaf.ComponentUI.update(Unknown Source)
	at javax.swing.JComponent.paintComponent(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintChildren(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintChildren(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintChildren(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintChildren(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintChildren(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintChildren(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JLayeredPane.paint(Unknown Source)
	at javax.swing.JComponent.paintChildren(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.paint(Unknown Source)
	at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
	at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
	at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
	at java.awt.Container.paint(Unknown Source)
	at java.awt.Window.paint(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
	at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(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.event.InvocationEvent.dispatch(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.progress.PleaseWaitProgressMonitor$3.run(PleaseWaitProgressMonitor.java:83)
	at java.awt.event.InvocationEvent.dispatch(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)

josm-toomuch-ok.png (35.5 KB ) - added by Don-vip 13 years ago.
This is the error message displayed from JOSM 4540 :)

Download all attachments as: .zip

Change History (18)

comment:1 by Don-vip, 13 years ago

Ticket #6846 has been marked as a duplicate of this ticket.

comment:2 by Don-vip, 13 years ago

Ticket #6138 has been marked as a duplicate of this ticket.

comment:3 by Don-vip, 13 years ago

Ticket #6549 has been marked as a duplicate of this ticket.

comment:4 by Don-vip, 13 years ago

Priority: normalmajor

comment:5 by Don-vip, 13 years ago

How should we handle this issue ? I think if we can evaluate the amount of data that is going to be downloaded (in case of an update, it should be possible), and compare it to the bandwidth limit (does someone know this value ?), JOSM could display a confirmation popup before updating the data for good, explaining to the user that this operation could lead him to be unable to download any more data for some time.

In all cases, we should handle properly the 509 HTTP error code to make a comprehensible error message.

comment:6 by rasher, 13 years ago

This is not a one-time download limit, but rather me getting rate-limited due to downloading lots of data during the past couple of hours. Indeed the individual download I tried at the time I generated this ticket was just a few hundred square metres. So I don't think JOSM can reasonably guess that it's going to be over the limit. Simply reacting sensibly to the error should be sufficient, I'd say.

comment:7 by Don-vip, 13 years ago

Ticket #5738 has been marked as a duplicate of this ticket.

comment:8 by Don-vip, 13 years ago

Ticket #5666 has been marked as a duplicate of this ticket.

comment:9 by Don-vip, 13 years ago

Ticket #5632 has been marked as a duplicate of this ticket.

comment:10 by Don-vip, 13 years ago

Ticket #6478 has been marked as a duplicate of this ticket.

comment:11 by Don-vip, 13 years ago

Ticket #6196 has been marked as a duplicate of this ticket.

comment:12 by Don-vip, 13 years ago

OK, it seems the bug is not strictly related to the reception of a HTTP 509 error code but an internal Swing anomaly when displaying special HTML characters in a JOptionPane. The toString() method of OsmApiException uses '<' and '>', we need to escape these characters to avoid this problem. Fix in progress (I'm trying to reach this bandwidth limit to validate my patch).

comment:13 by Don-vip, 13 years ago

In [4482/josm]:

see #6821 - HTTP error 509 - "You have downloaded to much data" causes unhandled exception in HTML pane

comment:14 by Don-vip, 13 years ago

Should be fixed, let me know if you manage to get a proper 509 error dialog (I only achieved to get a HTTP 500 error).

comment:15 by Don-vip, 13 years ago

Description: modified (diff)
Resolution: fixed
Status: newclosed

comment:16 by Don-vip, 13 years ago

In [4540/josm]:

see #6821 - Proper error dialog with HTTP 509 error code

by Don-vip, 13 years ago

Attachment: josm-toomuch-ok.png added

This is the error message displayed from JOSM 4540 :)

comment:17 by gribeco, 13 years ago

With 4549, I'm getting a proper 509 error message. 4487 would just tell me that communication with the API server timed out (instantly).

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.