#25025 closed defect (irreproducible)
Created an unreadable/unuploadable file
| Reported by: | Owned by: | team | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Core | Version: | latest |
| Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
I was doing an import that requires merging objects (ways/relations) from one layer to another. I was doing it using the Conflate plugin and some of it using Edit/Merge selection. Not sure exactly what action made the layer invalid.
What is the expected result?
Being able to open the file and to upload it
What happens instead?
I was unable to upload the file (got a cryptic message described in #25022), reported it like is described in Help/ErrorMessages, saved the merged layer as file and called it a day. Today I tried opening that file and got a simular message to upload one ("Relation with external id '-491' refers to a missing primitive with external id '-621'")
Please provide any additional information below. Attach a screenshot if possible.
I would've attached the corrupted file, but can't really find an option to do so.
Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2026-11-04 14:01:56 +0100 (Wed, 04 Nov 2026)
Revision:19678
Build-Date:2026-11-07 02:30:57
URL:https://josm.openstreetmap.de/svn/trunk
Identification: JOSM/1.5 (19678 en) Linux NixOS 26.11 (Zokor)
Memory Usage: 428 MB / 7812 MB (228 MB allocated, but free)
Java version: 21.0.13.0.2+1-nixos, N/A, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 2560x1440x[Multi depth]@180Hz (scaling 1.00×1.00) :0.1 2560x1440x[Multi depth]@144Hz (scaling 1.00×1.00)
Maximum Screen Size: 2560×1440
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: en_US.UTF-8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
Desktop environment: Hyprland
VM arguments: [--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, -Djosm.restart=true, -Djava.net.useSystemProxies=true, -Dawt.useSystemAAFontSettings=gasp]
Plugins:
+ Mapillary (1822)
+ OpeningHoursEditor (36493)
+ PicLayer (275)
+ ReplaceRelations (1.0)
+ Review.Changes (1.1.1)
+ RoadSigns (36503)
+ account_manager (0.3.2)
+ apache-commons (36483)
+ buildings_tools (36503)
+ conflation (280)
+ ejml (36483)
+ geotools (36483)
+ gridify (61)
+ jackson (36502)
+ jaxb (36483)
+ jdsp (1791284839)
+ jogl (1.2.3)
+ jts (36483)
+ log4j (36483)
+ multipoly-gone (0.9.0.0)
+ notesolver (0.5.0)
+ opendata (36503)
+ openqa (116)
+ panoramax (8)
+ pt_assistant (685)
+ reverter (36503)
+ scripting (v0.4.3)
+ splinex (36483)
+ turnrestrictions (36503)
+ utilsplugin2 (36503)
+ wikipedia (448)
Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/Wikidata&zip=1
+ https://github.com/baltpeter/id-tagging-schema-to-josm/releases/latest/download/id-presets-en-light.zip
+ ${HOME}/Code/PopulationPreset.xml
+ https://josm.openstreetmap.de/josmfile?page=Presets/LaneAttributes&zip=1
Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/SidewalksAndFootways&zip=1
- https://github.com/osmlab/applepaintstyles/archive/main.zip
+ https://josm.openstreetmap.de/josmfile?page=Styles/iD&zip=1
- 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:
- 00000.633 W: Missing plugin main version in plugin mapwithai
- 00001.019 W: Missing plugin main version in plugin mapwithai
- 00032.751 E: org.openstreetmap.josm.io.IllegalDataException: Relation with external id '-491' refers to a missing primitive with external id '-621'.
- 00032.756 E: Error - <html>Could not read file 'GlavniTrg.osm'.<br>Error is:<br>Relation with external id '-491' refers to a missing primitive with external id '-621'.</html>
Attachments (1)
Change History (6)
by , 53 minutes ago
| Attachment: | GlavniTrg.osm added |
|---|
comment:1 by , 27 minutes ago
You can use a text editor and remove the problematic relation.
<relation id='-491' visible='true'>
<member type='way' ref='-621' role='outer' />
<member type='way' ref='-622' role='inner' />
<tag k='building' v='yes' />
<tag k='construction_date' v='1800' />
<tag k='ref:gurs:sta_sid' v='10029182' />
<tag k='source:construction_date' v='GURS' />
<tag k='source:geometry' v='GURS' />
<tag k='type' v='multipolygon' />
</relation>
This allows to load the file. Hope you know where this corrupted part should be.
comment:2 by , 20 minutes ago
Thank you for helping me fix the file! I still think it's a problem that JOSM made this, but I guess it's up to maintainers to decide if this issue should be kept open
comment:3 by , 16 minutes ago
Yes, there is at least one error in JOSM core or one of the plugins that you used, but it is very unlikely that we can find it without any hints. Since you alrady mentioned it: I think the conflation plugin is a good candidate for this.
comment:4 by , 15 minutes ago
| Resolution: | → irreproducible |
|---|---|
| Status: | new → closed |
We can't fix the issue without knowing how you corrupted the file. We need a How-To, you provided a Result. If you can reproduce it, add the description here, otherwise there is nothing we can do.
It's very likely a plugin involved.



Corrupted file. Data from it isn't uploaded to OSM yet