Created attachment 9484 Script for generating 100 images with random noise (to generate thumbnails for) Sometimes, particularly when many files are saved quickly, having Thunar open in the same directory causes some thumbnails to be generated before the file is finished writing. This results in the thumbnail having a section of grey rows at the bottom. Refreshing or navigating away and back does not cause the thumbnails to be regenerated (for the changed, completely written file). The issue is somewhat reproducible with the attached script, while having Thunar navigated to the same directory.
Created attachment 9485 Sample of generated images showing some thumbnails having the incomplete grey bar
May or may not be related https://bugzilla.xfce.org/show_bug.cgi?id=16063
Thanks for reporting ! Are you interested in working on a fix? I can provide guidance, but its unlikely that I will have time to fix this myself for a while. Help would be much appreciated !
Perhaps I could try, though I do not have high hopes. My main idea is to check the last modified date and delay (timeout? idle?) files that were modified less than a second ago. This would maybe affect large files like videos though (would it be a problem to not have thumbnails for those until they are completed/have gone a short time without being written to?) Perhaps requiring that if a file is not in the cache (already has a thumbnail (?)) that it must wait a second or so, in case the problem is that the partial file completes writing before the thumbnail is generated, so that a new thumbnail is never requested. The less internals that would have to be touched the better though, dbus does not seem like a healthy past-time.
I would start looking at the thumbnail request sent by thunar. (thunar-thumbnailer.c/.h) thunar_thumbnailer_queue_files is called in thunar_standard_view_request_thumbnails_real ... possibly some check is required to make sure that the file is "complete". Not sure how a "is complete" check can be done. Possibly there is a md5 checksum or something similar. You may want to check if there is some promising method in Thuna-file.h .. possibly "thunar_file_get_info" ? Or possibly the realted gfile has that information: https://developer.gnome.org/gio/stable/GFile.html
-- GitLab Migration Automatic Message -- This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/thunar/-/issues/281. Please create an account or use an existing account on one of our supported OAuth providers. If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev
Created attachment 9903 Patch that largely appears to fix the issue for me. I have been a bit busy so it took some time to get around to. I have a probably not very clean patch that appears to fix the issue for me. It probably needs to be modified to be in line with whatever coding standars thunar/GLib/GTK follows. There are also some comments regarding minor remaining issues.
I do not really know how to use gitlab and the sign-in page for gitlab using github gives me a 404