Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-2669

File status icon sometimes shows wrong status

      Sometimes the status icon for a file shows the wrong status. This has been first reported at https://community.metabrainz.org/t/picard-2-9-beta-1/639500

      There files loaded with existing MB tags sometimes showed up as unchanged despite having clearly changed tags (see also attached GIF animation).

      I experienced a similar issue where after moving files from one release to another some of them showed the previous status icon of a bad match other then a good match as it was expected. Dragging the affected files away from the release and back again fixed it.

      So far I was unable to properly reproduce the issue. The experience so far indicates that this happens mainly when handling multiple files at once.

          [PICARD-2669] File status icon sometimes shows wrong status

          GitHub Bot added a comment -

          See code changes in pull request #2253 submitted by phw.

          GitHub Bot added a comment - See code changes in pull request #2253 submitted by phw .

          I can confirm that the above change introduced the issue. Fixing this properly and allow updating the status in a thread would require the calling code also to handle asynchronicity, which requires significant refactoring. In oder to get the 2.9 release out I suggest we revert the change for now.

          Philipp Wolfer added a comment - I can confirm that the above change introduced the issue. Fixing this properly and allow updating the status in a thread would require the calling code also to handle asynchronicity, which requires significant refactoring. In oder to get the 2.9 release out I suggest we revert the change for now.

          This is most likely the change that introduced the issue: https://github.com/metabrainz/picard/commit/8a3a3424b913635bd36302a8b67d9901c3fc040e

          Philipp Wolfer added a comment - This is most likely the change that introduced the issue: https://github.com/metabrainz/picard/commit/8a3a3424b913635bd36302a8b67d9901c3fc040e

          As I could not yet reproduce the case where it showed a checkmark instead of the colored rectangle I can't really test this. But from what has been observed I doubt it. This does no look like an issue with picking the correct icon. Rather the files display the icon for the state they had before. It seems that icon selection happens before the state is changed (or the other way around the state is not updated after state has been updated). My bet is on a threading issue.

          Philipp Wolfer added a comment - As I could not yet reproduce the case where it showed a checkmark instead of the colored rectangle I can't really test this. But from what has been observed I doubt it. This does no look like an issue with picking the correct icon. Rather the files display the icon for the state they had before. It seems that icon selection happens before the state is changed (or the other way around the state is not updated after state has been updated). My bet is on a threading issue.

          Zas added a comment -

          Zas added a comment - https://github.com/metabrainz/picard/blob/47fea52c3a8681501e170b370e3be7bdb384a6c7/picard/ui/itemviews.py#L1153-L1154 displays the saved icon (green check) when the file state is `File.NORMAL` But https://github.com/metabrainz/picard/blob/47fea52c3a8681501e170b370e3be7bdb384a6c7/picard/file.py#L686-L687 is_saved() return True when both `similarity == 1.0` and `state == File.NORMAL` Check if using `file.is_saved()` at https://github.com/metabrainz/picard/blob/47fea52c3a8681501e170b370e3be7bdb384a6c7/picard/ui/itemviews.py#L1153 fixes the issue

            outsidecontext Philipp Wolfer
            outsidecontext Philipp Wolfer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Version Package
                2.9.0b3