Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#10425 closed defect (fixed)

ConcurrentModificationException when auto update mappaint file

Reported by: Klumbumbus Owned by: team
Priority: normal Milestone: 14.08
Component: Core mappaint Version:
Keywords: template_report mapcss concurrency Cc: bastiK

Description

What steps will reproduce the problem?

  1. Sometimes when I edit and safe local mapcss files, I get an Exception error when JOSM auto updates the style. This time I crated the bug report.
Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2014-08-25 01:34:30
Last Changed Author: Don-vip
Revision: 7440
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2014-08-25 01:18:02 +0200 (Mon, 25 Aug 2014)
Last Changed Rev: 7440

Identification: JOSM/1.5 (7440 de) Windows 7 32-Bit
Memory Usage: 413 MB / 742 MB (153 MB allocated, but free)
Java version: 1.7.0_67, Oracle Corporation, Java HotSpot(TM) Client VM
VM arguments: [-Djava.security.policy=file:C:\Program Files\Java\jre7\lib\security\javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>\bin, -Djnlpx.origFilenameArg=C:\Program Files\josm-latest.jnlp, -Djnlpx.remove=true, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.heapsize=256m,768m, -Djnlpx.splashport=55199, -Djnlpx.jvm=<java.home>\bin\javaw.exe, -Djnlpx.vmargs=LURqYXZhLnV0aWwuQXJyYXlzLnVzZUxlZ2FjeU1lcmdlU29ydD10cnVlAA==]
Dataset consistency test: No problems found

Plugins:
- DirectUpload (30416)
- HouseNumberTaggingTool (30416)
- OpeningHoursEditor (30519)
- PicLayer (30436)
- Tracer2 (30416)
- buildings_tools (30485)
- editgpx (30416)
- imagery_offset_db (30534)
- measurement (30416)
- notes (v0.9.4)
- public_transport (30416)
- reltoolbox (30587)
- reverter (30521)
- terracer (30416)
- turnrestrictions (30454)
- undelete (30416)
- utilsplugin2 (30460)

Last errors/warnings:
- W: Dateiname C:\Users\Stefan\AppData\Roaming\JOSM\autosave\Testcenter.osm_20140826_0034.osm konnte nicht benutzt werden, ein anderer Dateiname wird verwendet.
- W: Dateiname C:\Users\Stefan\AppData\Roaming\JOSM\autosave\Testcenter.osm_20140826_0035.osm konnte nicht benutzt werden, ein anderer Dateiname wird verwendet.
- W: Dateiname C:\Users\Stefan\AppData\Roaming\JOSM\autosave\Testcenter.osm_20140826_0036.osm konnte nicht benutzt werden, ein anderer Dateiname wird verwendet.
- W: Dateiname C:\Users\Stefan\AppData\Roaming\JOSM\autosave\Datenebene 2_20140826_0051.osm konnte nicht benutzt werden, ein anderer Dateiname wird verwendet.
- W: Dateiname C:\Users\Stefan\AppData\Roaming\JOSM\autosave\Datenebene 2_20140826_0055.osm konnte nicht benutzt werden, ein anderer Dateiname wird verwendet.
- W: Mappaint-Stile konnten nicht von 'D:\Stefan\OSM\patches\[] housenumber icon\elemstyles.mapcss' geladen werden. Fehler war: java.io.FileNotFoundException: D:\Stefan\OSM\patches\[] housenumber icon\elemstyles.mapcss (Das System kann den angegebenen Pfad nicht finden)
- E: java.io.FileNotFoundException: D:\Stefan\OSM\patches\[] housenumber icon\elemstyles.mapcss (Das System kann den angegebenen Pfad nicht finden)
- E: java.nio.file.NoSuchFileException: D:\Stefan\OSM\patches\[] housenumber icon
- W: Veraltetes 'canvas{background-color}' in 'https://github.com/bastik/mapcss-tools/raw/osm/mapnik2mapcss/osm-results/mapnik.zip' entdeckt, welches in Kürze entfernt wird. Verwenden Sie stattdessen 'fill-color'.
- E: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.util.ConcurrentModificationException. Ursache: java.util.concurrent.ExecutionException: java.util.ConcurrentModificationException. Ursache: java.util.ConcurrentModificationException

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.util.ConcurrentModificationException
	at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer$ConcurrentTasksHelper.process(StyledMapRenderer.java:1459)
	at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer.render(StyledMapRenderer.java:1495)
	at org.openstreetmap.josm.gui.layer.OsmDataLayer.paint(OsmDataLayer.java:345)
	at org.openstreetmap.josm.gui.MapView.paintLayer(MapView.java:536)
	at org.openstreetmap.josm.gui.MapView.paint(MapView.java:607)
	at javax.swing.JComponent.paintChildren(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintToOffscreen(Unknown Source)
	at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered

Attachments (1)

console output.txt (18.8 KB) - added by Klumbumbus 5 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 5 years ago by Don-vip

Milestone: 14.08
Summary: Exception when auto update mappaint fileConcurrentModificationException when auto update mappaint file

comment:2 Changed 5 years ago by Don-vip

The stacktrace is unfortunately incomplete, can you please try to reproduce it with Java console enabled and copy-paste the full stacktrace from there?

comment:3 Changed 5 years ago by Klumbumbus

Couldn't reproduce it since I restarted JOSM with debug mode. I start now always with debug mode until it happens again.

Changed 5 years ago by Klumbumbus

Attachment: console output.txt added

comment:4 Changed 5 years ago by Klumbumbus

It happend again. I attached console output.

comment:5 Changed 5 years ago by Don-vip

Great, many thanks!

comment:6 Changed 5 years ago by Klumbumbus

No problem.

comment:7 Changed 5 years ago by Don-vip

Cc: bastiK added
Keywords: mapcss concurrency added

Paul, could you please have a look? I'm not familiar with this part of code:

Caused by: java.util.ConcurrentModificationException
        at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
        at java.util.HashMap$KeyIterator.next(Unknown Source)
        at java.util.AbstractCollection.toArray(Unknown Source)
        at java.util.ArrayList.<init>(Unknown Source)
        at org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource$MapCSSRuleIndex.getRuleCandidates(MapCSSStyleSource.java:139)
        at org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource.apply(MapCSSStyleSource.java:384)
        at org.openstreetmap.josm.gui.mappaint.ElemStyles.generateStyles(ElemStyles.java:328)
        at org.openstreetmap.josm.gui.mappaint.ElemStyles.getImpl(ElemStyles.java:169)
        at org.openstreetmap.josm.gui.mappaint.ElemStyles.getStyleCacheWithRange(ElemStyles.java:84)
        at org.openstreetmap.josm.gui.mappaint.ElemStyles.get(ElemStyles.java:67)
        at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer$ComputeStyleListWorker.add(StyledMapRenderer.java:1396)
        at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer$ComputeStyleListWorker.visit(StyledMapRenderer.java:1362)
        at org.openstreetmap.josm.data.osm.Node.accept(Node.java:206)
        at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer$ComputeStyleListWorker.call(StyledMapRenderer.java:1347)
        at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer$ComputeStyleListWorker.call(StyledMapRenderer.java:1312)

comment:8 Changed 5 years ago by bastiK

Resolution: fixed
Status: newclosed

In 7447/josm:

fixed #10425 - ConcurrentModificationException when auto update mappaint file

comment:9 Changed 5 years ago by bastiK

In 7448/josm:

see #10425 - fix [7447]: lock prevented mappaint code in StyledMapRenderer from running in parallel

comment:10 Changed 5 years ago by Don-vip

Thanks! :)

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.