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

ASSERT: "it.isUnused()" in file /home/qt/work/install/include/QtCore/qhash.h, line 525

    XMLWordPrintable

Details

    • Linux/X11
    • 3af741cc180445cc487af6853575651ba204c4c1 (qt/qttools/dev)

    Description

      Isolated testcase:

      #include <QCoreApplication>
      #include <QHash>
      #include <QDebug>
      
      
      struct TranslatorMessageContentPtr {
          explicit TranslatorMessageContentPtr(const QString &msg)
          {
              ptr = &msg;
          }
      
          inline const QString *content() const
          {
              return ptr;
          }
      
          const QString *ptr;
      };
      
      inline size_t qHash(TranslatorMessageContentPtr tmp)
      {
          return qHash(*tmp.content());
      }
      
      inline bool operator==(TranslatorMessageContentPtr tmp1, TranslatorMessageContentPtr tmp2)
      {
          return *tmp1.content() == *tmp2.content();
      }
      
      int main(int argc, char *argv[])
      {
          QCoreApplication a(argc, argv);
      
          QList<QString> m_messages;
          for (int i = 0; i < 300; ++i) {
              if (i == 8) {
                  // create duplicate at position 8
                  m_messages.append(m_messages[0]);
              } else {
                  m_messages.append(QString("Message %1").arg(i));
              }
          }
      
          QHash<TranslatorMessageContentPtr, int> contentRefs;
          for (int i = 0; i < m_messages.count(); ) {
              const QString &msg = m_messages.at(i);
              {
                  QHash<TranslatorMessageContentPtr, int>::ConstIterator it =
                          contentRefs.constFind(TranslatorMessageContentPtr(msg));
                  if (it != contentRefs.constEnd()) {
                      // dupe found, remove message by index
                      m_messages.removeAt(i);
                      continue;
                  }
              }
      
              contentRefs[TranslatorMessageContentPtr(msg)] = i;
              ++i;
          }
          return a.exec();
      }
      
      agent:2020/09/08 05:24:51 build.go:302: /home/qt/work/install/bin/lrelease qt_fa.ts -qm qt_fa.qm
      agent:2020/09/08 05:24:51 build.go:302: ASSERT: "it.isUnused()" in file /home/qt/work/install/include/QtCore/qhash.h, line 525
      agent:2020/09/08 05:24:51 build.go:302: make[1]: *** [Makefile:567: linguist_zh_TW.qm] Aborted (core dumped)
      agent:2020/09/08 05:24:51 build.go:302: make[1]: *** Waiting for unfinished jobs....
      agent:2020/09/08 05:24:51 build.go:302: Updating 'qt_fa.qm'...
      agent:2020/09/08 05:24:51 build.go:302:     Generated 2364 translation(s) (2364 finished and 0 unfinished)
      agent:2020/09/08 05:24:51 build.go:302: make[1]: Leaving directory '/home/qt/work/qt/qttranslations/translations'
      agent:2020/09/08 05:24:51 build.go:302: make: *** [Makefile:47: sub-translations-make_first] Error 2
      agent:2020/09/08 05:24:51 build.go:353: Process finished with error: exit status 2
      agent:2020/09/08 05:24:51 build.go:577: Executing scheduled instruction 1 of 1 - Upload all core dumps if there are some
      agent:2020/09/08 05:24:51 build.go:486: Skip uploading core files because CORE_FILES_PATH is not set in the environment
      agent:2020/09/08 05:24:51 build.go:585: 
      agent:2020/09/08 05:24:51 agent.go:272: Build failed
      

      Build log: https://testresults.qt.io/logs/qt/qttranslations/2e4089bf1725b4d8bc69aa40981714f16745ee93/LinuxSLES_15x86_64LinuxSLES_15x86_64GCCqtci-linux-SLES-15-x86_64-93a57bDisableTests_UseLegacyInstructions/ac98dc4816875e76ad70b4d25910d405c11c7aa0/build_1599540755/log.txt.gz

      Details: https://testresults.qt.io/coin/integration/qt/qttranslations/tasks/1599540714

      Tested changes (refs/builds/qtci/dev/1599540712):
      https://codereview.qt-project.org/c/qt/qttranslations/+/312766/1 Update dependencies on 'dev' in qt/qttranslations

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            laknoll Lars Knoll
            janihe Jani Heikkinen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes