Skip to content

Dangling IFD pointer tags persisting after deleting their content #3459

Open

Description

@serghov

Describe the bug

When all tags within a SubIFD (such as GPSInfo or Exif) are deleted from ExifData, the corresponding pointer tag (e.g., Exif.Image.GPSTag, Exif.Image.ExifTag) remains in the metadata. This leads to the creation of empty or invalid IFDs when writing the image, causing inconsistency across platforms and failures in tests like geotag_test which fails quite frequently especially on macos.

To Reproduce

This is a non-deterministic bug, so it does not fail every time, however it fails quite frequently on geotag_test on macos on ci.

Activity

  1. added this to the v0.28.8 milestone on Feb 9, 2026
  2. kevinbackhouse commented on Feb 17, 2026

    @kevinbackhouse
    Collaborator

    @kmilos: was this fixed by #3470?

  3. kmilos commented on Feb 17, 2026

    @kmilos
    Collaborator

    Unrelated (i.e. still saw the GPS tag failure once or twice on macOS after that was merged), so looks like this is an actual issue in the code somewhere?

  4. kmilos commented on Feb 17, 2026

    @kmilos
    Collaborator

    And the currently repeatable failure on macOS Intel only is I think unrelated as well, always fails on the network test...

  5. kmilos commented on Feb 17, 2026

    @kmilos
    Collaborator
  6. kevinbackhouse commented on Feb 17, 2026

    @kevinbackhouse
    Collaborator

    @kevinbackhouse Yep, still happening intermittently:

    https://github.com/Exiv2/exiv2/actions/runs/22096664410/job/63855411317#step:6:2040

    I've been trying reproduce that test failure, but haven't been able to. I tried to copy the build instructions exactly, using clang-21 and meson. Then I ran the tests repeatedly but they never failed. @serghov: do you know how to reproduce the bug?

  7. serghov commented on Feb 18, 2026

    @serghov
    ContributorAuthor

    @kevinbackhouse unfortunately I don't know how to reproduce it. And the fix isn't trivial either, I took a shot at it here, but don't like it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions