#3443 closed defect (fixed)
Illegal value for attribute 'version' when loading OSM file
Reported by: | Owned by: | team | |
---|---|---|---|
Priority: | blocker | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | Cc: | teemu.koskinen@… |
Description
Today, having updated my josm to 2084 from 2066, I tried to load an osm file that I had saved yesterday. It failed with:
org.openstreetmap.josm.io.IllegalDataException: Illegal value for attribute 'version' on OSM primitive with id -1. Got 0 (at line 3, column 143)
at org.openstreetmap.josm.io.OsmReader.parseDataSet(OsmReader.java:580)
at org.openstreetmap.josm.io.OsmImporter.importData(OsmImporter.java:41)
at org.openstreetmap.josm.io.OsmImporter.importData(OsmImporter.java:33)
at org.openstreetmap.josm.actions.OpenFileAction.openFile(OpenFileAction.java:57)
at org.openstreetmap.josm.Main.downloadFromParamString(Main.java:537)
at org.openstreetmap.josm.Main.postConstructorProcessCmdLine(Main.java:388)
at org.openstreetmap.josm.gui.MainApplication$2.run(MainApplication.java:163)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Attachments (2)
Change History (12)
comment:1 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 15 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Hmm, not fixed here as you can see - BTW this is a 0.5 API file and all the elements appear
to have version 0 - don't know when that version info was put into file.
Revision: Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 14.0-b16 (Sun Microsystems Inc.)
Main-class: JOSM
Main-Version: 2088 SVN
Main-Date: 2009-09-09T17:38:48.279227Z
loading colorscheme
loading graphview
loading measurement
loading utilsplugin
loading wmsplugin
org.openstreetmap.josm.io.IllegalDataException: Illegal value for attribute 'version' on OSM primitive with id 84532064. Got 0 (at line 7, column 138)
at org.openstreetmap.josm.io.OsmReader.parseDataSet(OsmReader.java:583)
at org.openstreetmap.josm.io.OsmImporter.importData(OsmImporter.java:41)
at org.openstreetmap.josm.io.OsmImporter.importData(OsmImporter.java:33)
at org.openstreetmap.josm.actions.OpenFileAction.openFile(OpenFileAction.java:57)
at org.openstreetmap.josm.Main.downloadFromParamString(Main.java:537)
at org.openstreetmap.josm.Main.postConstructorProcessCmdLine(Main.java:388)
at org.openstreetmap.josm.gui.MainApplication$2.run(MainApplication.java:162)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
comment:3 by , 15 years ago
comment:4 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Reading 0.5 files with primitive versions set to 0 (event for primitives with id >0 which now always have a version >=1) supported again. Version 0 will not be preserved. On the next save the primitive will have version 1.
comment:5 by , 15 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Summary: | Illegal value for attribute 'version' when loading OSM file → [Patch] Illegal value for attribute 'version' when loading OSM file |
Don't work for me with 2300. Please check the added patch.
comment:6 by , 15 years ago
We shouldn't apply this patch. We don't allow version 0 on OsmPrimitives with an id > 0.
Could you please post an example file? I'll try to provide a fix in the IO subsystem, not in the core data package.
comment:7 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:8 by , 15 years ago
Cc: | added |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Summary: | [Patch] Illegal value for attribute 'version' when loading OSM file → Illegal value for attribute 'version' when loading OSM file |
Josm doesn't save version for objects that are new, thus it is now impossible to open files which contain new objects.
comment:9 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
(In [2086]) fixed #3443: Illegal value for attribute 'version' when loading OSM file