Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#322 FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH

open
Josh Coalson
libFLAC (57)
5
2009-01-02
2007-12-27
BobNagy
No

While decompressing a block of data, I got the error FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH.

I recompressed this same file, and the error did not reoccur.

I have copied the data from both the good and bad blocks, and compared them. There are a total of 11 bytes different, all somewhat close together, but not adjacent. This data is attached.

I've been using FLAC since version 1.0.2. My app is rather well tested, and should have no bugs that would cause this. My app reads audio files from disk, compresses them using libFLAC, and writes the compressed blocks to DVD. My app also has its own CRC checking, which did not detect any error in this data being read back in from DVD. This suggests that the possible sources of this error could be either :
1) something in my app stomping on this data post compression and prior to write to DVD, or
2) some bug in FLAC that stomps on this data, but does not reflect this changed data in the FLAC CRC. Seems unlikely I suppose, but I don't know what to make of this, so I'm posting it in the hopes that there may be some telltale clue in this bad data.

Is there possibly a rare bug in FLAC that would cause this ?

I'm using 1.2.0.

Discussion

  • BobNagy
    BobNagy
    2007-12-27

    Good and bad data blocks to demonstrate CRC error

     
    Attachments
  • Wolf Faust
    Wolf Faust
    2008-06-12

    Logged In: YES
    user_id=2115697
    Originator: NO

    After upgrading from flac 1.1.3 to 1.2.1 I also do get crc mismatch error messages from two of my computers (both Windows 2000/SP3 with Pentium III and Athlon MP). Both computers
    work fine otherwise...

    The crc fault seems to appear a problem of both, compression and decompression. That is, flac seems to generate faulty files that can not be decompressed correctly even if you tell flac to ignore the fault while decompression or try to reboot (see below). In this case I assume the fault was already introduced during compression and there is no way to recover.

    Sometimes the fault only appears while decompressing the file. In this case switching to another computer or rebooting seems to help. Interestingly, trying to decompress the file again without reboot doesn't seem to help.

    The problem is serious. Sometimes %40 of the freshly compressed files are affected when testing them... other times I can write/read 100-200 flac files without problems.

    I switched back to 1.1.3.

     
  • Josh Coalson
    Josh Coalson
    2009-01-02

    I'm a little bit unclear on the procedure here... are you using the verify feature of the encoder? did the encoded file verify correctly but fail to test with 'flac -t'? is it repeatable according to http://flac.sourceforge.net/faq.html#tools__hardware_prob ?

     
  • Josh Coalson
    Josh Coalson
    2009-01-02

    • assigned_to: nobody --> jcoalson