Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-78044

Index out of range in qmlprofiler in interactive mode

    XMLWordPrintable

Details

    • Linux/X11
    • da4069a96b97acb180023eae4ee5f2096613e51f (qtdeclarative) 67e8983443859802372d0b30219bab967a44501a (qt/qtdeclarative/5.12)

    Description

      Running the qmlprofiler tool in interactive mode (--interactive) has issues with the 'r' and 'f' commands - it gets stuck. This can be solved in qtdeclarative easily with:

      diff --git a/tools/qmlprofiler/qmlprofilerapplication.cpp b/tools/qmlprofiler/qmlprofilerapplication.cpp
      index 6732766..13a0021 100644
      --- a/tools/qmlprofiler/qmlprofilerapplication.cpp
      +++ b/tools/qmlprofiler/qmlprofilerapplication.cpp
      @@ -303,7 +303,7 @@ void QmlProfilerApplication::flush()
       {
       if (m_recording) {
       m_pendingRequest = REQUEST_FLUSH;
      - m_qmlProfilerClient->sendRecordingStatus(false);
      + m_qmlProfilerClient->setRecording(false);
       } else {
       if (m_profilerData->save(m_interactiveOutputFile)) {
       m_profilerData->clear();
      @@ -393,7 +393,7 @@ void QmlProfilerApplication::userCommand(const QString &command)
      
       if (cmd == Constants::CMD_RECORD || cmd == Constants::CMD_RECORD2) {
       m_pendingRequest = REQUEST_TOGGLE_RECORDING;
      - m_qmlProfilerClient->sendRecordingStatus(!m_recording);
      + m_qmlProfilerClient->setRecording(!m_recording);
       } else if (cmd == Constants::CMD_QUIT || cmd == Constants::CMD_QUIT2) {
       m_pendingRequest = REQUEST_QUIT;
       if (m_recording) {

      However, this unveils another bug: After flushing (command 'f') and restarting ('r'), the next stop ('r') causes an "index out of range":

      ASSERT failure in QVector<T>::at: "index out of range", file src/corelib/tools/qvector.h, line 429 
      Aborted (core dumped)

       

      Attachments

        Activity

          People

            shausman Simon Hausmann
            bweimer Bernd Weimer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: