Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#12748 closed defect (fixed)

Error dialog after deleting a new inserted node

Reported by: AdVerburg Owned by: team
Priority: normal Milestone: 16.04
Component: Core mappaint Version:
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Add a new node (Tools → Add Node) or Shift+D, and give coordinates.
  2. Click the command stack button "Undo" or press <ctrl+Z> on the keyboard.

What is the expected result?

Removal of that new node.

What happens instead?

Error dialog "Unexpected Exception".
The second time the dialog comes with a tick box "Suppress further error dialogs…"
Both versions do work as expected

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

The same behavior in version 10137 and version 9979

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-04-10 23:53:54 +0200 (Sun, 10 Apr 2016)
Build-Date:2016-04-11 01:32:10
Revision:10137
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10137 en_GB) Linux openSUSE Tumbleweed (20160408) (x86_64)
Memory Usage: 566 MB / 1756 MB (243 MB allocated, but free)
Java version: 1.8.0_77-b03, Oracle Corporation, OpenJDK 64-Bit Server VM
Dataset consistency test: No problems found

Plugins:
- SeaChart (32105)
- SeaMapEditor (31772)
- measurement (31895)
- osmarender (31772)
- turnrestrictions (31895)

Tagging presets:
- https://josm.openstreetmap.de/josmfile?page=Presets/OpenSeaMap_bridge&zip=1
- https://raw.githubusercontent.com/OpenNauticalChart/josm/master/INT-1-preset.xml
- https://raw.githubusercontent.com/OpenNauticalChart/josm/master/Presets_Hafen.xml
- https://raw.githubusercontent.com/OpenSeaMap/josm/master/Presets_Sport.xml

Map paint styles:
- https://raw.githubusercontent.com/OpenSeaMap/josm/master/INT1_MapCSS.mapcss

Last errors/warnings:
- W: Cannot start IPv4 remotecontrol server on port 8111: Address already in use
- W: Cannot start IPv6 remotecontrol server on port 8111: Address already in use
- W: Cannot lock cache directory. Will not use disk cache
- E: Failed to locate image 'https://raw.githubusercontent.com/OpenSeaMap/josm/master/icons/svg/Q/Q9/cylinder_over_sphere/red.svg'
- E: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException. Cause: java.lang.reflect.InvocationTargetException. Cause: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Primitive must be part of the dataset: {Node id=-15 version=0 MV lat=52.265319,lon=5.375147}

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at org.openstreetmap.josm.gui.mappaint.mapcss.Condition$PseudoClassCondition.applies(Condition.java:720)
	at org.openstreetmap.josm.gui.mappaint.mapcss.Selector$AbstractSelector.matches(Selector.java:468)
	at org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource.apply(MapCSSStyleSource.java:643)
	at org.openstreetmap.josm.gui.mappaint.ElemStyles.generateStyles(ElemStyles.java:342)
	at org.openstreetmap.josm.tools.ImageProvider.getPadded(ImageProvider.java:1314)
	at org.openstreetmap.josm.gui.OsmPrimitivRenderer.renderer(OsmPrimitivRenderer.java:76)
	at org.openstreetmap.josm.gui.OsmPrimitivRenderer.getListCellRendererComponent(OsmPrimitivRenderer.java:48)
	at org.openstreetmap.josm.gui.OsmPrimitivRenderer.getListCellRendererComponent(OsmPrimitivRenderer.java:28)
	at javax.swing.plaf.basic.BasicListUI.paintCell(BasicListUI.java:209)
	at javax.swing.plaf.basic.BasicListUI.paintImpl(BasicListUI.java:317)
	at javax.swing.plaf.basic.BasicListUI.paint(BasicListUI.java:240)
	at javax.swing.plaf.synth.SynthListUI.update(SynthListUI.java:79)
	at javax.swing.JComponent.paintComponent(JComponent.java:780)
	at javax.swing.JComponent.paint(JComponent.java:1056)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JViewport.paint(JViewport.java:728)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at org.openstreetmap.josm.gui.widgets.MultiSplitPane.paintChildren(MultiSplitPane.java:205)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1047)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210)
	at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:290)
	at javax.swing.RepaintManager.paint(RepaintManager.java:1272)
	at javax.swing.JComponent._paintImmediately(JComponent.java:5158)
	at javax.swing.JComponent.paintImmediately(JComponent.java:4969)
	at javax.swing.RepaintManager$4.run(RepaintManager.java:831)
	at javax.swing.RepaintManager$4.run(RepaintManager.java:814)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:789)
	at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:738)
	at javax.swing.RepaintManager.access$1200(RepaintManager.java:64)
	at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1732)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.openstreetmap.josm.gui.mappaint.mapcss.Condition$PseudoClassCondition.applies(Condition.java:718)
	... 60 more
Caused by: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Primitive must be part of the dataset: {Node id=-15 version=0 MV lat=52.265319,lon=5.375147}
	at org.openstreetmap.josm.data.osm.OsmPrimitive.checkDataset(OsmPrimitive.java:358)
	at org.openstreetmap.josm.data.osm.OsmPrimitive.getReferrers(OsmPrimitive.java:1110)
	at org.openstreetmap.josm.data.osm.OsmPrimitive.getReferrers(OsmPrimitive.java:1131)
	at org.openstreetmap.josm.gui.mappaint.mapcss.Condition$PseudoClasses.unconnected(Condition.java:600)
	... 64 more

Attachments (1)

Screenshot_20160411_143831.png (18.9 KB ) - added by AdVerburg 8 years ago.
Screenshot error dialog

Download all attachments as: .zip

Change History (8)

by AdVerburg, 8 years ago

Screenshot error dialog

comment:1 by bastiK, 8 years ago

Resolution: fixed
Status: newclosed

In 10140/josm:

fixed #12748 - Error dialog after deleting a new inserted node

comment:2 by Don-vip, 8 years ago

Component: CoreCore mappaint

comment:3 by Don-vip, 8 years ago

Milestone: 16.04

comment:4 by Don-vip, 8 years ago

I don't understand the fix?

comment:5 by Don-vip, 8 years ago

neither how to reproduce the bug :)

comment:6 by bastiK, 8 years ago

Cannot reproduce either, but my understanding is that the primitive is displayed in one of the right-hand dialogs which causes a call to ImageProvider.getPadded and runs MapPaintStyles.getStyles().generateStyles. Apparently the primitive is expected to be part of a DataSet for this to work. When the primitive is removed from the dataset in a concurrent thread (which seems possible in this scenario), an error occurs as reported. Getting the read lock on the dataset prevents it from changing during the operation.

Actually there are other places, where locks are missing and it would be good to find an easier / more solid design.

comment:7 by AdVerburg, 8 years ago

Additional info:

  • The same behavior when running the webversion (*.jnlp)
  • The still selected new node can be removed by using the delete button (keyboard), without the error dialog.

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.