Important: Please read the Qt Code of Conduct -

Assert error when using id3lib

  • Hello guys,

    I'm trying to code a little application that reads some mp3 files then decode the id3tag using id3lib and display everything a in table view.

    I'm currently trying to make the id3lib working but I'm having a very weird assert error when iterating on the id3 frames.

    Here is the assert I'm getting.

    Microsoft Visual C++ Debug Library

    Debug Assertion Failed!

    Program: ...sktop_Qt_5_0_1_MSVC2010_32bit-Debug\debug\MusicLibManager.exe
    File: f:\dd\vctools\crt_bld\self_x86\crt\src\dbgheap.c
    Line: 1424

    Expression: _pFirstBlock == pHead

    For information on how your program can cause an assertion
    failure, see the Visual C++ documentation on asserts.

    (Press Retry to debug the application)

    Abort Retry Ignore

    And the code that produces it, which is just a copy/paste from an example on the id3lib page.

    @// Lists all the ID3Frames
    QStringList mp3Tag::listID3Frames(void)
    QStringList frameList;

    if (this->isMp3Loaded())
        // use an std::auto_ptr here to handle object cleanup automatically
        ID3_Tag::Iterator* iter = mp3FileTag.CreateIterator();
        ID3_Frame* myFrame = NULL;
        while (NULL != (myFrame = iter->GetNext()))
            frameList << myFrame->GetTextID();
        delete iter;
        qDebug() <&lt; frameList;
    return frameList;


    This is how I added the id3lib to my project

    @win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../libs/id3lib-3.8.3binaries_win/release/ -lid3lib
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../libs/id3lib-3.8.3binaries_win/debug/ -lid3lib
    else:unix: LIBS += -L$$PWD/../libs/id3lib-3.8.3binaries_win/ -lid3lib

    INCLUDEPATH += $$PWD/../libs/id3lib-3.8.3/include
    DEPENDPATH += $$PWD/../libs/id3lib-3.8.3/include

    win32:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../libs/id3lib-3.8.3binaries_win/release/id3lib.lib
    else:win32:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../libs/id3lib-3.8.3binaries_win/debug/id3lib.lib
    else:unix: PRE_TARGETDEPS += $$PWD/../libs/id3lib-3.8.3binaries_win/libid3lib.a@

    I'm very new to Qt so maybe I did something wrong?
    Could anyone give me an hand?
    The assert happens on the frameList << myFrame->GetTextID(); line

  • based on some googling it seems that you need to rebuild all the libs involved, qt as well as libId3tag. Still a guess.

Log in to reply