Modify ↓
Opened 6 years ago
Closed 6 years ago
#18601 closed defect (fixed)
attempted to download using MapWithAI and it crashed and gave an error message. Possible the version of OSM is out of date.
| Reported by: | anonymous | Owned by: | taylor.smock |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Plugin mapwithai | Version: | |
| Keywords: | template_report, mapwithai | Cc: | Don-vip |
Description
What steps will reproduce the problem?
What is the expected result?
What happens instead?
Please provide any additional information below. Attach a screenshot if possible.
URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2019-12-31 14:25:24 +0100 (Tue, 31 Dec 2019)
Build-Date:2019-12-31 13:27:22
Revision:15625
Relative:URL: ^/trunk
Identification: JOSM/1.5 (15625 en) Mac OS X 10.15.2
OS Build number: Mac OS X 10.15.2 (19C57)
Memory Usage: 908 MB / 1820 MB (204 MB allocated, but free)
Java version: 1.8.0_221-b11, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: Display 722472595 2560x1600, Display 722470612 2560x1600, Display 69733382 1680x1050
Maximum Screen Size: 2560x1600
VM arguments: [-Djava.library.path=/Applications/JOSM.app/Contents/MacOS, -DLibraryDirectory=${HOME}/Library, -DDocumentsDirectory=${HOME}/Documents, -DApplicationSupportDirectory=${HOME}/Library/Application Support, -DCachesDirectory=${HOME}/Library/Caches, -DApplicationDirectory=${HOME}/Applications, -DAutosavedInformationDirectory=${HOME}/Library/Autosave Information, -DDesktopDirectory=${HOME}/Desktop, -DDownloadsDirectory=${HOME}/Downloads, -DMoviesDirectory=${HOME}/Movies, -DMusicDirectory=${HOME}/Music, -DPicturesDirectory=${HOME}/Pictures, -DSharedPublicDirectory=${HOME}/Public, -DSystemLibraryDirectory=/Library, -DSystemApplicationSupportDirectory=/Library/Application Support, -DSystemCachesDirectory=/Library/Caches, -DSystemApplicationDirectory=/Applications, -DSystemUserDirectory=/Users, -DUserHome=${HOME}, -DSandboxEnabled=true, -DLaunchModifierFlags=0, -DLaunchModifierFlagCapsLock=false, -DLaunchModifierFlagShift=false, -DLaunchModifierFlagControl=false, -DLaunchModifierFlagOption=false, -DLaunchModifierFlagCommand=false, -DLaunchModifierFlagNumericPad=false, -DLaunchModifierFlagHelp=false, -DLaunchModifierFlagFunction=false, -Dapple.laf.useScreenMenuBar=true, -Dcom.apple.macos.use-file-dialog-packages=true, -Dcom.apple.macos.useScreenMenuBar=true, -Dcom.apple.mrj.application.apple.menu.about.name=JOSM, -Dcom.apple.smallTabs=true]
Dataset consistency test: No problems found
Plugins:
+ ImportImagePlugin (35248)
+ apache-commons (35092)
+ ejml (35122)
+ geotools (35169)
+ jts (35122)
+ log4j (35092)
+ mapwithai (1.1.6)
+ utilsplugin2 (35248)
Tagging presets:
+ ${HOME}/Desktop/JSOM/FB_presets (1).xml
+ ${HOME}/Desktop/JSOM/indo_preset.xml
Map paint styles:
- ${HOME}/Desktop/JSOM/FB_style(test).mapcss
- ${HOME}/Desktop/JSOM/FB_style (2).mapcss
- https://github.com/osmlab/appledata/archive/josm_paint_inline_validation.zip
+ ${HOME}/Desktop/JSOM/FBedits (1).mapcss
+ ${HOME}/Desktop/JSOM/FB_style (3).mapcss
- ${HOME}/Desktop/JSOM/rainbow_roads.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/MapWithAI&zip=1
Validator rules:
+ ${HOME}/Desktop/JSOM/FB_rules5.10.validator.mapcss
- ${HOME}/Desktop/JSOM/FB_rules5.10.TEST.validator.mapcss
+ ${HOME}/Desktop/JSOM/FB_rules5.11.validator.mapcss
Last errors/warnings:
- W: No configuration settings found. Using hardcoded default values for all pools.
- E: Handled by bug report queue: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Cannot modify the id counter backwards. Cause: java.lang.IllegalArgumentException: Cannot modify the id counter backwards
- W: Warning - <html>JOSM could not find information about the following plugins:<ul><li>utilsplugin2</li><li>apache-commons</li><li>geotools</li><li>mapwithai</li><li>ImportImagePlugin</li><li>jts</li><li>ejml</li><li>log4j</li></ul>The plugins are not going to be loaded.</html>
=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.
Warning issued by: BugReportExceptionHandler#handleException
=== STACK TRACE ===
Thread: MapWithAI (118)
java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Cannot modify the id counter backwards
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:593)
at java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:677)
at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:735)
at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:160)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:583)
at org.openstreetmap.josm.plugins.mapwithai.backend.MapWithAIDataUtils.getData(MapWithAIDataUtils.java:175)
at org.openstreetmap.josm.plugins.mapwithai.backend.MapWithAIDataUtils.lambda$getMapWithAIData$21(MapWithAIDataUtils.java:385)
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.lang.IllegalArgumentException: Cannot modify the id counter backwards
at org.openstreetmap.josm.data.osm.AbstractPrimitive.advanceUniqueId(AbstractPrimitive.java:61)
at org.openstreetmap.josm.io.AbstractReader.doParseDataSet(AbstractReader.java:330)
at org.openstreetmap.josm.io.OsmReader.doParseDataSet(OsmReader.java:466)
at org.openstreetmap.josm.plugins.mapwithai.backend.OsmReaderCustom.parseDataSet(OsmReaderCustom.java:68)
at org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader.parseDataSet(BoundingBoxMapWithAIDownloader.java:39)
at org.openstreetmap.josm.io.BoundingBoxDownloader.parseOsm(BoundingBoxDownloader.java:198)
at org.openstreetmap.josm.plugins.mapwithai.backend.MapWithAIDataUtils.lambda$getData$12(MapWithAIDataUtils.java:181)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:401)
at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:734)
at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:160)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at org.openstreetmap.josm.plugins.mapwithai.backend.MapWithAIDataUtils.lambda$getData$13(MapWithAIDataUtils.java:177)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
... 4 more
Attachments (1)
Change History (5)
comment:1 by , 6 years ago
| Component: | Core → Plugin mapwithai |
|---|---|
| Keywords: | mapwithai added |
| Owner: | changed from to |
comment:2 by , 6 years ago
| Cc: | added |
|---|
by , 6 years ago
| Attachment: | 18601.core_synchronized.patch added |
|---|
Synchronzie if block to ensure that the AbstractPrimitive current unique id is not incremented backwards accidentally
comment:4 by , 6 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
It is fixed in MapWithAI and JOSM now. I'll revert the fix in MapWithAI after the next stable release.
Note:
See TracTickets
for help on using tickets.



I suspect this is due to a race condition -- I download from the MapWithAI service asynchronously, and if two threads get to the line where the unique id is advanced at almost exactly the same time, then one can increment the counter such that the second thread throws an error.
I've never seen this before, but I'll release something that I believe will fix the problem.
It will be in v1.0.5, v1.1.8, and v1.2.2.
You will likely be using v1.1.8 until the late January/early February stable is released.
@Don-vip:
It probably wouldn't be a bad idea to put the check and advance for
AbstractPrimitive.<current|advance>uniqueIdinside asynchronizedblock, like so: