Version: svn 581368 (using KDE KDE 3.5.4) Compiler: gcc 3.4.6 OS: Linux also reproduced with a clean recompile of revision 581368. backtrace : 0xb6188f02 in TagLib::FileRef::operator= () from /usr/lib/libtag.so.1 (gdb) bt #0 0xb6188f02 in TagLib::FileRef::operator= () from /usr/lib/libtag.so.1 #1 0xb7d86f4b in MetaBundle::readUniqueId (this=0x8434b90, fileref=0x0) at metabundle.cpp:1539 #2 0xb7d864a5 in MetaBundle::save (this=0x8434b90, fileref=0x0) at metabundle.cpp:1416 #3 0xb7e75389 in TagDialogWriter::doJob (this=0x939c7d8) at tagdialog.cpp:1201 #4 0xb7e7ba8c in ThreadWeaver::Thread::run (this=0x8311f60) at threadweaver.cpp:297 #5 0xb664b615 in QThreadInstance::start () from /usr/lib/qt/lib/libqt-mt.so.3 #6 0xb608a20e in start_thread () from /lib/tls/libpthread.so.0 #7 0xb5e2b0de in clone () from /lib/tls/libc.so.6
Same for me with revision 581326: #4 0xb635e0b2 in TagLib::FileRef::operator= () from /usr/lib/libtag.so.1 #5 0xb7d626a6 in MetaBundle::readUniqueId (this=0xb41bc620, fileref=0x0) at /home/sander/downloads/multimedia/amarok/src/metabundle.cpp:1539 #6 0xb7d643a9 in MetaBundle::save (this=0xb41bc620, fileref=0x0) at /home/sander/downloads/multimedia/amarok/src/metabundle.cpp:1416 #7 0xb7e6081d in TagDialogWriter::doJob (this=0xb41bbb60) at /home/sander/downloads/multimedia/amarok/src/tagdialog.cpp:1201 #8 0xb7e78ca8 in ThreadWeaver::Thread::run (this=0x83672d8) at /home/sander/downloads/multimedia/amarok/src/threadweaver.cpp:297 #9 0xb6700e73 in QThreadInstance::start () from /opt/qt/lib/libqt-mt.so.3 #10 0xb62af274 in start_thread () from /lib/libpthread.so.0 #11 0xb60d547e in clone () from /lib/libc.so.6
SVN commit 581413 by aturner: Copying an object to memory address 0x0 is bad. Since all we need is to use the object during the function, put the object on the stack and copy its address to the pointer. M +3 -1 metabundle.cpp --- trunk/extragear/multimedia/amarok/src/metabundle.cpp #581412:581413 @@ -1536,7 +1536,9 @@ if( !fileref ) { const QString path = url().path(); - *fileref = TagLib::FileRef( QFile::encodeName( path ), true, TagLib::AudioProperties::Fast ); + //Make it get cleaned up at the end of the function automagically + TagLib::FileRef tmpfileref( QFile::encodeName( path ), true, TagLib::AudioProperties::Fast ); + fileref = &tmpfileref; } if( !fileref || fileref->isNull() )
Fixed by 581423 as well as 581413