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

QQmlObjectCreator::populateInstance access within null pointer

    XMLWordPrintable

    Details

    • Commits:
      68199cec0e47ff15e8e9b2708441e46cc7c48b84 (qt/qtdeclarative/5.15) b953bd67d4134b9af3e554a0287a462ddf2de5f7 (qt/qtdeclarative/dev)

      Description

      I used Qt 5.15 (git branch) compiled with "./configure -sanitize address -sanitize undefined" (with gcc/linux/amd64), when I run "hello world" QML with virtual keyboard created via qtcreator I got:

      /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:1572:86: runtime error: member call on null pointer of type 'struct QQmlPropertyCache'
      /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:1572:86: runtime error: member access within null pointer of type 'struct QQmlPropertyCache'
      AddressSanitizer:DEADLYSIGNAL
      =================================================================
      ==3033826==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f30552d9868 bp 0x7ffda00acda0 sp 0x7ffda00ac6e0 T0)
      ==3033826==The signal is caused by a READ memory access.
      ==3033826==Hint: address points to the zero page.
          #0 0x7f30552d9868 in QQmlObjectCreator::populateInstance(int, QObject*, QObject*, QQmlPropertyData const*) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:1572
          #1 0x7f30552d0280 in QQmlObjectCreator::createInstance(int, QObject*, bool) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:1348
          #2 0x7f30552aaf7f in QQmlObjectCreator::create(int, QObject*, QQmlInstantiationInterrupt*, int) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:204
          #3 0x7f30552cc0da in QQmlObjectCreator::createInstance(int, QObject*, bool) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:1231
          #4 0x7f30552bf8b5 in QQmlObjectCreator::setPropertyBinding(QQmlPropertyData const*, QV4::CompiledData::Binding const*) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:847
          #5 0x7f30552bc1fa in QQmlObjectCreator::setupBindings(bool) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:798
          #6 0x7f30552d8afb in QQmlObjectCreator::populateInstance(int, QObject*, QObject*, QQmlPropertyData const*) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:1555
          #7 0x7f30552d0280 in QQmlObjectCreator::createInstance(int, QObject*, bool) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:1348
          #8 0x7f30552bf8b5 in QQmlObjectCreator::setPropertyBinding(QQmlPropertyData const*, QV4::CompiledData::Binding const*) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:847
          #9 0x7f30552bc1fa in QQmlObjectCreator::setupBindings(bool) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:798
          #10 0x7f30552d8afb in QQmlObjectCreator::populateInstance(int, QObject*, QObject*, QQmlPropertyData const*) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:1555
          #11 0x7f30552d0280 in QQmlObjectCreator::createInstance(int, QObject*, bool) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:1348
          #12 0x7f30552aaf7f in QQmlObjectCreator::create(int, QObject*, QQmlInstantiationInterrupt*, int) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:204
          #13 0x7f30552cc0da in QQmlObjectCreator::createInstance(int, QObject*, bool) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:1231
          #14 0x7f30552bf8b5 in QQmlObjectCreator::setPropertyBinding(QQmlPropertyData const*, QV4::CompiledData::Binding const*) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:847
          #15 0x7f30552bc1fa in QQmlObjectCreator::setupBindings(bool) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:798
          #16 0x7f30552d8afb in QQmlObjectCreator::populateInstance(int, QObject*, QObject*, QQmlPropertyData const*) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:1555
          #17 0x7f30552d0280 in QQmlObjectCreator::createInstance(int, QObject*, bool) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:1348
          #18 0x7f30552aaf7f in QQmlObjectCreator::create(int, QObject*, QQmlInstantiationInterrupt*, int) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:204
          #19 0x7f30552cc0da in QQmlObjectCreator::createInstance(int, QObject*, bool) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:1231
          #20 0x7f30552bf8b5 in QQmlObjectCreator::setPropertyBinding(QQmlPropertyData const*, QV4::CompiledData::Binding const*) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:847
          #21 0x7f30552bc1fa in QQmlObjectCreator::setupBindings(bool) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:798
          #22 0x7f30552d8afb in QQmlObjectCreator::populateInstance(int, QObject*, QObject*, QQmlPropertyData const*) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:1555
          #23 0x7f30552d0280 in QQmlObjectCreator::createInstance(int, QObject*, bool) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:1348
          #24 0x7f30552aaf7f in QQmlObjectCreator::create(int, QObject*, QQmlInstantiationInterrupt*, int) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:204
          #25 0x7f3054f9717b in QQmlComponentPrivate::beginCreate(QQmlContextData*) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlcomponent.cpp:934
          #26 0x7f3054f95d68 in QQmlComponent::beginCreate(QQmlContext*) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlcomponent.cpp:886
          #27 0x7f3054f8b726 in QQmlComponentPrivate::doBeginCreate(QQmlComponent*, QQmlContext*) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlcomponent.cpp:371
          #28 0x7f3054f94eb5 in QQmlComponent::create(QQmlContext*) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlcomponent.cpp:818
          #29 0x7f305526d906 in QQmlApplicationEnginePrivate::finishLoad(QQmlComponent*) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlapplicationengine.cpp:148
          #30 0x7f305526cc01 in QQmlApplicationEnginePrivate::startLoad(QUrl const&, QByteArray const&, bool) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlapplicationengine.cpp:132
          #31 0x7f305526f09d in QQmlApplicationEngine::load(QUrl const&) /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtdeclarative/src/qml/qml/qqmlapplicationengine.cpp:279
          #32 0x55d8583fbaac in main ../main.cpp:19
          #33 0x7f3046fae001 in __libc_start_main (/usr/lib/libc.so.6+0x27001)
          #34 0x55d8583fbf3d in _start (/home/evgeniy/bigdisk1/projects/study/qt/qml/virt_keyb_hello_world/build-asan/virt_keyb_hello_world+0x5f3d)
      

      Using debugger I can see that in qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:1572

              QQmlPropertyData *const targetProperty = targetDData->propertyCache->property(coreIndex);
      

      targetDData not nullptr, but targetDData->propertyCache is nullptr

        Attachments

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

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            evgeniy_dushistov evgeniy_dushistov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes