Become a Site Supporter and Never see Ads again!

Author Topic: Serious FLAC bug found  (Read 3831 times)

0 Members and 1 Guest are viewing this topic.

Offline it-goes-to-eleven

  • Trade Count: (58)
  • Needs to get out more...
  • *****
  • Posts: 6696
Serious FLAC bug found
« on: September 16, 2005, 12:29:47 PM »
I discovered a really nasty flac bug this morning..  I have been archiving some masters and intermediate versions under Linux, compressing them with flac. After compression, I would do a 'flac -t' to verify that the archive was good before removing the WAV file..

Well, flac didn't properly handle some WAV files from recordings that were ended without writing the proper size in the header. It issued a warning but still produced a FLAC file and gave an exit code (0) which suggested everything was Fine.  The FLAC file tested fine. Unforunately, a 1.9GB WAV resulted in a 4KB FLAC file!


So I've reported this bug and I'm sure it will get fixed.. But I will be using gzip for my master archives.

Offline F.O.Bean

  • Team Schoeps Tapir that
  • Trade Count: (126)
  • Needs to get out more...
  • *****
  • Posts: 40690
  • Gender: Male
  • Taperus Maximus
    • MediaFire Recordings
Re: Serious FLAC bug found
« Reply #1 on: September 16, 2005, 02:30:43 PM »
what version ??? ive had no such problems w/ 1.1.2a

also, id immediately notice if i had a file that was 4KB, and my anal side does each set/show twice in flac frontend anyway, and coming from cd wave>wav>flac frontend ive had really zero problems, those 2 programs like each other!
Schoeps MK 4V & MK 41V ->
Schoeps 250|0 KCY's (x2) ->
Naiant +60v|Low Noise PFA's (x2) ->
DarkTrain Right Angle Stubby XLR's (x3) ->
Sound Devices MixPre-6 & MixPre-3

http://www.archive.org/bookmarks/diskobean
http://www.archive.org/bookmarks/Bean420
http://bt.etree.org/mytorrents.php
http://www.mediafire.com/folder/j9eu80jpuaubz/Recordings

Offline it-goes-to-eleven

  • Trade Count: (58)
  • Needs to get out more...
  • *****
  • Posts: 6696
Re: Serious FLAC bug found
« Reply #2 on: September 16, 2005, 02:47:44 PM »
what version ??? ive had no such problems w/ 1.1.2a

1.1.1. I'll try a newer version in a bit but I don't think it will make a diff.

I'd been leaning pretty heavily on the flac -t output for verification..  It goes through the whole file and is expected to catch problems that simply looking at file size would not.. But it failed me this time.. It was the small size that gave it away. I am trying to clean up about 10 shows, each with about 4 or 5 versions.




Offline F.O.Bean

  • Team Schoeps Tapir that
  • Trade Count: (126)
  • Needs to get out more...
  • *****
  • Posts: 40690
  • Gender: Male
  • Taperus Maximus
    • MediaFire Recordings
Re: Serious FLAC bug found
« Reply #3 on: September 16, 2005, 03:13:59 PM »
what version ??? ive had no such problems w/ 1.1.2a

1.1.1. I'll try a newer version in a bit but I don't think it will make a diff.

I'd been leaning pretty heavily on the flac -t output for verification.. It goes through the whole file and is expected to catch problems that simply looking at file size would not.. But it failed me this time.. It was the small size that gave it away. I am trying to clean up about 10 shows, each with about 4 or 5 versions.





whats the flac -t thing you speak of ???

i verify all of my files and delet input files and fix sector boundary errors, all on the encoding, but that all i do and ive had nothing but great results!
Schoeps MK 4V & MK 41V ->
Schoeps 250|0 KCY's (x2) ->
Naiant +60v|Low Noise PFA's (x2) ->
DarkTrain Right Angle Stubby XLR's (x3) ->
Sound Devices MixPre-6 & MixPre-3

http://www.archive.org/bookmarks/diskobean
http://www.archive.org/bookmarks/Bean420
http://bt.etree.org/mytorrents.php
http://www.mediafire.com/folder/j9eu80jpuaubz/Recordings

Offline it-goes-to-eleven

  • Trade Count: (58)
  • Needs to get out more...
  • *****
  • Posts: 6696
Re: Serious FLAC bug found
« Reply #4 on: September 16, 2005, 03:20:00 PM »
I really like flac.. This just took me by surprise.

-t extracts the flac file contents without writing the output files.

I suppose I could write a script to flac it, then extract it and compare the original and flac version... That's probably what I'll do.


Offline RRobar

  • Mac Design Geek
  • Trade Count: (0)
  • Needs to get out more...
  • *****
  • Posts: 5197
  • Gender: Male
  • "It's allgood ....brah!"
    • Headway Graphixx
Re: Serious FLAC bug found
« Reply #5 on: September 16, 2005, 03:20:35 PM »
he's using the linux version, not the windowz version.
Need Graphic Design Work? Goto http://www.headwaygraphixx.com

Offline nic

  • Big In Japan
  • Trade Count: (1)
  • Needs to get out more...
  • *****
  • Posts: 4700
  • Gender: Male
    • half dead batteries
Re: Serious FLAC bug found
« Reply #6 on: September 16, 2005, 04:12:38 PM »
whats the flac -t thing you speak of ???

i verify all of my files and delet input files and fix sector boundary errors, all on the encoding, but that all i do and ive had nothing but great results!

hes using the command line version, not the flac frontend gui


the water's clean and innocent

