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

Picard crashes and closes if cover art is not provided in the file picker

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • 2.14
    • 2.13.3
    • Cover Art
    • None
    • MacOS 13.3.1, Apple M2

      Reproduction steps:

      • Open Picard desktop app
      • Import any music library
      • Click on a single track
      • Right click on the cover art, pick "Import local file"
      • Click "Open" without touching anything else

      Expected Behavior: Picard just continues keeping the old cover art without any edit.
      Actual Behavior: Program crashes and closes.

      The MacOS problem report:
      picard_bug_problem_report.txt

          [PICARD-3056] Picard crashes and closes if cover art is not provided in the file picker

          Confirmed that CD ripper log selection also has similar issues on macOS. It doesn't crash, but it allows selection of directories.

          Script loading (both tagger script and file naming script) work correctly.

          Philipp Wolfer added a comment - Confirmed that CD ripper log selection also has similar issues on macOS. It doesn't crash, but it allows selection of directories. Script loading (both tagger script and file naming script) work correctly.

          GitHub Bot added a comment -

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

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

          I can reproduce. This is probably only reproducible on macOS. The file picker allows acceptance without anything selected. It will pass the folder path in this case instead, which leads to the crash.

          user937652@FF019 ~ % ./Desktop/MusicBrainz\ Picard\ 2.13.3.app/Contents/MacOS/picard-run 
          2025-04-13 11:49:18.701 picard-run[18467:244690] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
          Traceback (most recent call last):
            File "ui/coverartbox.py", line 618, in choose_local_file
            File "ui/coverartbox.py", line 481, in fetch_remote_image
          IsADirectoryError: [Errno 21] Is a directory: '/Users/user937652/Desktop'
          zsh: abort      ./Desktop/MusicBrainz\ Picard\ 2.13.3.app/Contents/MacOS/picard-run

          This does not seem to be reproducible on other platforms. On Windows and Linux (at least with GNOME) the file picker has the Ok button disabled. You need to select a file (not a folder) to accept the dialog.

          It is a bit strange, because "Add files" works as expected, while the cover art file picker seems to be scoped to directories on macOS. I'll investigate and fix this.

          Philipp Wolfer added a comment - I can reproduce. This is probably only reproducible on macOS. The file picker allows acceptance without anything selected. It will pass the folder path in this case instead, which leads to the crash. user937652@FF019 ~ % ./Desktop/MusicBrainz\ Picard\ 2.13.3.app/Contents/MacOS/picard-run  2025-04-13 11:49:18.701 picard-run[18467:244690] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES. Traceback (most recent call last):   File "ui/coverartbox.py", line 618, in choose_local_file   File "ui/coverartbox.py", line 481, in fetch_remote_image IsADirectoryError: [Errno 21] Is a directory: '/Users/user937652/Desktop' zsh: abort      ./Desktop/MusicBrainz\ Picard\ 2.13.3.app/Contents/MacOS/picard-run This does not seem to be reproducible on other platforms. On Windows and Linux (at least with GNOME) the file picker has the Ok button disabled. You need to select a file (not a folder) to accept the dialog. It is a bit strange, because "Add files" works as expected, while the cover art file picker seems to be scoped to directories on macOS. I'll investigate and fix this.

          Zas added a comment -

          Zas added a comment - Can you provide debug log ? See https://picard-docs.musicbrainz.org/en/troubleshooting/troubleshooting.html#macos-systems on how to obtain it.

            outsidecontext Philipp Wolfer
            tarcangul Tarcan Gul
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Version Package
                2.14