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

Q_ASSERT fail in QAbstractAspectPrivate::mapperForNode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.5.1
    • Qt3D
    • None
    • Windows

    Description

      When `QAspectManager:: processFrames` is called it results in calls to `QAbstractAspectPrivate:: syncDirtyFrontEndNodes`. Inside this function a `QMetaObject*` is retrieved and passed to `QAbstractAspectPrivate::mapperForNode` which asserts that the `QMetaObject*` is not null: https://github.com/qt/qt3d/blob/8d2c0edfb87ee14406097d7bf0e57b778cfa39f6/src/core/aspects/qabstractaspect.cpp#L178-L179

       

      In my application there is a case where a number of entities are removed and then new entities are created all at once. When this happens a number of `QShaderProgramBuilder` nodes are processed by `syncDirtyFrontEndNodes` which have nullptr as their `m_typeInfo`, this results in the Q_ASSERT at the beginning of `mapperForNode` to fail.

       

      Looking at the code it seems clear that it was originally written with the expectation that `QMetaObject const* metaObj` might be nullptr. Is it an error to have this assertion? When running my code in a release build it seems to run without issue.

      Attachments

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

        Activity

          People

            seanharmer Sean Harmer
            nickexists Nick Anthony
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes