Modify

Opened 15 months ago

Closed 15 months ago

Last modified 15 months ago

#23134 closed defect (fixed)

Cancelling large overpass download can lead to error

Reported by: watmildon Owned by: team
Priority: normal Milestone: 23.08
Component: Core Version:
Keywords: template_report Cc:

Description (last modified by taylor.smock)

What steps will reproduce the problem?

  1. I realized this Overpass query was goin to be unmanageable when it hit ~25MB downloaded so I hit cancel
    [out:json][timeout:500];
    // gather results
    {{geocodeArea:"California, United States"}}->.a;
    (
      nwr["tiger:PLACENS"](area.a);
      nwr["gnis:id"](area.a);
    );
    // print results
    out body;
    >;
    out skel qt;
    

What is the expected result?

Download stops and I can continue on my way

What happens instead?

Error

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

Revision:18789
Build-Date:2023-08-01 13:06:18

Identification: JOSM/1.5 (18789 en) Windows 10 64-Bit
OS Build number: Windows 10 Pro 2009 (19045)
Memory Usage: 3028 MB / 4088 MB (2123 MB allocated, but free)
Java version: 17.0.8+7-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1440×2560 (scaling 1.00×1.00) \Display1 3840×2160 (scaling 1.50×1.50)
Maximum Screen Size: 3840×2560
Best cursor sizes: 16×16→48×48, 32×32→48×48
System property file.encoding: Cp1252
System property sun.jnu.encoding: Cp1252
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.18789, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\JOSM.exe]

Plugins:
+ FastDraw (36097)
+ FixAddresses (36062)
+ MapRoulette (21)
+ apache-commons (36034)
+ apache-http (35924)
+ buildings_tools (36097)
+ conflation (0.6.11)
+ continuosDownload (1.3.4)
+ contourmerge (v0.1.9)
+ damn (0.12.1)
+ ejml (35924)
+ geotools (36068)
+ gridify (1606242219)
+ imagery_offset_db (36079)
+ jackson (36034)
+ javafx (36086)
+ jaxb (35952)
+ jna (36005)
+ jts (36004)
+ log4j (36045)
+ mapwithai (810)
+ opendata (36097)
+ reltoolbox (36103)
+ reverter (36066)
+ tageditor (36097)
+ terracer (36079)
+ todo (132)
+ turnrestrictions (36097)
+ undelete (36066)
+ utilsplugin2 (36097)
+ wikipedia (605)

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/TigerReviewedNo&zip=1
+ %UserProfile%\Address Tags Validator - Highlight unaddressed
- https://josm.openstreetmap.de/josmfile?page=Styles/Modified&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/AddressValidator&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/MapWithAI&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Admin_Boundaries&zip=1
+ C:\OSM\mapwiaipaintstyle

Validator rules:
+ C:\OSM\Validator\GNISFixup.validator.mapcss

Last errors/warnings:
- 269897.887 E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Header=<You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm>
- 269897.892 E: Bad Request - <html>The OSM server 'api.openstreetmap.org' reported a bad request.<br><br>The area you tried to download is too big or your request was too large.<br>Either request a smaller area or use an export file provided by the OSM community.</html>
- 349509.588 E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Header=<You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm>
- 349509.600 E: Bad Request - <html>The OSM server 'api.openstreetmap.org' reported a bad request.<br><br>The area you tried to download is too big or your request was too large.<br>Either request a smaller area or use an export file provided by the OSM community.</html>
- 353868.858 E: Error header: Version mismatch: Provided 4, server had: 5 of Relation 169443
- 353869.034 E: Conflicts detected - <html>Uploading <strong>failed</strong> because the server has a newer version of one<br>of your nodes, ways, or relations.<br>The conflict is caused by the <strong>relation</strong> with id <strong>169 443</strong>,<br>the server has version 5, your version is 4.<br><br>Click <strong>Synchronize relation 169 443 only</strong> to synchronize the conflicting primitive only.<br>Click <strong>Synchronize entire dataset</strong> to synchronize the entire local dataset with the server.<br>Click <strong>Cancel</strong> to abort and continue editing.<br></html>
- 353912.130 E: Error header: Version mismatch: Provided 5, server had: 6 of Relation 169450
- 353912.273 E: Conflicts detected - <html>Uploading <strong>failed</strong> because the server has a newer version of one<br>of your nodes, ways, or relations.<br>The conflict is caused by the <strong>relation</strong> with id <strong>169 450</strong>,<br>the server has version 6, your version is 5.<br><br>Click <strong>Synchronize relation 169 450 only</strong> to synchronize the conflicting primitive only.<br>Click <strong>Synchronize entire dataset</strong> to synchronize the entire local dataset with the server.<br>Click <strong>Cancel</strong> to abort and continue editing.<br></html>
- 365290.937 W: Unsaved changes - <html>The relation has been changed.<br><br>Do you want to save your changes?</html>
- 369989.652 E: Handled by bug report queue: jakarta.json.JsonException: I/O error while parsing JSON. Cause: java.io.IOException: stream is closed



=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (23) of main
jakarta.json.JsonException: I/O error while parsing JSON
	at org.eclipse.parsson.JsonTokenizer.read(JsonTokenizer.java:468)
	at org.eclipse.parsson.JsonTokenizer.readString(JsonTokenizer.java:151)
	at org.eclipse.parsson.JsonTokenizer.nextToken(JsonTokenizer.java:357)
	at org.eclipse.parsson.JsonParserImpl$ObjectContext.getNextEvent(JsonParserImpl.java:495)
	at org.eclipse.parsson.JsonParserImpl.next(JsonParserImpl.java:382)
	at org.eclipse.parsson.JsonParserImpl.getObject(JsonParserImpl.java:346)
	at org.eclipse.parsson.JsonParserImpl.getValue(JsonParserImpl.java:180)
	at org.eclipse.parsson.JsonParserImpl.getArray(JsonParserImpl.java:326)
	at org.eclipse.parsson.JsonParserImpl.getValue(JsonParserImpl.java:178)
	at org.eclipse.parsson.JsonParserImpl.getObject(JsonParserImpl.java:347)
	at org.eclipse.parsson.JsonParserImpl.getObject(JsonParserImpl.java:171)
	at org.openstreetmap.josm.io.OsmJsonReader.parse(OsmJsonReader.java:60)
	at org.openstreetmap.josm.io.OsmJsonReader.lambda$doParseDataSet$6(OsmJsonReader.java:187)
	at org.openstreetmap.josm.io.AbstractReader.doParseDataSet(AbstractReader.java:326)
	at org.openstreetmap.josm.io.AbstractReader.doParseDataSet(AbstractReader.java:309)
	at org.openstreetmap.josm.io.OsmJsonReader.doParseDataSet(OsmJsonReader.java:185)
	at org.openstreetmap.josm.io.OverpassDownloadReader.parseDataSet(OverpassDownloadReader.java:394)
	at org.openstreetmap.josm.io.BoundingBoxDownloader.parseOsm(BoundingBoxDownloader.java:215)
	at org.openstreetmap.josm.io.OverpassDownloadReader.parseOsm(OverpassDownloadReader.java:400)
	at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.parseDataSet(DownloadOsmTask.java:469)
	at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.realRun(DownloadOsmTask.java:477)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:94)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:142)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: stream is closed
	at java.base/sun.net.www.http.ChunkedInputStream.ensureOpen(Unknown Source)
	at java.base/sun.net.www.http.ChunkedInputStream.read(Unknown Source)
	at java.base/java.io.FilterInputStream.read(Unknown Source)
	at java.base/sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown Source)
	at org.openstreetmap.josm.io.ProgressInputStream.read(ProgressInputStream.java:49)
	at java.base/java.util.zip.InflaterInputStream.fill(Unknown Source)
	at java.base/java.util.zip.InflaterInputStream.read(Unknown Source)
	at java.base/java.util.zip.GZIPInputStream.read(Unknown Source)
	at java.base/java.io.FilterInputStream.read(Unknown Source)
	at java.base/java.io.PushbackInputStream.read(Unknown Source)
	at java.base/sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
	at java.base/sun.nio.cs.StreamDecoder.implRead(Unknown Source)
	at java.base/sun.nio.cs.StreamDecoder.read(Unknown Source)
	at java.base/java.io.InputStreamReader.read(Unknown Source)
	at org.eclipse.parsson.JsonTokenizer.fillBuf(JsonTokenizer.java:497)
	at org.eclipse.parsson.JsonTokenizer.read(JsonTokenizer.java:458)
	... 27 more

Attachments (0)

Change History (4)

comment:1 by taylor.smock, 15 months ago

Milestone: 23.08

comment:2 by taylor.smock, 15 months ago

Description: modified (diff)

Thanks for the bug report.

Side note: You can wrap code blocks with {{{ and }}}.

comment:3 by taylor.smock, 15 months ago

Resolution: fixed
Status: newclosed

In 18816/josm:

Fix #23134: Cancelling a json download will cause an exception dialog

We extract the underlying IOException from the JsonException into an
IllegalDataException which can be parsed by calling methods and properly handled.

comment:4 by watmildon, 15 months ago

Good tip about the code blocks!

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.