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

Crash after creating many QSceneLoader objects

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 5.9.0
    • Qt3D
    • None
    • Linux with 5.9.0 libs installed from Qt online installer

    Description

      When I create many QSceneLoader objects in one scene (seems to be triggered with > 256 instances), I get a crash in Qt 3D worker thread. See attached example code to trigger the crash - lowering the number of instances to 256 or less makes the code run fine. Setting source URL for the scene loader still triggers the crash (but with a slightly different backtrace).

      {{}}{{#0  0x00007ffff74b2e14 in Qt3DCore::QBackendNode::setPeerId(Qt3DCore::QNodeId) () from /home/martin/inst/Qt/5.9/gcc_64/lib/libQt53DCore.so.5 }}
      {{#1  0x00007ffff749f3d9 in Qt3DCore::QAbstractAspectPrivate::createBackendNode(QSharedPointer<Qt3DCore::QNodeCreatedChangeBase> const&) const () }}
      {{   from /home/martin/inst/Qt/5.9/gcc_64/lib/libQt53DCore.so.5 }}
      {{#2  0x00007ffff749f0c1 in Qt3DCore::QAbstractAspectPrivate::setRootAndCreateNodes(Qt3DCore::QEntity*, QVector<QSharedPointer<Qt3DCore::QNodeCreatedChangeBase> > const&) () }}
      {{   from /home/martin/inst/Qt/5.9/gcc_64/lib/libQt53DCore.so.5 }}
      {{#3  0x00007ffff74a52c0 in Qt3DCore::QAspectManager::setRootEntity(Qt3DCore::QEntity*, QVector<QSharedPointer<Qt3DCore::QNodeCreatedChangeBase> > const&) () }}
      {{   from /home/martin/inst/Qt/5.9/gcc_64/lib/libQt53DCore.so.5 }}
      {{#4  0x00007ffff5fffee1 in QObject::event(QEvent*) () from /home/martin/inst/Qt/5.9/gcc_64/lib/libQt5Core.so.5 }}
      {{#5  0x00007ffff6d9b4bc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /home/martin/inst/Qt/5.9/gcc_64/lib/libQt5Widgets.so.5 }}
      {{#6  0x00007ffff6da28e7 in QApplication::notify(QObject*, QEvent*) () from /home/martin/inst/Qt/5.9/gcc_64/lib/libQt5Widgets.so.5 }}
      {{#7  0x00007ffff5fd4e78 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /home/martin/inst/Qt/5.9/gcc_64/lib/libQt5Core.so.5 }}
      {{#8  0x00007ffff5fd725b in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /home/martin/inst/Qt/5.9/gcc_64/lib/libQt5Core.so.5 }}
      {{#9  0x00007ffff6026533 in ?? () from /home/martin/inst/Qt/5.9/gcc_64/lib/libQt5Core.so.5 }}
      {{#10 0x00007ffff128bfb7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 }}
      {{#11 0x00007ffff128c1f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 }}
      {{#12 0x00007ffff128c27c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 }}
      {{#13 0x00007ffff602693f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/martin/inst/Qt/5.9/gcc_64/lib/libQt5Core.so.5 }}
      {{#14 0x00007ffff5fd32a7 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>, int) () from /home/martin/inst/Qt/5.9/gcc_64/lib/libQt5Core.so.5 }}
      {{#15 0x00007ffff74a67f8 in Qt3DCore::QAspectManager::exec() () from /home/martin/inst/Qt/5.9/gcc_64/lib/libQt53DCore.so.5 }}
      {{#16 0x00007ffff74a7c18 in ?? () from /home/martin/inst/Qt/5.9/gcc_64/lib/libQt53DCore.so.5 }}
      {{#17 0x00007ffff5e0c4ba in ?? () from /home/martin/inst/Qt/5.9/gcc_64/lib/libQt5Core.so.5 }}
      {{#18 0x00007ffff45837fc in start_thread (arg=0x7fffeac91700) at pthread_create.c:465 }}
      #19 0x00007ffff54fab0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

       

      Also seen on Windows with Qt 5.9.2. Original QGIS bug report triggering the crash: https://issues.qgis.org/issues/17570

       

      Attachments

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

        Activity

          People

            seanharmer Sean Harmer
            martin_dobias Martin Dobias
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes