Repository navigation
Conversation
…with GPS pane open With two or more files selected, bar_pane_gps_update() creates the map markers in an idle callback. Deleted files remain in the layout selection until the file list is refreshed. Reading their GPS metadata goes through the exif cache and file_data_check_changed_files(), which sends NOTIFY_REREAD for the missing file. bar_pane_gps_notify_cb() then calls bar_pane_gps_update() again, which re-queues the idle marker creation. This loop runs at G_PRIORITY_DEFAULT_IDLE and starves the file list refresh (G_PRIORITY_DEFAULT_IDLE + 50): the deleted files stay in the list and one CPU core runs at 100%. Drop files that no longer exist from the pane's selection list, so their notifications are ignored and the loop cannot start.
This was referenced Sep 26, 2026
Contributor
|
@alfonx thanks for investigation: your result of digging with LLM seems to be more accurate than the effect of (in particular) wasting water suggested to me earlier (quick returns in |
Collaborator
|
Implemented in commit 1492d3e |
Contributor
|
Thank you @caclark This bug was very annoying, especially when I was working in full-screen mode. Even that potentially stupid workaround suggested by the LLM allowed me to work smoothly (and without any noticeable effect) in the meantime. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2569 (and very likely the multi-selection case described by @przepompownia in #2534).
First of all: thank you for Geeqie — I use it every day and love it! And many thanks to @przepompownia for the minimal config and the hint that it needs two or more selected files; that made it reproducible.
What happens
With the GPS map pane in the sidebar and 2+ files selected, deleting them leaves them in the file list and one CPU core runs at 100%.
Backtrace of the loop (reproduced on master b427235, GTK 4.20 / libshumate 1.5):
bar_pane_gps_update()creates the markers for a multi-selection in an idle callback (bar_pane_gps_create_markers_cb,G_PRIORITY_DEFAULT_IDLE).bar_pane_gps_add_file_marker()→metadata_read_GPS_coord()→exif_read_fd()→file_cache_get()→file_data_check_changed_files(), which sendsNOTIFY_REREADfor the missing file.bar_pane_gps_notify_cb()finds that file inselection_listand callsbar_pane_gps_update()again, which re-queues the idle marker creation → back to 1.vf_refresh_idle,G_PRIORITY_DEFAULT_IDLE + 50) never gets to run, so the deleted files stay in the list.The fix
Keep it small and local to the GPS pane: files that no longer exist are dropped from the pane's
selection_list, so their notifications are ignored and the loop cannot start. Once the file list refresh runs, the pane updates through the normal selection-change path.Tested in a container (Fedora 43, Xvfb): multi-selection delete and single delete both update the list and advance the selection, no CPU spin.
Possible follow-ups (not in this PR, happy to hear your opinion)
file_data_check_changed_files()reports a missing file as changed (and sendsNOTIFY_REREAD) on every call, not just once. Other consumers could run into similar ping-pong.exif_read_fd()puts an entry into the exif cache even whenexif_read()failed, so the next read of a deleted file is a cache hit that triggers the check again.vf_notify_cb()returns early whilerefresh_idle_idis set, so the priority bump invf_refresh_idle()is never reached when the refresh is starved.I deliberately did not touch these, as they change behaviour in central code.
🤖 Generated with Claude Code