Modify

Opened 3 years ago

Last modified 3 years ago

#20929 new defect

Tried to import a defective geojson and JOSM crashed

Reported by: anonymous Owned by: team
Priority: normal Milestone:
Component: Core geojson Version:
Keywords: template_report Cc:

Description (last modified by skyper)

What steps will reproduce the problem?

Open this geojson:

    "type": "Feature",
    "geometry": {
        "type": "Polygon",
        "coordinates": [
            [
                16.22406,
                44.3489
            ],
            [
                16.19797,
                44.272
            ],
            [
                16.30577,
                44.15084
            ]
        ]
    }

What is the expected result?

What happens instead?

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

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-04-27 20:35:33 +0200 (Tue, 27 Apr 2021)
Build-Date:2021-04-27 21:58:39
Revision:17833
Relative:URL: ^/trunk

Identification: JOSM/1.5 (17833 en_GB) Windows 10 64-Bit
OS Build number: Windows 10 Pro 2009 (19042)
Memory Usage: 1071 MB / 1820 MB (762 MB allocated, but free)
Java version: 1.8.0_281-b09, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920×1080 (scaling 1.00×1.00) \Display1 1920×1080 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: Cp1250
System property sun.jnu.encoding: Cp1250
Locale info: en_GB
Numbers with default locale: 1234567890 -> 1234567890

Plugins:
+ ImportImagePlugin (35567)
+ apache-commons (35524)
+ ejml (35458)
+ geotools (35458)
+ imagery_offset_db (35640)
+ jts (35458)
+ log4j (35458)
+ measurement (35640)
+ pt_assistant (2.1.10-80-g7d9bba3)
+ reverter (35732)
+ tageditor (35640)
+ turnlanes (35640)
+ turnlanes-tagging (288)
+ turnrestrictions (35640)
+ utilsplugin2 (35691)

Map paint styles:
+ https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1

Last errors/warnings:
- 00063.003 W: Unable to find supported projection for layer dgu 2019_2020. Using EPSG:3857.
- 00063.005 W: Unable to find supported projection for layer dgu 2019_2020. Using EPSG:3857.
- 00425.274 E: Error while reading json file!
- 00425.275 E: org.openstreetmap.josm.io.IllegalDataException: javax.json.stream.JsonParsingException: Invalid token=SQUARECLOSE at (line no=1011, column no=9, offset=20758). Expected tokens are: [COMMA]. Cause: javax.json.stream.JsonParsingException: Invalid token=SQUARECLOSE at (line no=1011, column no=9, offset=20758). Expected tokens are: [COMMA]
- 00510.716 E: Error while reading json file!
- 00510.716 E: org.openstreetmap.josm.io.IllegalDataException: javax.json.stream.JsonParsingException: Invalid token=SQUARECLOSE at (line no=1011, column no=9, offset=20758). Expected tokens are: [COMMA]. Cause: javax.json.stream.JsonParsingException: Invalid token=SQUARECLOSE at (line no=1011, column no=9, offset=20758). Expected tokens are: [COMMA]
- 00650.143 E: Error while reading json file!
- 00650.144 E: org.openstreetmap.josm.io.IllegalDataException: javax.json.stream.JsonParsingException: Invalid token=SQUARECLOSE at (line no=1011, column no=9, offset=20758). Expected tokens are: [COMMA]. Cause: javax.json.stream.JsonParsingException: Invalid token=SQUARECLOSE at (line no=1011, column no=9, offset=20758). Expected tokens are: [COMMA]
- 00792.842 E: Handled by bug report queue: java.lang.ClassCastException: Cannot cast org.glassfish.json.JsonNumberImpl$JsonBigDecimalNumber to javax.json.JsonArray



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

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: main-worker-0 (19) of main
java.lang.ClassCastException: Cannot cast org.glassfish.json.JsonNumberImpl$JsonBigDecimalNumber to javax.json.JsonArray
	at java.lang.Class.cast(Unknown Source)
	at javax.json.JsonValue.asJsonArray(JsonValue.java:153)
	at org.openstreetmap.josm.io.GeoJSONReader.lambda$createWay$5(GeoJSONReader.java:296)
	at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
	at java.util.Iterator.forEachRemaining(Unknown Source)
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source)
	at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
	at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.util.stream.ReferencePipeline.collect(Unknown Source)
	at org.openstreetmap.josm.io.GeoJSONReader.createWay(GeoJSONReader.java:297)
	at org.openstreetmap.josm.io.GeoJSONReader.parsePolygon(GeoJSONReader.java:259)
	at org.openstreetmap.josm.io.GeoJSONReader.parseGeometry(GeoJSONReader.java:199)
	at org.openstreetmap.josm.io.GeoJSONReader.parseFeature(GeoJSONReader.java:147)
	at org.openstreetmap.josm.io.GeoJSONReader.parseRoot(GeoJSONReader.java:93)
	at org.openstreetmap.josm.io.GeoJSONReader.parse(GeoJSONReader.java:77)
	at org.openstreetmap.josm.io.GeoJSONReader.doParseDataSet(GeoJSONReader.java:411)
	at org.openstreetmap.josm.io.GeoJSONReader.parseDataSet(GeoJSONReader.java:476)
	at org.openstreetmap.josm.gui.io.importexport.GeoJSONImporter.importData(GeoJSONImporter.java:51)
	at org.openstreetmap.josm.gui.io.importexport.FileImporter.importDataHandleExceptions(FileImporter.java:103)
	at org.openstreetmap.josm.actions.OpenFileAction$OpenFileTask.importData(OpenFileAction.java:417)
	at org.openstreetmap.josm.actions.OpenFileAction$OpenFileTask.realRun(OpenFileAction.java:366)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:94)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:142)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

Attachments (0)

Change History (3)

comment:1 by simon04, 3 years ago

Component: CoreCore geojson

comment:2 by skyper, 3 years ago

Description: modified (diff)

comment:3 by skyper, 3 years ago

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to anonymous.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


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