<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi there,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>after several hours of debugging, reading other’s code and refactoring my application, I come to the conclusion that Visual Studio 2012 Express is the problem.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>If I build my application in Debug mode, I get the described Debug Assertion error. In Release mode, I get access violations in other parts of my code and further development is difficult since debugging isn’t possible.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I have restarted with new project files and I have reviewed the configurations, but I couldn’t find any solution.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Finally, I switched to Visual Studio 2005 Professional and suddenly all errors are gone. I have no clue whether the problems are caused by the limitations of Visual Studio Express (free limited IDE edition) or if there is a general problem with Visual Studio 2012.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I am using TagLib for a hobby project and I have no access to a license of a recent Visual Studio version.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Does anyone else uses TagLib in recent VS versions? Or do you recommend another IDE for Windows?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Cheers,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thomas<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Thomas Salm [mailto:tosate@gmail.com] <br><b>Sent:</b> Sunday, February 09, 2014 10:18 PM<br><b>To:</b> taglib-devel@kde.org<br><b>Subject:</b> Debug Assertion error while adding cover art to a MP4 file<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Hi there,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I am using taglib for a Windows application and I am trying to add cover art to a MP4 file. Unfortunately I am getting a "Debug Assertion Failed!" error from the Microsoft Visual C++ Runtime Library.<o:p></o:p></p></div><div><div><p class=MsoNormal>File: f:\dd\vctools\crt_bld\self_x86\crt\src\dbgheap.c<o:p></o:p></p></div><div><p class=MsoNormal>Line: 1424<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Expression: _pFirstBlock == pHead<o:p></o:p></p></div></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I have already had such an error when I tried to delete an object which was already destructed by the library.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Here is my code snipped:<o:p></o:p></p></div><div><p class=MsoNormal>----------------------------------------------------------------------<o:p></o:p></p></div><div><div><p class=MsoNormal>if(mp4File->isValid())<o:p></o:p></p></div><div><p class=MsoNormal>                        {<o:p></o:p></p></div><div><p class=MsoNormal>                                   TagLib::MP4::Tag *mp4Tag = mp4File->tag();<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>                                   TagLib::MP4::ItemListMap itemListMap = mp4Tag->itemListMap();<o:p></o:p></p></div><div><p class=MsoNormal>                                   TagLib::MP4::CoverArtList coverArtList = itemListMap["covr"].toCoverArtList();<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>                                   coverArtList.clear();<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>                                   for(std::vector<EmbeddedPicture*>::iterator it = this->embeddedPictures->begin(); it != this->embeddedPictures->end(); ++it)<o:p></o:p></p></div><div><p class=MsoNormal>                                   {<o:p></o:p></p></div><div><p class=MsoNormal>                                               MP4CoverArt *mp4CoverArt = (MP4CoverArt*)*it;<o:p></o:p></p></div><div><p class=MsoNormal>                                               TagLib::MP4::CoverArt coverArt(mp4CoverArt->Format(), mp4CoverArt->Data());<o:p></o:p></p></div><div><p class=MsoNormal>                                               coverArtList.append(coverArt);<o:p></o:p></p></div><div><p class=MsoNormal>                                   }<o:p></o:p></p></div><div><p class=MsoNormal>                                   itemListMap.insert("covr", coverArtList);<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>                                   mp4File->save();<o:p></o:p></p></div><div><p class=MsoNormal>                        }<o:p></o:p></p></div></div><div><p class=MsoNormal>----------------------------------------------------------------------<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>The error appears as soon as the method is left. In my opinion the CoverArt object which is created and added to the ItemListMap exists on the stack and is gone when the method finishes. However creating the object on the heap by using the new operator did not help.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Do you have any ideas?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Cheers,<o:p></o:p></p></div><div><p class=MsoNormal>Thomas<o:p></o:p></p></div></div></div></body></html>