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

Silent errror when reading corrupt file

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Invalid
    • Icon: Normal Normal
    • None
    • 1.4.2
    • Lookup & Match
    • None
    • Arch Linux/x86_64

      When trying to match a corrupt file (flac in this case), Picard silently errors - it shows a no match symbol, but does not give any indication why the match failed.

      Versions:

      Picard v1.4.2
      PyQt 4.12
      Qt 4.8.7
      Mutagen 1.37
      Discid discid 1.1.1, libdiscid 0.6.2
      

      Example stacktrace:

      E: 18:39:00 Traceback (most recent call last):
        File "/usr/lib/python2.7/site-packages/picard/util/thread.py", line 46, in run
          result = self.func()
        File "/usr/lib/python2.7/site-packages/picard/file.py", line 116, in _load_check
          return self._load(filename)
        File "/usr/lib/python2.7/site-packages/picard/formats/vorbis.py", line 55, in _load
          file = self._File(encode_filename(filename))
        File "/usr/lib/python2.7/site-packages/mutagen/_file.py", line 49, in __init__
          self.load(*args, **kwargs)
        File "/usr/lib/python2.7/site-packages/mutagen/_util.py", line 158, in wrapper
          return func(*args, **kwargs)
        File "/usr/lib/python2.7/site-packages/mutagen/_util.py", line 129, in wrapper
          return func(self, h, *args, **kwargs)
        File "/usr/lib/python2.7/site-packages/mutagen/flac.py", line 790, in load
          while self.__read_metadata_block(fileobj):
        File "/usr/lib/python2.7/site-packages/mutagen/flac.py", line 722, in __read_metadata_block
          block = block_type(fileobj)
        File "/usr/lib/python2.7/site-packages/mutagen/_vorbis.py", line 87, in __init__
          self.load(data, *args, **kwargs)
        File "/usr/lib/python2.7/site-packages/mutagen/flac.py", line 351, in load
          super(VCFLACDict, self).load(data, errors=errors, framing=framing)
        File "/usr/lib/python2.7/site-packages/mutagen/_vorbis.py", line 110, in load
          string = fileobj.read(length).decode('utf-8', errors)
        File "/usr/lib/python2.7/site-packages/mutagen/flac.py", line 70, in read
          size, len(data)))
      error: file said 4160195281 bytes, read 36923373 bytes
      

      It's worth noting that in this case, the file plays fine in a media player, but

      flav -tV

      shows that the files are corrupt.

      It would be useful to provide more feedback to the user so they can better deal with the problem.

            Unassigned Unassigned
            ladyfriday Robert Clipsham
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package