Skip Menu |

This queue is for tickets about the Audio-TagLib CPAN distribution.

Report information
The Basics
Id: 103987
Status: rejected
Priority: 0/
Queue: Audio-TagLib

People
Owner: GLEACH [...] cpan.org
Requestors: rrwo [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.64
Fixed in: 1.64



Subject: Segmentation fault when adding a frame
Date: Sun, 26 Apr 2015 19:43:22 +0100
To: bug-Audio-TagLib [...] rt.cpan.org
From: Robert Rothenberg <rrwo [...] cpan.org>
Appending or inserting a new frame onto a frameList causes a segmentation fault when the program ends. Show quoted text
> use Audio::TagLib::MPEG::File; > > my $file = Audio::TagLib::MPEG::File->new('test.mp3'); > my $tag = $file->ID3v2Tag; > my $list = $tag->frameList; > > my $factory = Audio::TagLib::ID3v2::FrameFactory->instance(); > > my $data = Audio::TagLib::ByteVector->new ('COMM' . # Frame ID > "\x00\x00\x00\x13" . # Frame size > "\x00\x00" . # Frame flags > "\x00" # Encoding > , 23); > > my $header = Audio::TagLib::ID3v2::Header->new($data); > my $frame = $factory->createFrame($data, $header); > > my $str = Audio::TagLib::String->new('A comment'); > $frame->setText($str); > > $list->append($frame);
I am using Audio::TagLib 1.64, and taglib 1.9.1-2.1ubuntu1
Thanks for an excellent report. If I understand your intent correctly, you should be using TagLib::ID3v2::Tag::addFrame() rather than append(). You can verify the operation by using hexdump -C. See the manpage http://taglib.github.io/api/classTagLib_1_1ID3v2_1_1Tag.html#ae090718d9acff1341530aa6438759b40 There's a note on the doc for append() (which I can't find dispite reading it yesterday) that suggests this. The segv is, not surprisingly, in TagLib.so. So why the segv rather than a helpful error message? Sorry, I can't answer that. TagLib has not been updated since '13, so I imagine it's not under heavy maintenance :-(