﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4815	DataIntegrityProblemException: Primitive  must be part of the dataset	anonymous	jttt	"After the checkin for ticket #2801, I am getting DataIntegrityProblemExceptions in some cases.

The stack trace is as follows:

org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Primitive  must be part of the dataset: {Node id=-641 version=0 V lat=49.60200676334942,lon=6.554085275435658}
	at org.openstreetmap.josm.data.osm.OsmPrimitive.checkDataset(OsmPrimitive.java:169)
	at org.openstreetmap.josm.data.osm.OsmPrimitive.getReferrers(OsmPrimitive.java:946)
	at org.openstreetmap.josm.data.osm.Node.isJunctionNode(Node.java:200)
	at org.openstreetmap.josm.gui.mappaint.SimpleNodeElemStyle.paintPrimitive(SimpleNodeElemStyle.java:28)
	at org.openstreetmap.josm.data.osm.visitor.paint.MapPaintVisitor.drawNode(MapPaintVisitor.java:132)
	at org.openstreetmap.josm.data.osm.visitor.paint.MapPaintVisitor.visitAll(MapPaintVisitor.java:748)
	at org.openstreetmap.josm.gui.layer.OsmDataLayer.paint(OsmDataLayer.java:268)
	at org.openstreetmap.josm.gui.MapView.paint(MapView.java:517)


This bug seems to be reproducible in the following way:

Take a way. Then insert a node in the middle of the way by dragging one of the  '+' of the way. When you then undo the operation with ctrl-z, the problem occurs. However, it does not work for all ways, or all '+' in a way, but for those where it does, it is repeatable. One way for which it does work is Way 24545038. (Although if you only load that way and nothing else, it doesn't crash. So what else is loaded also seems to matter)"	defect	closed	normal		Core		fixed		
