Opened 10 months ago
#23425 new enhancement
Improve handling of missing images when loading a session with image layers
Reported by: | GerdP | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core image mapping | Version: | |
Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
- start JOSM
- drag&drop some *.jpg files, in my case 218
- save session as test.jos
- close layer
- rename or remove some of the images that were dropped
- load session test.jos which now refers to unavailable images
What is the expected result?
The session is loaded and maybe a popup dialog asks if I want to remove or skip invalid references.
Something similar happens when my session contains a gpx layer and the corresponding gpx file was removed.
What happens instead?
JOSM silently loads the session and tries to load non-existing images. I have to click the trashcan icon for each non-existing image and I have to remember to save the session afterwards.
Please provide any additional information below. Attach a screenshot if possible.
I assume it would slow down the load if JOSM would check each image for existence, esp. when the layer contains references to network files. So maybe just implement a new action "Cleanup session"?
Build-Date:2024-01-19 17:43:59 Revision:18947 Is-Local-Build:true Identification: JOSM/1.5 (18947 SVN en) Windows 10 64-Bit OS Build number: Windows 10 Home 2009 (19045) Memory Usage: 484 MB / 1678 MB (139 MB allocated, but free) Java version: 1.8.0_272-b10, AdoptOpenJDK, OpenJDK 64-Bit Server VM Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel Screen: \Display0 1920×1080 (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_DE Numbers with default locale: 1234567890 -> 1234567890 VM arguments: [-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:51233, -ea, -javaagent:D:\eclipse-java-2020-09\eclipse\configuration\org.eclipse.osgi\3245\0\.cp\lib\javaagent-shaded.jar, -Dfile.encoding=UTF-8, -Dstdout.encoding=UTF-8, -Dstderr.encoding=UTF-8] Program arguments: [--language=en, --debug] Plugins: + OpeningHoursEditor (36196) + RoadSigns (36196) + apache-commons (36176) + buildings_tools (36200) + comfort0 (36200) + o5m (36126) + pbf (36176) + poly (36126) + reltoolbox (36200) + reverter (36196) + undelete (36126) + utilsplugin2 (36200) Validator rules: + c:\josm\core\resources\data\validator\combinations.mapcss + c:\josm\core\resources\data\validator\geometry.mapcss + c:\josm\core\resources\data\validator\relation.mapcss + c:\josm\core\resources\data\validator\unnecessary.mapcss + d:\java_tools\JOSM\mygeometry.mapcss + https://josm.openstreetmap.de/josmfile?page=Rules/GermanySpecific&zip=1 Last errors/warnings: - 00444.705 E: Failed to locate image 'Flag, Blue' - 00491.583 E: Failed to locate image 'Flag, Blue' - 00552.779 E: Failed to locate image 'Flag, Blue' - 00552.780 E: Failed to locate image 'Flag, Blue' - 00552.782 E: Failed to locate image 'Flag, Blue' - 00574.089 E: java.io.FileNotFoundException: F:\osm\bilder\2024-01-16\DSC_4803.JPG (Das System kann die angegebene Datei nicht finden) - 00577.934 E: java.io.FileNotFoundException: F:\osm\bilder\2024-01-16\DSC_4803.JPG (Das System kann die angegebene Datei nicht finden) - 00694.395 E: Failed to locate image 'Flag, Blue' - 00694.397 E: Failed to locate image 'Flag, Blue' - 00694.399 E: Failed to locate image 'Flag, Blue'