1.9.1 valid tag in debug, crash in release.

Brett Hoyle kickbits at gmail.com
Mon Oct 28 22:24:25 UTC 2013


Works in debug, crashes in release? That's a hallmark for:
Go back and find where you didn't initialize memory before using it.

Eg what is path, where is it declared and where did you initialize it?
It being garbage is exactly what you would expect if you allocated but never
initialized it.


Regards,
Brett.

-----Original Message-----
From: taglib-devel-bounces at kde.org [mailto:taglib-devel-bounces at kde.org] On
Behalf Of wifanlith
Sent: Monday, 28 October 2013 9:14 PM
To: taglib-devel at kde.org
Subject: Re: 1.9.1 valid tag in debug, crash in release.

I have some more info on this. I think some memory is being corrupted in the
taglib code...

/bool expandFile(QDir dir, QString file, QString albumName, QString
artistName, QByteArray fileArtwork)
    {   
        if (m_quit)
            return true;
        
        QString path = dir.filePath(file);
        int sid = 0;
        if (m_modCache->isPathCached(path, sid)) 
        {
            refreshTrack(sid);
            return true;
        } 
        
#ifdef Q_OS_WIN32	
        const TagLib::FileRef f( reinterpret_cast<const
wchar_t*>(path.utf16()) );
#else
        const TagLib::FileRef f(path.toUtf8().data());
#endif	
		
		TagLib::Tag* tags = f.tag();
        TagLib::AudioProperties* ap = f.audioProperties(); /

the QString "path" is what I would expect if I stop the code at the
breakpoint just before it creates the fileref (windows version) if I step to
the next point, (TagLib::Tag* tags = f.tag())and look at the data "path"
now, it is garbage values, with chinese characters and things in it, and the
tag is not valid.

Does anyone have any ideas here? It is stopping us from using 1.9.1, and we
needed it to fix a crash for some mp3 files..... 



--
View this message in context:
http://kde.6490.n7.nabble.com/1-9-1-valid-tag-in-debug-crash-in-release-tp15
47051p1547447.html
Sent from the taglib-devel mailing list archive at Nabble.com.
_______________________________________________
taglib-devel mailing list
taglib-devel at kde.org
https://mail.kde.org/mailman/listinfo/taglib-devel



More information about the taglib-devel mailing list