1.9.1 valid tag in debug, crash in release.

Festus Hagen festushagenlists at yahoo.com
Mon Oct 28 21:55:01 UTC 2013

I find neither:
        const TagLib::FileRef f( reinterpret_cast<const wchar_t*>(path.utf16()) );
        const TagLib::FileRef f(path.toUtf8().data());
Work reliably for me, I am on WinXP using Qt5.

I use:
        const TagLib::MPEG::File f(path.toLocal8Bit().constData());

Not a guru, don't know what's right!

fh : )_~

----- Original Message -----
From: wifanlith <wifanlith at googlemail.com>
To: taglib-devel at kde.org
Sent: Monday, October 28, 2013 6:44 AM
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)) 
            return true;
#ifdef Q_OS_WIN32    
        const TagLib::FileRef f( reinterpret_cast<const
wchar_t*>(path.utf16()) );
        const TagLib::FileRef f(path.toUtf8().data());
        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-tp1547051p1547447.html
Sent from the taglib-devel mailing list archive at Nabble.com.

taglib-devel mailing list
taglib-devel at kde.org

More information about the taglib-devel mailing list