Skip to content

Deleting a file does not update the file list while the GPS pane has markers enabled #2569

Closed

Description

@alfonx

Summary

When the GPS map pane is present in the sidebar and its "Enable markers" option is on
(which is the default, and cannot be turned off persistently), deleting a file removes it
from disk but does not update the file list. The entry stays visible, the selection does
not advance, and the file only disappears after a manual Refresh (Ctrl+R).

This is easy to mistake for "delete does nothing" — which is what it looks like to the user,
since the file remains on screen. It may well be the underlying cause of some existing
reports along those lines (e.g. #1025, #193).

Version

Geeqie 2.9+git20260627-724d3679 GTK3

Official AppImage. Linux Mint 22.3 (Ubuntu 24.04 base), kernel 6.8.0-138, X-Cinnamon,
glibc 2.39, home directory on eCryptfs.

Steps to reproduce

  1. Add the GPS map pane to the sidebar (context menu of the sidebar → GPS map).
  2. Leave "Enable markers" checked (default).
  3. Select an image in the file list and press Del.

Expected

The file is deleted and removed from the file list; the selection advances to the next image.

Actual

The file is deleted from disk (it appears in the trash), but the list entry remains and the
selection does not move. Ctrl+R makes the stale entry disappear.

Shift+Del (permanent delete) behaves the same way, so this is not specific to the trash path.

Workaround

Right-click the GPS pane → uncheck "Enable markers". Deletion then updates the list
correctly. However, enable_markers_checked is initialised to TRUE in
bar_pane_gps_new() and is not written by bar_pane_gps_write_config(), so the
workaround has to be repeated after every start.

Two things that do not help, for anyone else hitting this:

  • Hiding the sidebar. <bar enabled="false"> only results in
    gtk_widget_set_visible(bar, enabled) — the pane is still constructed and still registers
    its notify callback.
  • Collapsing the pane, for the same reason.

The pane has to be removed from the sidebar entirely.

Where it seems to come from

In src/bar-gps.cc, the libchamplain branch of bar_pane_gps_update() ends with:

pgd->create_markers_id = g_idle_add(bar_pane_gps_create_markers_cb, pgd);

and the function returns early, before that line, when markers are disabled:

if (!pgd->enable_markers_checked)
    {
    return;
    }

That early return is exactly the difference between "works" and "does not work", which points
at the idle-driven marker creation rather than at the map widget itself. The pane also keeps
refs to the selected FileData in pgd->selection_list, which may be a second factor. I have
not confirmed which of the two actually breaks the file list update.

Note that the HAVE_GTK4 / libshumate branch of the same function builds its markers
synchronously and uses no idle source at all, so it is plausible that this does not affect the
GTK4 port. I could not verify that: the current Flathub build of 3.1 is compiled without map
support (the GNOME 49 runtime ships no libshumate, and gps-map defaults to auto), so there
is no map pane to test there.

Bisection

The behaviour was narrowed down by diffing a working default configuration against my own
geeqierc.xml and re-testing with a separate HOME on the same filesystem. With my
complete configuration and only the <pane_gps> element removed from <bar>, deletion
updates the list correctly. Adding the pane back reproduces the problem. update_on_time_change
("Refresh on file change") makes no difference either way.

Activity

  1. przepompownia commented on Sep 23, 2026

    @przepompownia
    Contributor

    This occurs on the master (GTK4) too.

    I was focused on #2534 but but after bisecting the config file, I remembered about this issue, which more precisely reproduces outdated list and infinite loop which consumes 100% CPU core.

    To make bisect easier I used (in the Geeqie source root, starting with empty $PWD/.xdg/config):

    images=/tmp/geeqie-test-photos/; mkdir -p "$images"; rsync -a $(ls -1 ./doc/graphics/*.png | head) "$images"; XDG_CONFIG_HOME=$PWD/.xdg/config geeqie "$images"

    The diff to apply after first use that allows reproduction:

    --- .xdg/config/geeqie/geeqierc-default.xml	2026-09-23 21:31:54.825267548 +0200
    +++ .xdg/config/geeqie/geeqierc.xml	2026-09-23 22:16:21.929996544 +0200
    @@ -434,6 +434,15 @@
             advanced_exif_window.h = "600"
    
             animate = "true" >
    +        <bar enabled = "true" width = "543" >
    +            <clear/>
    +            <pane_gps id = "gps" title = "GPS Map" expanded = "true" height = "350"
    +                map-id = "osm-mapnik"
    +                zoom-level = "18"
    +                latitude = "50000000"
    +                longitude = "0"
    +            />
    +        </bar>
    
             <dialogs>
                 <window title = "Delete" role = "dlg_confirm" x = "0" y = "0" w = "454" h = "334" />

    I didn't try to explain myself why the below quick returns suggested by llm prevent from this issue and if it makes sense in general so no PR with that.

    diff --git a/src/filedata/filedata.cc b/src/filedata/filedata.cc
    index 9bd36de5..9f4ec1c3 100644
    --- a/src/filedata/filedata.cc
    +++ b/src/filedata/filedata.cc
    @@ -213,6 +213,15 @@ gboolean FileData::file_data_check_changed_files(FileData *fd)
    
     	if (!stat_utf8(fd->path, &st))
     		{
    +
    +        if (!isname(fd->path)) {
    +          return FALSE;
    +        }
    +
    +        if (fd->change && fd->change->type == FILEDATA_CHANGE_DELETE) {
    +          return FALSE;
    +        }
    +
     		GList *sidecars;
     		GList *work;
     		FileData *sfd = nullptr;
  2. przepompownia commented on Sep 25, 2026

    @przepompownia
    Contributor

    @alfonx
    Maybe removing not relevant (GTK3/libchamplain) part from the title would be good idea.

  3. changed the title [-]Deleting a file does not update the file list while the GPS pane has markers enabled (GTK3/libchamplain)[/-] [+]Deleting a file does not update the file list while the GPS pane has markers enabled[/+] on Sep 26, 2026
  4. alfonx commented on Sep 26, 2026

    @alfonx
    ContributorAuthor

    Thank you so much @przepompownia — your minimal config and especially the hint from #2534 that it needs two or more selected files made this reproducible. I've updated the title as you suggested.

    I've found the cause and opened #2641 with a small fix in the GPS pane.

    Short version: with a multi-selection, the GPS pane builds its markers in an idle callback. Reading the metadata of an already deleted file triggers NOTIFY_REREAD, the pane restarts the marker creation, and that idle loop starves the (lower-priority) file list refresh, so the deleted files stay in the list and a CPU core spins.

    Two corrections to my original report: GTK4 is affected (as you found), and the idle marker creation is only half of the story. The other half is the missing file that keeps sending NOTIFY_REREAD. About the patch suggested earlier: isname() is just stat_utf8(), so that early return disables the whole "parent is missing" branch. That is why it hid the symptom.

    And a big thank-you to the maintainers for Geeqie — I really love it! ❤️

  5. added a commit that references this issue on Sep 29, 2026
    1492d3e
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions