Crash with FrameList
poiru at inbox.com
Sun Apr 24 17:40:28 CEST 2011
I'm trying to extract the ID3v2 album artwork using TagLib (1.7) on Visual Studio 2010. Have been trying to get this to work for several hours now, but with no avail. The application always crashes due to the FrameList declaration. I've attached the problematic part of the code below.
---- code ----
if (ref.isNull() || !ref.file())
TagLib::MPEG::File* file = dynamic_cast<TagLib::MPEG::File*>(ref.file());
if (file && file->ID3v2Tag())
// Crash here
TagLib::ID3v2::FrameList apic_frames = file->ID3v2Tag()->frameListMap()["APIC"];
---- end code ----
> NowPlaying.dll!std::list<TagLib::ID3v2::Frame *,std::allocator<TagLib::ID3v2::Frame *> >::_Insert(std::_List_const_iterator<std::_List_val<TagLib::ID3v2::Frame *,std::allocator<TagLib::ID3v2::Frame *> > > _Where, TagLib::ID3v2::Frame * const & _Val) Line 975 + 0x3 bytes C++
I've been able to use other TagLib methods (e.g. reading ID3v2 tags from files), but can't get the above code to work no matter what. I've tested with multiple MP3 files with valid ID3v2 tags/artwork.
TRY FREE IM TOOLPACK at http://www.imtoolpack.com/default.aspx?rc=if5
Capture screenshots, upload images, edit and send them to your friends
through IMs, post on Twitter®, Facebook®, MySpace™, LinkedIn® – FAST!
More information about the taglib-devel