Modify

Opened 7 months ago

Last modified 7 months ago

#24089 new defect

Exception while mapping speed limits.

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

Description

What steps will reproduce the problem?

Not 100%, but I was working on tagging advisory speed limits. I think I was trying to unclick a filter that hid roads with speed limits, but I think I mislicked on something else.

What is the expected result?

No exception.

What happens instead?

Exception.

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

Revision:19277
Build-Date:2025-01-03 15:21:55

Identification: JOSM/1.5 (19277 en) Windows 10 64-Bit
OS Build number: Windows 10 Pro 22H2 (19045)
Memory Usage: 3344 MB / 24528 MB (569 MB allocated, but free)
Java version: 21.0.5+11-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920x1080x32bpp@60Hz (scaling 1.00×1.00) \Display1 1600x900x32bpp@60Hz (scaling 1.00×1.00) \Display2 1920x1080x32bpp@60Hz (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: UTF-8
System property sun.jnu.encoding: Cp1252
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.19277, -XX:MaxRAMPercentage=75.0, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\JOSM.exe]
Dataset consistency test: No problems found

Plugins:
+ ImproveWay (32)
+ MicrosoftStreetside (36326)
+ PicLayer (1.0.3)
+ apache-commons (36349)
+ buildings_tools (36344)
+ conflation (0.6.11)
+ continuosDownload (109)
+ ejml (36348)
+ fastdriveway (v1.0.1)
+ geotools (36349)
+ gridify (1718663815)
+ imagery_offset_db (36344)
+ jackson (36349)
+ javafx (36325)
+ jaxb (36349)
+ jts (36349)
+ mapwithai (837)
+ pmtiles (36219)
+ reltoolbox (36344)
+ sidewalks (71)
+ turnrestrictions (36344)
+ utilsplugin2 (36362)

Tagging presets:
+ https://raw.githubusercontent.com/osmlab/name-suggestion-index/main/dist/presets/nsi-josm-presets.min.xml

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Sidewalks&zip=1
+ https://raw.githubusercontent.com/yopaseopor/traffic_signs_style_JOSM/master/US.zip
+ https://josm.openstreetmap.de/josmfile?page=Styles/Direction&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Enhanced_Lane_and_Road_Attributes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/iD&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/TreeCrownDiameter&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1
+ https://gitlab.com/cartocite/josm-style-traffic-signs-orientation/-/raw/main/traffic_sign_orientation_style.zip
+ https://josm.openstreetmap.de/josmfile?page=Styles/MappingAccessibility&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Surface&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/MapWithAI&zip=1

Last errors/warnings:
- 38821.790 E: java.nio.file.AccessDeniedException: <josm.cache>\mirror_https___josm.openstreetmap.de_josmfile_page_Styles_MapWithAI_zip_1.tmp -> <josm.cache>\mirror_https___josm.openstreetmap.de_josmfile_page_Styles_MapWithAI_zip_1
- 39029.685 W: Unable to delete old backup file <josm.pref>\autosave\MapWithAI_20250118_235253133.osm
- 39707.239 E: Failed to locate image 'https://prd-wret.s3.us-west-2.amazonaws.com/assets/palladium/production/s3fs-public/styles/content_list_thumbnail/public/thumbnails/image/USGS_logo_green_SQUARE.png'
- 39721.739 E: Failed to locate image 'https://prd-wret.s3.us-west-2.amazonaws.com/assets/palladium/production/s3fs-public/styles/content_list_thumbnail/public/thumbnails/image/USGS_logo_green_SQUARE.png'
- 46020.738 E: java.nio.file.AccessDeniedException: <josm.cache>\mirror_https___josm.openstreetmap.de_josmfile_page_Styles_MapWithAI_zip_1.tmp -> <josm.cache>\mirror_https___josm.openstreetmap.de_josmfile_page_Styles_MapWithAI_zip_1
- 80199.632 W: java.net.SocketTimeoutException: Connect timed out
- 81014.093 E: Communication with OSM server failed - <html><h2>This website is under heavy load (queue full)</h2><p>We're sorry, too many people are accessing this website at the same time. We're working on this problem. Please try again later.</p></html>
- 87575.123 E: java.nio.file.AccessDeniedException: <josm.cache>\mirror_https___josm.openstreetmap.de_josmfile_page_Styles_MapWithAI_zip_1.tmp -> <josm.cache>\mirror_https___josm.openstreetmap.de_josmfile_page_Styles_MapWithAI_zip_1
- 194052.284 W: Pending errors and warnings - <html>There is still an unresolved error or warning identified for this turn restriction. You are recommended to resolve this issue first.<br>Do you want to save anyway?
- 206368.838 E: Handled by bug report queue: java.util.NoSuchElementException



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

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (40) of main
java.util.NoSuchElementException
	at org.openstreetmap.josm.tools.SubclassFilteredCollection$FilterIterator.next(SubclassFilteredCollection.java:61)
	at org.openstreetmap.josm.command.ChangePropertyCommand.<init>(ChangePropertyCommand.java:110)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPreset.lambda$createCommand$9(TaggingPreset.java:700)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPreset.createCommand(TaggingPreset.java:702)
	at org.openstreetmap.josm.gui.dialogs.properties.PropertiesDialog$TaggingPresetCommandHandler.updateTags(PropertiesDialog.java:1101)
	at org.openstreetmap.josm.gui.dialogs.properties.PresetListPanel$LabelMouseAdapter.mouseClicked(PresetListPanel.java:47)
	at java.desktop/java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
	at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
	at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.Component.processEvent(Unknown Source)
	at java.desktop/java.awt.Container.processEvent(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

Attachments (0)

Change History (2)

comment:1 by taylor.smock, 7 months ago

This looks like a race condition where the following happened:

  1. Preset window is opened
  2. Selection and/or active data layer is changed
  3. Preset window is closed and new tags are attempted to be applied

comment:2 by taylor.smock, 7 months ago

Technically, this should fix the problem:

  • src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    diff --git a/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java b/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
    a b  
    10981098    static final class TaggingPresetCommandHandler implements TaggingPresetHandler {
    10991099        @Override
    11001100        public void updateTags(List<Tag> tags) {
    1101             Command command = TaggingPreset.createCommand(getSelection(), tags);
    1102             if (command != null) {
    1103                 UndoRedoHandler.getInstance().add(command);
     1101            final Collection<OsmPrimitive> sel = getSelection();
     1102            if (sel != null && !sel.isEmpty()) {
     1103                Command command = TaggingPreset.createCommand(sel, tags);
     1104                if (command != null) {
     1105                    UndoRedoHandler.getInstance().add(command);
     1106                }
    11041107            }
    11051108        }
    11061109

I want to see if I can make a test case though. And how it actually happened.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to jhaluska80.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.