Modify

Opened 16 months ago

Closed 15 months ago

Last modified 15 months ago

#22626 closed defect (fixed)

when I click on the cross of an image, it does not close

Reported by: leni Owned by: team
Priority: normal Milestone: 23.01
Component: Core image mapping Version: tested
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. I upload my gpx file (the same in #22625)
  2. I click on an image
  3. if I click on the Geotagged Images panel cross to close

What is the expected result?

the Geotagged Images panel is close

What happens instead?

it remains displayed

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

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2023-01-03 21:28:24 +0100 (Tue, 03 Jan 2023)
Revision:18622
Build-Date:2023-01-04 02:30:56
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18622 en) Windows 10 64-Bit
OS Build number: Windows 10 Home 2009 (19044)
Memory Usage: 1014 MB / 1970 MB (65 MB allocated, but free)
Java version: 17.0.5+8-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920×1080 (scaling 1.25×1.25)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: Cp1252
System property sun.jnu.encoding: Cp1252
Locale info: en_FR
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Dicedtea-web.bin.location=C:\Program Files\utilistairesSystem\OpenWebStart\javaws, -Djava.util.Arrays.useLegacyMergeSort=true, --add-exports=jdk.deploy/com.sun.deploy.config=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-reads=java.naming=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.action=ALL-UNNAMED,java.desktop, --add-reads=java.base=ALL-UNNAMED,java.desktop, --add-exports=java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/sun.awt=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-exports=java.base/sun.security.validator=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, --add-exports=java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop, --add-exports=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,java.desktop,jdk.jsobject, --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-exports=java.base/sun.security.util=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-reads=java.desktop=ALL-UNNAMED,java.naming, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-exports=java.base/sun.security.x509=ALL-UNNAMED,java.desktop, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-exports=java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.provider=ALL-UNNAMED,java.desktop]

Plugins:
+ Mapillary (2.1.1)
+ PicLayer (1.0.2)
+ apache-commons (36034)
+ apache-http (35924)
+ buildings_tools (36011)
+ conflation (0.6.9)
+ contourmerge (v0.1.9)
+ ejml (35924)
+ geotools (36028)
+ imagery_offset_db (35978)
+ indoorhelper (1.2.2)
+ jackson (36034)
+ jaxb (35952)
+ jna (36005)
+ jts (36004)
+ measurement (35978)
+ opendata (36025)
+ openqa (v0.3.3)
+ photo_geotagging (35933)
+ photoadjust (36011)
+ reverter (36043)
+ shrinkwrap (v1.0.4)
+ tageditor (36011)
+ todo (30306)
+ turnrestrictions (36011)
+ undelete (36011)
+ utilsplugin2 (36011)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/ParkingLanes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/NewTags&zip=1
+ https://github.com/Jungle-Bus/josm-presets/raw/gh-pages/jungle-stops/Preset_Jungle-Bus.zip

Map paint styles:
+ https://josm.openstreetmap.de/josmfile?page=Styles/PTStops&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_buildings&zip=1
- <josm.pref>\plugins\indoorhelper\resources\sit.mapcss
- <josm.pref>\plugins\indoorhelper\resources\sit.mapcss

Last errors/warnings:
- 00000.372 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF'
- 00000.378 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF'

Attachments (0)

Change History (3)

comment:1 by taylor.smock, 16 months ago

Milestone: 23.01
Version: tested

It looks like this is due to an exif versus actual image mismatch.

From exiftool (just the relevant parts):

======== /Users/tsmock/Downloads/2020-09-19_17-51-29/2020-09-19_17-52-03.jpg
Exif Image Width                : 4128
Exif Image Height               : 3096
Image Width                     : 4128
Image Height                    : 3096
Orientation                     : Rotate 90 CW
======== /Users/tsmock/Downloads/2020-09-19_17-51-29/2020-09-19_17-54-05.jpg
Exif Image Width                : 4128
Exif Image Height               : 3096
Image Width                     : 4128
Image Height                    : 3096
Orientation                     : Rotate 90 CW

So we are reading the image, rotating the image based off of the orientation, and then setting the actual image width/height.

Anyway, I'll try to apply the following patch next week (we are currently in my "only touch JOSM source for crashing bugs" window) -- if I haven't applied the patch by Tuesday, feel free to ping this to remind me:

  • src/org/openstreetmap/josm/gui/layer/geoimage/RemoteEntry.java

    diff --git a/src/org/openstreetmap/josm/gui/layer/geoimage/RemoteEntry.java b/src/org/openstreetmap/josm/gui/layer/geoimage/RemoteEntry.java
    a b  
    333333
    334334    @Override
    335335    public int hashCode() {
    336         return Objects.hash(this.uri, this.width, this.height, this.pos,
     336        return Objects.hash(this.uri, this.pos,
    337337                this.exifOrientation, this.elevation, this.speed, this.exifImgDir,
    338338                this.exifCoor, this.exifTime, this.exifGpsTime, this.gpsTime,
    339339                this.iptcObjectName, this.iptcCaption, this.iptcHeadline, this.iptcKeywords,
     
    348348        if (obj != null && obj.getClass() == this.getClass()) {
    349349            RemoteEntry other = this.getClass().cast(obj);
    350350            return Objects.equals(this.uri, other.uri)
    351                     && this.height == other.height
    352                     && this.width == other.width
    353351                    && Objects.equals(this.elevation, other.elevation)
    354352                    && Objects.equals(this.exifCoor, other.exifCoor)
    355353                    && Objects.equals(this.exifGpsTime, other.exifGpsTime)
  • test/unit/org/openstreetmap/josm/gui/layer/geoimage/RemoteEntryTest.java

    diff --git a/test/unit/org/openstreetmap/josm/gui/layer/geoimage/RemoteEntryTest.java b/test/unit/org/openstreetmap/josm/gui/layer/geoimage/RemoteEntryTest.java
    a b  
    1919        RemoteEntry remoteEntryB = new RemoteEntry(URI.create("https://somewhere.com/image.png?hash=b"),
    2020                () -> null, () -> null, () -> null, () -> null);
    2121        EqualsVerifier.simple().forClass(RemoteEntry.class).usingGetClass()
    22                 .withIgnoredFields("firstImage", "lastImage", "nextImage", "previousImage")
     22                .withIgnoredFields("firstImage", "lastImage", "nextImage", "previousImage" /* These suppliers don't have good == semantics */,
     23                        "width", "height" /* Width and height can be corrected later, although it is originally from exif, see #22626 */)
    2324                .withNonnullFields("uri")
    2425                .withPrefabValues(RemoteEntry.class, remoteEntryA, remoteEntryB)
    2526                .withGenericPrefabValues(Supplier.class,

With that patch made, it might be better to ensure that we properly set the width/height, based off of the actual image instead of the loaded orientation.

comment:2 by taylor.smock, 15 months ago

Resolution: fixed
Status: newclosed

In 18635/josm:

Fix #22626: Geotagged images from GPX files cannot be closed when rotated by exif data

This is due to the initial implementation of RemoteEntry#equals using the
width and height fields for calculating hashCode and equals. Since we may
set those two fields when showing the image, it does not make sense to use
them for hashCode or equals.

comment:3 by skyper, 15 months ago

Component: CoreCore image mapping

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.