Offline scb

  • Eli Manning should die of gonorrhea and rot in hell. Would you like a cookie, son?
  • Trade Count: (11)
  • Needs to get out more...
  • *****
  • Posts: 8677
  • Gender: Male
Re: Serious FLAC bug found
« Reply #7 on: September 16, 2005, 04:18:11 PM »
what version ??? ive had no such problems w/ 1.1.2a

1.1.1. I'll try a newer version in a bit but I don't think it will make a diff.

I'd been leaning pretty heavily on the flac -t output for verification.. It goes through the whole file and is expected to catch problems that simply looking at file size would not.. But it failed me this time.. It was the small size that gave it away. I am trying to clean up about 10 shows, each with about 4 or 5 versions.





why not just use the -v option when encoding? it'll verify it

Offline it-goes-to-eleven

  • Trade Count: (58)
  • Needs to get out more...
  • *****
  • Posts: 6696
Re: Serious FLAC bug found
« Reply #8 on: September 16, 2005, 04:26:59 PM »
-v also fails.  It produces a bogus flac file and exits with a return code of 0 (implying there were no errors).

Offline scb

  • Eli Manning should die of gonorrhea and rot in hell. Would you like a cookie, son?
  • Trade Count: (11)
  • Needs to get out more...
  • *****
  • Posts: 8677
  • Gender: Male
Re: Serious FLAC bug found
« Reply #9 on: September 16, 2005, 04:32:17 PM »
what's this improper header size?  is flac actually writing the number of bytes the header says to, instead of how many are in the file?

Offline it-goes-to-eleven

  • Trade Count: (58)
  • Needs to get out more...
  • *****
  • Posts: 6696
Re: Serious FLAC bug found
« Reply #10 on: September 16, 2005, 04:47:37 PM »
what's this improper header size?  is flac actually writing the number of bytes the header says to, instead of how many are in the file?

Exactly.  It doesn't check for a discrepency.

Offline ethan

  • Trade Count: (1)
  • Needs to get out more...
  • *****
  • Posts: 4305
  • Gender: Male
  • Go Buffs!
    • COTapers.org
Re: Serious FLAC bug found
« Reply #11 on: September 16, 2005, 04:48:58 PM »
I discovered a really nasty flac bug this morning..  I have been archiving some masters and intermediate versions under Linux, compressing them with flac. After compression, I would do a 'flac -t' to verify that the archive was good before removing the WAV file..

Well, flac didn't properly handle some WAV files from recordings that were ended without writing the proper size in the header. It issued a warning but still produced a FLAC file and gave an exit code (0) which suggested everything was Fine.  The FLAC file tested fine. Unforunately, a 1.9GB WAV resulted in a 4KB FLAC file!


So I've reported this bug and I'm sure it will get fixed.. But I will be using gzip for my master archives.


Sounds like a bug with whatever is writing bad headers to me...
COtapers.org - "We're higher than your average taper"

Offline F.O.Bean

  • Team Schoeps Tapir that
  • Trade Count: (126)
  • Needs to get out more...
  • *****
  • Posts: 40690
  • Gender: Male
  • Taperus Maximus
    • MediaFire Recordings
Re: Serious FLAC bug found
« Reply #12 on: September 16, 2005, 04:49:19 PM »
thanks scott, i was like, 'hmmm, ive never seen the -t thing except here at ts.com'
Schoeps MK 4V & MK 41V ->
Schoeps 250|0 KCY's (x2) ->
Naiant +60v|Low Noise PFA's (x2) ->
DarkTrain Right Angle Stubby XLR's (x3) ->
Sound Devices MixPre-6 & MixPre-3

http://www.archive.org/bookmarks/diskobean
http://www.archive.org/bookmarks/Bean420
http://bt.etree.org/mytorrents.php
http://www.mediafire.com/folder/j9eu80jpuaubz/Recordings

Offline scb

  • Eli Manning should die of gonorrhea and rot in hell. Would you like a cookie, son?
  • Trade Count: (11)
  • Needs to get out more...
  • *****
  • Posts: 8677
  • Gender: Male
Re: Serious FLAC bug found
« Reply #13 on: September 16, 2005, 04:52:28 PM »
what's this improper header size?  is flac actually writing the number of bytes the header says to, instead of how many are in the file?

Exactly.  It doesn't check for a discrepency.


what was the warning you got?

Offline it-goes-to-eleven

  • Trade Count: (58)
  • Needs to get out more...
  • *****
  • Posts: 6696
Re: Serious FLAC bug found
« Reply #14 on: September 16, 2005, 05:05:17 PM »
Sounds like a bug with whatever is writing bad headers to me...

I disagree with shifting this away from being a flac bug. Flac is an archive program that a lot of people rely upon.  It needs to be extremely conservative and fault tolerant in regard to whatever it does. 'do no harm'  Minimally, it should exit and throw an error code.  I'm sure it will get fixed..  The important thing is to be aware of it and remember that the code is a little lazy in this area and may be in others as well..  This type of bug tells me that I shouldn't trust flac for archiving masters.  But intermediate versions, sure.

The header issue happens when digital recorders crash while recording and don't get a chance to update the size in the header. These were laptop recordings.  Since they are masters, I wouldn't normally tweak them.  Since I'm archiving a bunch of shows, I wouldn't normally dig into any particular one (oh, this is the umphreys where my laptop crashed right after the show finished..).

Quote
what was the warning you got?

umb.1.wav: WARNING: skipping unknown sub-chunk 'p9'



 

RSS | Mobile
Page created in 0.124 seconds with 40 queries.
© 2002-2024 Taperssection.com
Powered by SMF