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

stdlib precondition violation in qmlcachegen

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.2.8, 6.5.0, 6.5, 6.6.0
    • 6.5
    • QML: Tooling
    • None
    • Linux/X11
    • ab9f4d2e2 (dev), 103175065 (6.5), f9022d7f3 (tqtc/lts-6.2), 8813b1f19 (dev), b08a718cf (6.5), d01c2454a (6.4)

    Description

      I'm trying to make a build of Qt instrumented with gcc's _GLIBCXX_DEBUG.

      I get the following issue during the build:

      FAILED: qtdeclarative/src/quickcontrols/basic/.rcc/qmlcache/qtquickcontrols2basicstyleplugin_AbstractButton_qml.cpp /home/jcelerier/libs/build-qt6.5-asan/qtdeclarative/src/quickcontrols/basic/.rcc/qmlcache/qtquickcontrols2basicstyleplugin_AbstractButton_qml.cpp 
      cd /home/jcelerier/libs/build-qt6.5-asan/qtdeclarative/src/quickcontrols/basic && /usr/bin/cmake -E make_directory /home/jcelerier/libs/build-qt6.5-asan/qtdeclarative/src/quickcontrols/basic/.rcc/qmlcache && /home/jcelerier/libs/build-qt6.5-asan/qtbase/libexec/qmlcachegen --bare --resource-path /qt-project.org/imports/QtQuick/Controls/Basic/AbstractButton.qml -I /home/jcelerier/libs/build-qt6.5-asan/qtbase/qml/ -I /home/jcelerier/libs/build-qt6.5-asan/qtbase/./qml -I /home/jcelerier/libs/build-qt6.5-asan/qtbase/./qml -i /home/jcelerier/libs/build-qt6.5-asan/qtbase/qml/QtQuick/Controls/Basic/qmldir --resource /home/jcelerier/libs/build-qt6.5-asan/qtdeclarative/src/quickcontrols/basic/.rcc/qmake_QtQuick_Controls_Basic.qrc --resource /home/jcelerier/libs/build-qt6.5-asan/qtdeclarative/src/quickcontrols/basic/.rcc/qtquickcontrols2basicstyleplugin_raw_qml_0.qrc --resource /home/jcelerier/libs/build-qt6.5-asan/qtdeclarative/src/quickcontrols/basic/.rcc/qtquickcontrols2basicstyleplugin.qrc -o /home/jcelerier/libs/build-qt6.5-asan/qtdeclarative/src/quickcontrols/basic/.rcc/qmlcache/qtquickcontrols2basicstyleplugin_AbstractButton_qml.cpp /home/jcelerier/libs/qt5/qtdeclarative/src/quickcontrols/basic/AbstractButton.qml
      /usr/include/c++/12.2.1/bits/stl_algo.h:2088:
      In function:
          _FIter std::upper_bound(_FIter, _FIter, const _Tp&, _Compare) [with 
          _FIter = 
          QList<QV4::CompiledData::CodeOffsetToLineAndStatement>::const_iterator; 
          _Tp = unsigned int; _Compare = QQmlJSCodeGenerator::nextJSLine(uint) 
          const::<lambda(int, const 
          QV4::CompiledData::CodeOffsetToLineAndStatement&)>]
      
      Error: elements in iterator range [first, last) are not partitioned by the 
      predicate __comp and value __val.
      
      Objects involved in the operation:
          iterator "first" @ 0x7ffccc1dba20 {
            type = QList<QV4::CompiledData::CodeOffsetToLineAndStatement>::const_iterator;
          }
          iterator "last" @ 0x7ffccc1dba40 {
            type = QList<QV4::CompiledData::CodeOffsetToLineAndStatement>::const_iterator;
          }
      ninja: build stopped: subcommand failed.
      

      Most likely the issue is that the comparator used does not satisfy all the requirements of standard C++:

      > The range [first, last) must be partitioned with respect to the expression !(value < element) or !comp(value, element), i.e., all elements for which the expression is true must precede all elements for which the expression is false. A fully-sorted range meets this criterion.

      Attachments

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

        Activity

          People

            ulherman Ulf Hermann
            jcelerier Jean-Michaƫl Celerier
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: