Modify

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#22268 closed defect (fixed)

Upload of data triggering expection "Primitive cannot be modified in read-only dataset"

Reported by: Emvee Owned by: team
Priority: normal Milestone: 22.09
Component: Core Version:
Keywords: template_report Cc:

Description (last modified by Emvee)

What steps did trigger the problem?

  1. Edit some OSM data
  2. Upload the data, in this case https://www.openstreetmap.org/changeset/124550070
  3. The data is uploaded (so no data lost, good) but after the upload a exception is triggered mentioning https://www.openstreetmap.org/way/1084174446

What might have triggered this exception is that I had the Relation editor open and this way was likely part of that relation.

See below for the debug information

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2022-08-01 20:38:58 +0200 (Mon, 01 Aug 2022)
Revision:18531
Build-Date:2022-08-02 01:30:56
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18531 en) Linux openSUSE Tumbleweed
Memory Usage: 1424 MB / 7282 MB (446 MB allocated, but free)
Java version: 11.0.16+8-suse-1.1-x8664, Oracle Corporation, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 2560×1440 (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_NL.UTF-8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_NL
Numbers with default locale: 1234567890 -> 1234567890
Desktop environment: KDE
Java package: java-11-openjdk:x86_64-11.0.16.0
apache-commons-logging: apache-commons-logging:noarch-1.2

Plugins:
+ ColumbusCSV (35978)
+ Mapillary (2.0.0-beta.15)
+ PolygonCutOut (v0.7)
+ alignways (36011)
+ apache-commons (36003)
+ apache-http (35924)
+ jna (36005)
+ reverter (36011)
+ utilsplugin2 (36011)

Tagging presets:
+ http://mijndev.openstreetmap.nl/~allroads/JOSM/Presets/NL-Fiets.zip
+ https://raw.githubusercontent.com/yopaseopor/traffic_signs_preset_JOSM/master/NL.zip

Map paint styles:
+ ${HOME}/Documents/Development/josm/resources/styles/Road_Extended/Road_Extended_JOSM_style.mapcss

Last errors/warnings:
- 08764.117 E: Handled by bug report queue: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Primitive cannot be modified in read-only dataset: {Way id=1084174446 version=1 MVT> nodes=[{Node id=43022527 version=7 MVT lat=51.558111635738975,lon=5.042451762003629}, {Node id=9935113485 version=1 MV lat=51.55815871045121,lon=5.042281620654131}]}


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

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (19) of main
org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Primitive cannot be modified in read-only dataset: {Way id=1084174446 version=1 MVT> nodes=[{Node id=43022527 version=7 MVT lat=51.558111635738975,lon=5.042451762003629}, {Node id=9935113485 version=1 MV lat=51.55815871045121,lon=5.042281620654131}]}
	at org.openstreetmap.josm.data.osm.OsmPrimitive.checkDatasetNotReadOnly(OsmPrimitive.java:206)
	at org.openstreetmap.josm.data.osm.OsmPrimitive.removeReferrer(OsmPrimitive.java:671)
	at org.openstreetmap.josm.data.osm.Relation.setMembers(Relation.java:47)
	at org.openstreetmap.josm.gui.dialogs.relation.MemberTableModel.applyToRelation(MemberTableModel.java:393)
	at org.openstreetmap.josm.gui.dialogs.relation.actions.IRelationEditorActionAccess.getChangedRelation(IRelationEditorActionAccess.java:88)
	at org.openstreetmap.josm.gui.dialogs.relation.GenericRelationEditor.lambda$buildOkCancelButtonPanel$1(GenericRelationEditor.java:429)
	at java.desktop/javax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:297)
	at java.desktop/javax.swing.table.AbstractTableModel.fireTableDataChanged(AbstractTableModel.java:199)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:117)
	at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
	at java.desktop/java.awt.Dialog.show(Dialog.java:1070)
	at java.desktop/java.awt.Component.show(Component.java:1716)
	at java.desktop/java.awt.Component.setVisible(Component.java:1663)
	at java.desktop/java.awt.Window.setVisible(Window.java:1031)
	at java.desktop/java.awt.Dialog.setVisible(Dialog.java:1005)
	at org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor.lambda$doBeginTask$3(PleaseWaitProgressMonitor.java:255)
	at org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor.lambda$doInEDT$0(PleaseWaitProgressMonitor.java:113)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Attachments (0)

Change History (8)

comment:1 by Emvee, 2 years ago

Description: modified (diff)

comment:2 by Emvee, 2 years ago

Did run again in the same exception but now on a node and I can confirm it was part of the relation that was open in the Relation editor (without any changes)

comment:3 by GerdP, 2 years ago

Hm, looks similar to #22024 but maybe triggered in a different situation?

comment:4 by taylor.smock, 2 years ago

It is very slightly different. They both start in org.openstreetmap.josm.gui.dialogs.relation.actions.IRelationEditorActionAccess.getChangedRelation), but they diverge at that point.

comment:5 by skyper, 2 years ago

Another similar problem probably caused by undo/redo: #22285

comment:6 by taylor.smock, 2 years ago

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

comment:7 by taylor.smock, 2 years ago

Resolution: fixed
Status: newclosed

In 18563/josm:

Fix #22268: Upload of data triggering exception "Primitive cannot be modified in read-only dataset"

This occurs during upload, and appears to be a race condition where a dataset is
not locked when we check, but becomes locked while the relation copy constructor
is running.

This attempts to fix the problem by checking to see if any OsmDataLayer objects are
in the upload process.

comment:8 by Klumbumbus, 2 years ago

Milestone: 22.09

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.