Modify

Opened 3 years ago

Closed 3 years ago

#21430 closed defect (fixed)

Upon command to delete a geotagged image from disk, the image is only removed from layer but not from disk

Reported by: bartosomail@… Owned by: team
Priority: normal Milestone: 21.10
Component: Core image mapping Version: latest
Keywords: template_report regression delete from disk Cc: taylor.smock

Description

What steps will reproduce the problem?

  1. open a geotagged image and select it
  2. click on the red bin icon (or press Ctrl+Shift+Delete)

What is the expected result?

The image is deleted from disk and from the geotagged photo layer

What happens instead?

The image is deleted from the geotagged photo layer but not from disk

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

The tested version of JOSM works correctly. The latest 18270 has the problem.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-10-10 21:51:02 +0200 (Sun, 10 Oct 2021)
Revision:18270
Build-Date:2021-10-11 01:31:12
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18270 en_GB) Windows 10 64-Bit
OS Build number: Windows 10 Home 2009 (19043)
Memory Usage: 890 MB / 4068 MB (337 MB allocated, but free)
Java version: 11.0.2+9-LTS, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 3840×2160 (scaling 2.50×2.50)
Maximum Screen Size: 3840×2160
Best cursor sizes: 16×16→64×64, 32×32→64×64
System property file.encoding: Cp1252
System property sun.jnu.encoding: Cp1252
Locale info: en_GB
Numbers with default locale: 1234567890 -> 1234567890

Plugins:
+ Mapillary (2.0.0-alpha.37)
+ QuickLabel (23)
+ SimplifyArea (35640)
+ apache-commons (35524)
+ apache-http (35589)
+ editgpx (35562)
+ ejml (35458)
+ geotools (35458)
+ jna (35662)
+ jts (35458)
+ measurement (35640)
+ merge-overlap (35640)
+ photo_geotagging (35783)
+ photoadjust (35770)
+ reltoolbox (35829)
+ reverter (35732)
+ rex (53)
+ undelete (35640)

Tagging presets:
+ D:\OSM\JOSM\presets\cai_josm_preset-master\cai.xml
+ https://josm.openstreetmap.de/josmfile?page=Presets/Mountains&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/ParkingLanes&zip=1
+ https://raw.githubusercontent.com/yopaseopor/traffic_signs_preset_JOSM/master/CH.zip
+ https://raw.githubusercontent.com/yopaseopor/traffic_signs_preset_JOSM/master/IT.zip

Map paint styles:
+ https://josm.openstreetmap.de/josmfile?page=Styles/DestinationSignRelation&zip=1
+ https://raw.githubusercontent.com/species/josm-preset-traffic_sign_direction/master/direction.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Osmc&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/MaxspeedIcons&zip=1
+ https://raw.githubusercontent.com/yopaseopor/traffic_signs_style_JOSM/master/Styles_Traffic_signs_EUR.zip
+ https://josm.openstreetmap.de/josmfile?page=Styles/ParkingLanes&zip=1

Last errors/warnings:
- 00008.413 W: javax.imageio.IIOException: Caught exception during read:. Cause: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
- 00008.415 E: Failed to locate image 'traffic_signs_presets/tunnel.png'
- 00008.415 W:  Tunnel: Could not get presets icon traffic_signs_presets/tunnel.png
- 00009.151 W: javax.imageio.IIOException: Caught exception during read:. Cause: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
- 00009.152 E: Failed to locate image 'traffic_signs_presets/tunnel.png'
- 00009.152 W:  Tunnel: Could not get presets icon traffic_signs_presets/tunnel.png

Attachments (1)

21430.patch (3.3 KB ) - added by taylor.smock 3 years ago.
Fix deletion of images

Download all attachments as: .zip

Change History (6)

comment:1 by skyper, 3 years ago

Component: CoreCore image mapping
Keywords: regression delete from disk added

comment:2 by Don-vip, 3 years ago

Cc: taylor.smock added
Milestone: 21.10

regression of r18246?

by taylor.smock, 3 years ago

Attachment: 21430.patch added

Fix deletion of images

in reply to:  3 comment:4 by taylor.smock, 3 years ago

Replying to Don-vip:

Indeed the call to Utils.deleteFile(delete.getFile()) has been removed in r18246:
https://josm.openstreetmap.de/changeset/18246/josm/trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java#file0

Yep. I forgot to add a delete method. Which is distinct from the remove method.
remove -> remove from layer
delete -> remove from layer and delete from storage

comment:5 by Don-vip, 3 years ago

Resolution: fixed
Status: newclosed

In 18278/josm:

fix #21430 - Fix deletion of images (patch by taylor.smock)

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.