leosongwei / mutagen

Automatically exported from code.google.com/p/mutagen
GNU General Public License v2.0
0 stars 0 forks source link

Transient OggVorbisHeaderError when setting large values #107

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
For certain Ogg Vorbis files, in the call to save() after setting a large value 
for a tag in the vorbis comments, an OggVorbisHeaderError is raised. Then, 
oddly, the file is left in a state such that calling save() again succeeds.

The traceback (from mutagen svn r108):

Traceback (most recent call last):
  File "t.py", line 9, in <module>
    f.save()
  File "mutagen/mutagen/ogg.py", line 494, in save
    try: self.tags._inject(fileobj)
  File "mutagen/mutagen/oggvorbis.py", line 110, in _inject
    OggPage.replace(fileobj, old_pages, new_pages)
  File "mutagen/mutagen/ogg.py", line 378, in replace
    klass.renumber(fileobj, serial, sequence)
  File "mutagen/mutagen/ogg.py", line 215, in renumber
    try: page = OggPage(fileobj)
  File "mutagen/mutagen/ogg.py", line 87, in __init__
    oggs, "OggS", fileobj.tell() - 27))
mutagen.oggvorbis.OggVorbisHeaderError: read 'TAG\x00', expected 'OggS', at 
0xc689c1

This is a short script that triggers the error:

    import mutagen
    f = mutagen.File('test.ogg')
    big_string = ''.join(['foo']*4096)
    f['arbitrary_key'] = [big_string]
    f.save()

A file that triggers the failure can be found here: 
http://www.mediafire.com/?u1stb1wdh2frmo9
I'm also attaching the first 32kb of the file to this issue.

Original issue reported on code.google.com by adrian.sampson on 20 Feb 2012 at 8:33

Attachments:

GoogleCodeExporter commented 9 years ago
The mediafire link has expired

Original comment by reiter.christoph@gmail.com on 10 Apr 2012 at 6:49

GoogleCodeExporter commented 9 years ago
Since this is hard to debug without reproducing it, closing for now.

Please file again or reopen if you hit this again.

Original comment by reiter.christoph@gmail.com on 4 Sep 2013 at 4:53