Bug 129725 - segfault reading named comments
Summary: segfault reading named comments
Status: RESOLVED NOT A BUG
Alias: None
Product: taglib
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Scott Wheeler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-23 23:25 UTC by Alan Ezust
Modified: 2006-08-31 22:38 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
testrating.tar.gz (2.31 KB, application/gzip)
2006-06-23 23:26 UTC, Alan Ezust
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Ezust 2006-06-23 23:25:45 UTC
Version:           svn (using KDE KDE 3.5.2)
Installed from:    Debian testing/unstable Packages
Compiler:          gcc version 4.0.4 20060507 (prerelease) (Debian 4.0.3-3) 
OS:                Linux

I'm trying the new named comment tag support in taglib.
I'm attaching a testcase, which when I run, I get a segfault.

gcc version 4.0.4 20060507 (prerelease) (Debian 4.0.3-3)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1222449472 (LWP 23855)]
0xb7f6c368 in TagLib::ByteVector::operator< () from /usr/lib/libtag.so.1
(gdb) where
#0  0xb7f6c368 in TagLib::ByteVector::operator< () from /usr/lib/libtag.so.1
#1  0xb7f544eb in std::_Rb_tree<TagLib::ByteVector,
std::pair<TagLib::ByteVector const,
TagLib::List<TagLib::ID3v2::Frame*> >,
std::_Select1st<std::pair<TagLib::ByteVector const,
TagLib::List<TagLib::ID3v2::Frame*> > >,
std::less<TagLib::ByteVector>,
std::allocator<std::pair<TagLib::ByteVector const,
TagLib::List<TagLib::ID3v2::Frame*> > > >::lower_bound () from
/usr/lib/libtag.so.1
#2  0xb7f54b22 in TagLib::Map<TagLib::ByteVector,
TagLib::List<TagLib::ID3v2::Frame*> >::operator[] ()
  from /usr/lib/libtag.so.1
#3  0xb7f52e86 in TagLib::ID3v2::Tag::frameList () from /usr/lib/libtag.so.1
#4  0x08049bfc in RatingTagger::findByDescription ()
#5  0x08049dcb in RatingTagger::getPreference ()
#6  0x0804a89f in RatingTagger::getRating ()
#7  0x0804aad9 in RatingTagger::getRating ()
#8  0x0804c3b6 in main ()
(gdb)
Comment 1 Alan Ezust 2006-06-23 23:26:38 UTC
Created attachment 16768 [details]
testrating.tar.gz

testcase for using named comments.
Comment 2 Scott Wheeler 2006-08-31 22:38:07 UTC
You're using a FileRef in a function and then it goes out of scope, thus your tag is deleted.  That's not at all connected to named comments.