Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Assert error when using id3lib
QtWS25 Last Chance

Assert error when using id3lib

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Leodido
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • P Offline
      P Offline
      pritamghanghas
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved